10

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.

14

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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