How do I force Ubuntu to boot into initramfs?

7,068

To make the boot process stop in the initramfs, you have to add break to the kernel line in grub.
There are different stages and one can instruct to stop at a given stage. The default is premount, for further options and a comprehensive description refer to man initramfs-tools.

It is often a hassle to get the grub menu during boot, but normally Esc will raise it, when pressed at the right time. Maybe pressing it again and again during boot will raise your chance.
Once in the boot menu of grub, select the boot entry you want to boot with your Up/Down keys and press e to edit the entry.
Then navigate down to the line that starts with linux and append break or break=<run-time> to make the boot process stop in the initramfs.

Share:
7,068

Related videos on Youtube

Calvin
Author by

Calvin

Updated on September 18, 2022

Comments

  • Calvin
    Calvin over 1 year
    root@Pavlov:/# cat /etc/lsb-release 
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=16.04
    DISTRIB_CODENAME=xenial
    DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
    

    I made the sad mistake of putting / on an LVM2 volume group with 3 drives.

    Less than a year later one drive has failed and I need to remove it.

    Consequently I have to unmount the vg and resize it to remove the failed drive! Betcha I won't make this mistake again!

    • Thomas
      Thomas almost 6 years
      You might be better off with a Live USB boot. Otherwise you might not have all tools available you need...
    • Calvin
      Calvin almost 6 years
      I don't want to do that since initramfs will assemble the lv for me. fsck and resize2fs are part of the initramfs and thats all I need.