Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to customize the initramfs rescue environment and would like to force the kernel to fail mounting / and drop into the (initramfs) rescue shell, as opposed to single user mode.

How can I do that?

NB: I know how to hook into initramfs-tools to achieve the customization steps, but I need to be able to verify the result.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

This will drop you into an initramfs shell:

  • Start your computer. Wait until the Grub menu appears.
  • Hit e to edit the boot commands.
  • Append break=mount to your kernel line.
  • Hit F10 to boot.
  • Within a moment, you will find yourself in a initramfs shell.

If you want to make this behavior persistent, add GRUB_CMDLINE_LINUX_DEFAULT="break=mount" to /etc/default/grub and run grub-mkconfig -o /boot/grub/grub.cfg.

share|improve this answer
    
thanks! This is spot on what I was looking for. Two things: 1.) I had to press Ctrl+C before being dropped into the initramfs shell and 2.) because I use GRUB2 the line is called linux :) –  0xC0000022L Apr 9 '13 at 1:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.