UEFI Linux rescue environment

For a UEFI Linux rescue environment, especially when you want to chroot into your installed Gentoo or Debian system, you should mount the following virtual filesystems:


Mount point

Purpose

/dev

Device files

/dev/pts

Pseudo-terminals

/proc

Process and kernel information

/sys

Hardware and kernel device information

/run

Runtime system information

The most important ones are /dev, /proc, and /sys.

For a UEFI rescue, I recommend this setup (assuming your installed system is mounted at /mnt):

1. Mount virtual filesystems

mount -t proc proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --make-rslave /mnt/sys

mount --rbind /dev /mnt/dev
mount --make-rslave /mnt/dev

mount --bind /dev/pts /mnt/dev/pts

mount --rbind /run /mnt/run
mount --make-rslave /mnt/run

2. Mount UEFI variables

If the rescue USB was booted in UEFI mode:

mount -t efivarfs efivarfs /sys/firmware/efi/efivars

If already mounted, don't mount it again.

Make sure the EFI variables are accessible inside the chroot:

mount --bind \
  /sys/firmware/efi/efivars \
  /mnt/sys/firmware/efi/efivars

Check:

ls /sys/firmware/efi/efivars

3. Enter the installed system

chroot /mnt /bin/bash

4. Verify

Inside the chroot:

mount | grep -E 'proc|sys|dev|run|efivarfs'
efibootmgr -v

Important: The EFI System Partition (ESP), usually FAT32, must also be mounted at the correct location (/boot/efi, /boot, or /efi, depending on your /etc/fstab).

References:

One recommendation: If you're rescuing your Gentoo installation, I can give you a complete Gentoo-specific UEFI rescue procedure, including EFI variables, GRUB and kernel/initramfs recovery.


Βαθμολογήστε αυτή τη καταχώρηση:

∅ 0 (0 Ψήφοι)

Κατηγορίες για την καταχώρηση αυτή