Discussion:
[ubuntu-us-mi] failed boot and Ubuntu cheatcodes?
Robert Citek
2010-04-21 21:15:28 UTC
Permalink
How can I boot into some kind of sub-rescue mode in order to recover
from an error in my /etc/fstab?

I did the following:

sudo true && {
sudo dd if=/dev/zero of=/just-for-fun bs=1M count=100
# sudo mkfs.ext3 -F /just-for-fun
sudo mkdir /media/jff
echo "/just-for-fun /media/jff ext3 loop 0 1" | sudo tee -a /etc/fstab
sudo reboot
}

Notice that I forgot to uncomment the mkfs.ext3 command. Now, when I
try to boot, Ubuntu complains that it can't mount the filesystem.
That's not a big deal except that it I haven't figured out a way to
boot into some kind of rescue mode that drops me to a shell, even a
busybox shell, to let me fix the /etc/fstab. Not even emergency mode
(-b) works. The only way I that has worked is to boot with some other
media, e.g. another OS, LiveCD, or LiveUSB.

Knoppix has some pretty cool cheatcodes that pause the boot process at
different stages[1] so that you can fix things before moving on. Does
Ubuntu have anything like that?

[1] http://www.knoppix.net/wiki/Cheat_Codes#Tips.26Tricks

Regards,
- Robert
Jeff Hanson
2010-04-21 21:39:35 UTC
Permalink
Post by Robert Citek
How can I boot into some kind of sub-rescue mode in order to recover
from an error in my /etc/fstab?
https://help.ubuntu.com/community/BootOptions#Initrd%20break%20points

You could also just use a LiveCD, mount the partition, sudo gedit
/etc/fstab to fix.
Robert Citek
2010-04-21 21:45:15 UTC
Permalink
Post by Jeff Hanson
Post by Robert Citek
How can I boot into some kind of sub-rescue mode in order to recover
from an error in my /etc/fstab?
https://help.ubuntu.com/community/BootOptions#Initrd%20break%20points
You could also just use a LiveCD, mount the partition, sudo gedit
/etc/fstab to fix.
Our messages must have passed in the Ether. :)

Yes, I've been using a LiveCD, but was looking for alternatives. The
advantage of using the boot options is where a LiveCD is not an
option, e.g. on remote servers, on systems where RAM is too small, or
one doesn't have a LiveCD.

Regards,
- Robert

Robert Citek
2010-04-21 21:41:00 UTC
Permalink
Post by Robert Citek
How can I boot into some kind of sub-rescue mode in order to recover
from an error in my /etc/fstab?
...
Post by Robert Citek
Knoppix has some pretty cool cheatcodes that pause the boot process at
different stages[1] so that you can fix things before moving on. ?Does
Ubuntu have anything like that?
Just got done going through some Google hits and came across this one:

https://help.ubuntu.com/community/BootOptions#Initrd%20break%20points

Not as nice as the Knoppix cheatcodes, for example, you can't step
through the different stages as in Knoppix, but will work in a pinch:

The one that helped me was break=bottom.

Regards,
- Robert
Loading...