运行时testdisk
我实际上可以看到我的所有文件/dev/sda1
!
我想在安装 Debian 的同时安装 Windows 以便玩一些游戏。为了做到这一点,我必须启动 Ubuntu Live 12.1 DVD 并使用 GParted(我正在调整包含所有内容的主分区的大小)。
调整大小成功完成。然后我尝试重新启动到我的 Debian 来备份我的数据,不幸的是我之前忘记了这样做。
GRUB 加载良好,但系统无法正常启动!它会尝试配置“ramdisk”或类似的东西;然后它只是一个提示,仅此而已。
现在我再次启动到 Ubuntu,对缩小的分区进行检查。本质上,它已损坏,但我无法真正理解错误消息。
GParted 报道如下:
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
========================================
这是以下的输出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
如何修复我的分区?我能够恢复我的数据吗?
以下是我运行的一些附加命令:
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 *****
须藤 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 **********
须藤分开-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!
分区表条目显示“msdos”——这应该是这样的吗?
答案1
尝试重新启动到实时环境,并且没有任何系统分区fsck.ext3 -pcf
在有问题的驱动器上运行。如果fsck.ext3
不可用,则e2fsck -pcf
可以正常工作。
使用的标志将告知fsck.ext3
其行为如下:
-p, Automatic repair (no questions)
-c, Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
如果这不起作用,请运行fdisk /dev/sda
并使用该选项核实这partition table
。我相信这个选项是v