Boot Fedora into Emergency mode

Lars Jönsson 2019-11-22

Information about how to enter Emergency mode in Fedora.

Enter Emergency mode during boot

Press ESC during boot to get the boot menu.

Select the desired entry and press e.

load_video
set gfx_payload=keep
insmod gzio
linux ($root)/vmlinuz-5.2.17-200.fc30.x86_64 root=/dev/mapper/fedora-root ro r\
esume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb\
 quiet
initrd ($root)/initramfs-5.2.17-200.fc30.x86_64.img

Edit the line that starts with linux and add rd.break enforcing=0 to the end of the line. Optionally remove rhgb quiet, which are used for preventing console output during boot.

Note that a US Keyboard layout is used in GRUB edit.

load_video
set gfx_payload=keep
insmod gzio
linux ($root)/vmlinuz-5.2.17-200.fc30.x86_64 root=/dev/mapper/fedora-root ro r\
esume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb\
 quiet rd.break enforcing=0
initrd ($root)/initramfs-5.2.17-200.fc30.x86_64.img

Press Ctrl-X to start.

Use the system in Emergency mode

The root filesystem is available at /sysroot as read-only. To be able use most of the commands in the root file, add its bin directories to the path.

switch_root:/# PATH="$PATH:/sysroot/bin:/sysroot/sbin"

If access to the system is needed, the root filesystem needs to be mounted at / as a read-write filesystem.

switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot
sh-5.0# 

Use the exit command to end the chroot.

sh-5.0# exit
switch_root:/# 

Reboot the system by either type reboot or exit. The exit command does not reset the machine. It just continues the boot.

switch_root:/# reboot
switch_root:/# exit
logout