Monday, April 11, 2011

Can't get root shell when fsck check fails in ubuntu

Try editing your regular boot entry in grub (e shortcut and appending init=/bin/sh to end of the line beginning with linux .... After you will boot it (Ctrl-x), you will get a root shell immediately.

http://superuser.com/questions/215590/how-to-boot-grub2-into-the-simplest-linux-shell

$ sudo gedit /boot/grub/grub.cfg

menuentry 'Ubuntu recovery with Ctrl+X then fsck /dev/sda4 (home)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set dc61149c-085c-4b71-a92f-127a6b831719
echo 'Loading Linux 2.6.32-25-generic ...'
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=dc61149c-085c-4b71-a92f-127a6b831719 ro single init=/bin/sh
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic
}

https://help.ubuntu.com/community/Grub2

When all else fails, try booting to the Windows partition, with a boot cd / usb

No comments: