Article 53YBD "Attempt to read or write outside of partition" after a bad manipulation

"Attempt to read or write outside of partition" after a bad manipulation

by
vroummvroumm
from LinuxQuestions.org on (#53YBD)
Hello everyone,

I'm under Debian, but I wanted to do a dual boot with windows. I made a bad manipulation when I splited my disk and now when I try to reboot my computer I have :

Attempt to read or write outside of partition
Entering rescue mode...
grub rescue>

I tried to change the order of boots, nothing. I tried to find some informations on web and what I did : I installed Gparted on a usb live to modify or have some informations about my partitions and that's what I have:

Attachment 33280

Attachment 33281

Attachment 33282

After more searching, I looked for a backup with TestDisk, and that's what I have :

Code:Tue May 26 16:57:40 2020
Command line: TestDisk

TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 5.4.0-3-686 (#1 SMP Debian 5.4.13-1 (2020-01-19)) i686
Compiler: GCC 9.2
ext2fs lib: 1.45.5, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.1
User is not root!
Hard disk list

TestDisk exited normally.
Using locale 'en_GB.UTF-8'.

Tue May 26 16:57:40 2020
Command line: TestDisk /debug

TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 5.4.0-3-686 (#1 SMP Debian 5.4.13-1 (2020-01-19)) i686
Compiler: GCC 9.2
ext2fs lib: 1.45.5, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.1
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 625142448 sectors
/dev/sda: user_max 625142448 sectors
/dev/sda: native_max 625142448 sectors
/dev/sda: dco 625142448 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop1 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop2 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop3 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop4 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop5 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop6 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop7 - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63, sector size=512 - TOSHIBA MQ01ACF032, S/N:839BC4R1T, FW:AV001E
Disk /dev/sdb - 15 GB / 14 GiB - CHS 14891 64 32, sector size=512, FW:PMAP
Disk /dev/loop0 - 307 MB / 293 MiB - 600656 sectors (RO), sector size=512

Partition table type (auto): Intel
Disk /dev/sda - 320 GB / 298 GiB - TOSHIBA MQ01ACF032
Partition table type: Intel

Analyse Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
Geometry from i386 MBR: head=255 sector=63
check_part_i386 failed for partition type 83
check_part_i386 failed for partition type 83
Current partition structure:
No ext2, JFS, Reiser, cramfs or XFS marker
1 * Linux 0 32 33 13054 75 13 209715200
1 * Linux 0 32 33 13054 75 13 209715200
2 E extended 38413 41 27 38913 70 5 8034306
No ext2, JFS, Reiser, cramfs or XFS marker
3 P Linux 13054 75 14 38413 41 26 407390206
3 P Linux 13054 75 14 38413 41 26 407390206
5 L Linux Swap 38413 41 29 38913 70 5 8034304

search_part()
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63

recover_EXT2: s_block_group_nr=0/2354, s_mnt_count=46/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 77137920
recover_EXT2: part_size 617103360
Filesystem created: Thu Nov 14 22:14:57 2019
Last mount time: Mon May 25 15:25:23 2020
Linux 0 32 33 38413 8 59 617103360
ext4 blocksize=4096 Large_file Sparse_SB Recover, 315 GB / 294 GiB
Linux Swap 38413 41 29 38913 69 52 8034288
SWAP2 version 1, pagesize=4096, 4113 MB / 3922 MiB

Results
* Linux 0 32 33 38413 8 59 617103360
ext4 blocksize=4096 Large_file Sparse_SB Recover, 315 GB / 294 GiB
P Linux Swap 38413 41 29 38913 70 5 8034304
SWAP2 version 1, pagesize=4096, 4113 MB / 3923 MiB

Hint for advanced users: dmsetup may be used if you prefer to avoid rewriting the partition table for the moment:
echo "0 617103360 linear /dev/sda 2048" | dmsetup create test0
echo "0 8034304 linear /dev/sda 617107456" | dmsetup create test1

interface_write()
1 * Linux 0 32 33 38413 8 59 617103360
2 P Linux Swap 38413 41 29 38913 70 5 8034304
Can't open backup.log file: No such file or directory
interface_load
Can't open backup.log file: No such file or directory
interface_load
SIGHUP detected! TestDisk has been killed.It's hard for me to make a diagnostic with all these informations. I don't really know what I have to do. Do you have any idea?

Thank you for your help !

vroummvroumm
Attached Thumbnailsattachment.php?attachmentid=33280&stc=1& attachment.php?attachmentid=33281&stc=1& attachment.php?attachmentid=33282&stc=1& latest?d=yIl2AUoC8zA latest?i=oGflLkzNSjg:bba_Z0FqEi4:F7zBnMy latest?i=oGflLkzNSjg:bba_Z0FqEi4:V_sGLiP latest?d=qj6IDK7rITs latest?i=oGflLkzNSjg:bba_Z0FqEi4:gIN9vFwoGflLkzNSjg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments