Ubuntu分区消失(进入grub rescue)

Ubuntu分区消失(进入grub rescue)

一周前,我复制并输入了一个(忘记的)命令到我的桌面。之后,ls任何目录中都没有显示任何内容。我决定重新启动,但最终进入了 grub 救援。我尝试了解决方案但没有作用。

添加于 17-03-2018:

我可以通过启动 USB 来尝试 Ubuntu。我尝试找到我之前的分区,但它返回分区错误

Disk /dev/loop0: 1.5 GiB, 1564921856 bytes, 3056488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xe176b393

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sda1  *          2048 3840167935 3840165888  1.8T 83 Linux
/dev/sda2       3840169982 3907028991   66859010 31.9G  5 Extended
/dev/sda5       3840169984 3907028991   66859008 31.9G 82 Linux swap /Solaris

Partition 2 does not start on physical sector boundary.

Disk /dev/sdb: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0004946c

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048 15564799 15562752  7.4G  c W95 FAT32 (LBA)

我不确定“Partition 2 does not start on physical sector boundary.我还可以尝试其他什么吗?”是什么意思。

我感谢任何评论/建议。

额外的信息:

GNU GRUB version 2.02~eta2-36ubuntu3.17
...
grub> ls
(memdisk) (hd0) (hd0,msdos1,apple2) (hd0,msdos1,apple1) (hd0,msdos1) (hd1) (hd2) (hd2,msdos5) (hd2,msdos1)
grub> ls (hd0,msdos1)
Partition hd0,msdos1: Filesystem type iso9660 - Label `Ubuntu 16.04.4 LTS amd64' - Last modification time 2018-02-28 19:15:18 Wednesday, UUID 2018-02-28-19-15-18-00 - Partition start at 1024KiB - Total size 7781376KiB    

现在我使用 Ubuntu USB 启动桌面(尝试 Ubuntu)。结果如下:

sudo blkid
/dev/sdb1: UUID="2018-02-28-19-15-18-00" LABEL="Ubuntu 16.0.4 LTS amd64" TYPE="iso9660" PTUUID="550f2a26" PTTYPE="dos" PARTUUID="0004946c-01"
/dev/loop0: TYPE="squashfs"
/dev/sda5: UUID="8121875e-b7c4-4294-b463-1e6b958b86a0" TYPE="swap" PARTUUID="e176b393-05"
/dev/sda1: PARTUUID="e176b393-01"

答案1

我终于问了同样的问题,也许在 Ubuntu 论坛上更清楚。解决方案比我预期的要简单。

sudo e2fsck -f -y -v /dev/sda1

该命令自动修复了我的分区。一些已修复的碎片被放在 lost+found 中,但我的所有文件都保存了下来。

如果其他人遇到同样的问题,我希望这个方法能够奏效。

相关内容