12

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.

0xC0000022L
  • 16,189
  • 24
  • 102
  • 168

1 Answers1

16

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 09 '13 at 01:13