running testdisk
I can actually see all of my files in /dev/sda1
!
I wanted to install Windows alongside my Debian installation in order to play some games. In order to do that, I had to boot up a Ubuntu Live 12.1 DVD and use GParted (I was resizing my main partition which had everything).
The resizing finished successfully. I then tried to reboot into my Debian to backup my data, which I had forgotten to do before, unfortunately.
GRUB loads nicely, but the system can't boot properly! It comes to a point where it tries to configure a "ramdisk", or something like that; then it's just a prompt and that's it.
Now I've booted into Ubuntu again, to run a check on my shrank partition. Essentially, it's broken, but I can't really understand the error message.
This is what GParted reported:
GParted 0.12.1 --enable-libparted-dmraid
Libparted 2.3
Check and repair file system (ext3) on /dev/sda1 00:11:35 ( ERROR )
calibrate /dev/sda1 00:00:00 ( SUCCESS )
path: /dev/sda1
start: 2,048
end: 1,232,117,759
size: 1,232,115,712 (587.52 GiB)
check file system on /dev/sda1 for errors and (if possible) fix them 00:11:35 ( ERROR )
e2fsck -f -y -v /dev/sda1
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
e2fsck: Group descriptors look bad... trying backup blocks...
Block bitmap for group 4700 is not in group. (block 154014812)
Relocate? yes
Inode bitmap for group 4700 is not in group. (block 154014813)
Relocate? yes
Pass 1: Checking inodes, blocks, and sizes
Error allocating 1 contiguous block(s) in block group 4700 for block bitmap: Could not allocate block in ext2 filesystem
Error allocating 1 contiguous block(s) in block group 4700 for inode bitmap: Could not allocate block in ext2 filesystem
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: ********** WARNING: Filesystem still has errors **********
e2fsck 1.42.5 (29-Jul-2012)
e2fsck: aborted
========================================
This is the output of dmesg | tail
:
[ 1702.169848] EXT3-fs error (device sda1): ext3_check_descriptors: Block bitmap for group 4700 not in group (block 154014812)!
[ 1702.170231] EXT3-fs (sda1): error: group descriptors corrupted
[ 1889.324746] CPU3: Package power limit notification (total events = 50)
[ 1889.324749] CPU1: Package power limit notification (total events = 50)
[ 1889.324750] CPU2: Package power limit notification (total events = 50)
[ 1889.324752] CPU0: Package power limit notification (total events = 50)
[ 1889.335756] CPU2: Package power limit normal
[ 1889.335757] CPU3: Package power limit normal
[ 1889.335759] CPU1: Package power limit normal
[ 1889.335760] CPU0: Package power limit normal
How can I fix my partition? Will I be able to recover my data?
Here are some additional commands I ran:
sudo fsck.ext3 -cf /dev/sda1
e2fsck 1.42.5 (29-Jul-2012)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
fsck.ext3: Group descriptors look bad... trying backup blocks...
Block bitmap for group 4700 is not in group. (block 154014812)
Relocate<y>? yes
Inode bitmap for group 4700 is not in group. (block 154014813)
Relocate<y>? yes
fsck.ext3: e2fsck_read_bitmaps: illegal bitmap block(s) for /dev/sda1
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
sudo e2fsck -b 32768 /dev/sda1
e2fsck 1.42.5 (29-Jul-2012)
Block bitmap for group 4700 is not in group. (block 154014812)
Relocate<y>? yes
Inode bitmap for group 4700 is not in group. (block 154014813)
Relocate<y>? yes
/dev/sda1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error allocating 1 contiguous block(s) in block group 4700 for block bitmap: Could not allocate block in ext2 filesystem
Error allocating 1 contiguous block(s) in block group 4700 for inode bitmap: Could not allocate block in ext2 filesystem
e2fsck: aborted
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: ********** WARNING: Filesystem still has errors **********
sudo parted -l
Model: ATA Hitachi HTS54757 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 631GB 631GB primary ext3 boot
2 742GB 750GB 7985MB primary linux-swap(v1)
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: Can't have a partition outside the disk!
The partition table entry states "msdos" - is this supposed to be like that?
parted -l /dev/sda
where is the partition that you created for your windows installation?