我正在运行 HP pavilion dv6000 双启动 win7 和 Ubuntu 12.04。(好吧,直到今天)。重新启动后,启动过程将进入 BusyBox 外壳程序,我最终会出现以下提示:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
Run Code Online (Sandbox Code Playgroud)
我一直在研究遇到同样问题的其他人,但一直无法找到任何适合我的解决方案。
我尝试了这里描述的方法,并在最终命令之后
mount -t ntfs-3g /dev/sda1 /root -o force
Run Code Online (Sandbox Code Playgroud)
它什么都不做,并给了我另一个(initramfs)提示。
我可以启动到 live CD (USB) 并到达终端,但它似乎没有多大用处,因为我可以在 ls 命令中看到 /dev/sda1,但是当我看到它时它无法识别它尝试 cd 到它。
还有一个问题:使用命令fdisk -l
如何判断哪个挂载点 ( sda1
/ sda2
) 是我的 Windows 分区,哪个是 Ubuntu?
ram*_*san 330
在initramfs控制台中,我传递了一个命令exit以退出shell。同一个控制台出现在我面前,但这次带有损坏的分区的确切名称。
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
Run Code Online (Sandbox Code Playgroud)
检查完成后,我重新启动了系统。
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
Run Code Online (Sandbox Code Playgroud)
如果reboot
不起作用,请尝试exit
。
就是这样,我回到了文件系统,没有任何错误。
efk*_*kan 102
实际上,解决方案很简单,只需编写如下命令,fsck /dev/sdax
并Y
在控制台要求修复某些内容时给出:
(initramfs) fsck /dev/sda1
Run Code Online (Sandbox Code Playgroud)
或者
(initramfs) fsck /dev/sdaX
Run Code Online (Sandbox Code Playgroud)
X
指定安装的磁盘部件号。
如果您不想在每次要求修复时手动按“y”,您也可以运行带有该-y
选项的命令。
(initramfs) fsck /dev/sdaX -y
Run Code Online (Sandbox Code Playgroud)
Ami*_* KK 93
注意:如果您在尝试@ramsudharsan's answer 中的步骤后仍然遇到问题,请尝试此答案。如果您还没有尝试遵循这些说明,我建议您这样做,因为在大多数情况下这似乎可以解决问题。
看来你有一个坏的超级块。要解决此问题:
首先,启动到 Live CD 或 USB
通过使用找出您的分区号
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Run Code Online (Sandbox Code Playgroud)
然后,使用以下命令列出所有超级块:
sudo dumpe2fs /dev/sda2 | grep superblock
Run Code Online (Sandbox Code Playgroud)
替换sda2
为您的驱动器号
你应该得到类似这样的输出
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Run Code Online (Sandbox Code Playgroud)
从此列表中选择一个备用超级块,在本例中为备用超级块 # 32768
现在,要使用备用超级块 # 32768 检查和修复 Linux 文件系统:
sudo fsck -b 32768 /dev/sda2 -y
Run Code Online (Sandbox Code Playgroud)
该-y
标志用于跳过所有Fix?
问题并自动以是回答所有问题
你应该得到类似的输出:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Run Code Online (Sandbox Code Playgroud)
现在尝试挂载分区
sudo mount /dev/sda2 /mnt
Run Code Online (Sandbox Code Playgroud)
现在,尝试使用以下命令浏览文件系统
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
Run Code Online (Sandbox Code Playgroud)
如果您能够执行上述命令,那么您很可能已经修复了错误。
现在,重新启动计算机,您应该能够正常启动。
(来源)
gparted
安装的硬盘)。gparted
并选择您的硬盘,然后从右键菜单中选择 CHECK。略有不同的答案(Ubuntu 16.04),尽管其他答案最终让我明白了这一点。
我首先必须选择一个恢复模式内核,然后才能看到错误消息以了解哪个分区/文件系统有错误。
从那时起,跑步fsck /dev/sdb1/ -y
为我修复了它。
小智 4
我刚刚尝试了一次幸运的尝试,使用 Live CD 上的“Parted Magic”工具启动系统。查看分区,Linux 分区上有一个声明为一些 GB 的“未知空间”。
所以我只是扩大了整个分区上的 Linux 空间,瞧——从那时起,我的 Linux 就像以前一样启动了,到目前为止没有任何失败。
归档时间: |
|
查看次数: |
997234 次 |
最近记录: |