Rescue initramfs

In my opinion, the best way to rescue after a failure is a live cd like knoppix.  However, there are times when you are a bit unprepared and don’t have the livecd with you, or your machind doesn’t have a cdrom drive, etc.  Yes, I could go to my office, grab a spare, bring it back, tear the computer apart, add the cdrom drive and do it that way.   Sometimes even this is not an option, like in the case of my tablet, which does not even have an option in the bios to boot from a cd or usb.  When I originally installed it was a network install.

More often than not, I just add init=/bin/bash to the kernel option in grub and boot to a shell.  This has many obvious disadvantages though.  You do not have any virtual consoles.  There is no job control. control-C and control-Z do not work.  You’d better not ping anything or you have to reboot!  For quick fixes this is an allright solution.

Another interesting option, although not as universal as adding /bin/bash to the init, is only really easy in Debian derivitives as far as I know.  It is, at least, different to do with red hat because of their different handling of initramfs.  But anyway, in Debian, navigate to your initramfs.conf file and set $DELAY seconds.  Now, when you’re booting, press the enter key when it says ‘waiting for $DELAY seconds’ to obtain a real Debian environment shell prompt that is much easier to use than the first option.  You can interupt and kill jobs, have more than one terminal, etc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s