Skip to content

Linux system boot failure and GRUB repair: command-line recovery guide

'E lava ke ta'ofi 'e ha Linux system boot 'a e ngaahi ngaue'anga, ngaahi seva 'o e ngaohi'anga koloa, mo e ngaahi komipiuta to'oto'o 'o e boot 'e ua 'o 'ikai ha fakatokanga, 'o tuku hifo koe ki ha stark . grub rescue> prompt, a minimal grub> shell, an (initramfs) pe . dracut:/# emergency console, a systemd "You are in emergency mode" maintenance prompt, or a black screen with a blinking cursor.

Unlike operating systems that hide startup mechanics behind opaque graphical error codes, Linux exposes every stage of the boot pipeline directly to the administrator. Almost every Linux boot failure stems from one of five fixable root causes: an overwritten or misconfigured GRUB 2 bootloader (commonly triggered after a Windows update on a dual-boot PC), a dirty ext4/xfs/btrfs root filesystem after a sudden power outage, a broken /etc/fstab disk UUID entry, a 100-percent full root (/) storage partition, or an interrupted kernel and graphics driver upgrade. Matching your exact on-screen prompt to the corresponding boot stage lets you repair the system cleanly without formatting your drive or losing your data.

Fai ʻeni he taimí ni .

When your Linux computer or server refuses to boot, follow these six immediate diagnostic and safety steps before running any destructive disk commands:

  1. Read the exact prompt on your screen to identify which boot stage failed:
    • grub rescue> pe . grub>: The motherboard UEFI/BIOS loaded the first stage of GRUB, but GRUB cannot locate /boot/grub or its configuration file (grub.cfg).
    • (initramfs) pe . dracut:/#: GRUB loaded the Linux kernel and initial RAM disk fine, but the kernel could not mount your main root (/) filesystem (usually because fsck needs to repair a dirty disk).
    • You are in emergency mode / Give root password for maintenance: The root filesystem mounted, but systemd failed to mount a secondary drive listed in /etc/fstab.
    • Black screen with a blinking cursor after the GRUB menu: The operating system booted, but the graphical Display Manager (GDM, SDDM, LightDM) failed due to a 100% full root disk or a broken Nvidia/AMD GPU driver.
  2. Try booting the previous Linux kernel from the GRUB menu first: Reboot the machine and hold Shift (BIOS) or tap Esc repeatedly (UEFI) right after the manufacturer logo to reveal the GRUB menu. Select "Advanced options for Ubuntu / Debian / Fedora" and pick the second-oldest kernel on the list. If a recent kernel update broke your initramfs or GPU module, the previous kernel will boot straight into your desktop in 10 seconds.
  3. Switch to a virtual TTY text console if stuck on a black screen: If the boot sequence freezes on a black screen with a blinking underscore or stuck splash logo, press Ctrl + Alt + F3 (or Ctrl + Alt + F2 through F6). If a login: text prompt appears, your Linux system is actually running, log in with your username and password to clean full disk space or fix graphics drivers.
  4. Never run fsck on a partition that is currently mounted read-write: Running fsck on a live, read-write mounted filesystem corrupts open inode tables and destroys files. Only run fsck from the (initramfs) shell (where root is unmounted), on a read-only mount, or from a Live USB stick.
  5. Unplug all non-important external USB hard drives and SD cards: A failing external USB drive listed in /etc/fstab or taking over boot priority in BIOS will halt the boot sequence. Unplug external drives and reboot to test.
  6. Prepare a Live Linux USB stick if GRUB or the kernel is completely missing: Keep a bootable Live USB flash drive (Ubuntu, Linux Mint, Fedora, or SystemRescue) handy so you can mount your encrypted or standard partitions and run a chroot bootloader repair.

Fakaanga: Ko e meʻa ke ʻOUA ʻe faí

Never run grub-install, dd, fdisk, pe . mkfs until you have verified your exact disk and partition layout using lsblk -f pe . blkid. Device node names like /dev/sda mo e /dev/sdb 'oku vahe'i dynamically 'e he Linux kernel 'i he boot pea 'e lava ke fetongi 'a e 'ota 'i he taimi 'oku plugged ai ha 'akau USB Mo'ui 'i he. /dev/sdX 'e faka'auha 'e he drive ho'o fakamatala. 'Ikai ngata ai, 'oua na'a teitei lele 'a e ngaahi me'angaue fakalelei'i 'o e filesystem hange ko e . fsck 'i he ngaahi vahevahe 'oku fokotu'u 'i he lau-tohi, 'oua 'aupito na'a ke fakamālohi'i-malohi 'o e sisitemi lolotonga ha kernel 'oku ngaue pe bootloader 'a e fakalelei'i 'o e kato, pea 'oua na'a teitei tamate'i 'a e ngaahi laipeli 'o e sisitemi 'i he . /usr/lib pe . /lib 'i ha feinga ke fakama'a 'a e feitu'u 'i ha root drive kakato.

Decision tree: diagnosing the 5 Linux boot failure stages

Faka'aonga'i 'a e flowchart diagnostic ko 'eni ke muimui'i ho'o output screen pau ki he fakalelei'i 'o e laine fekau 'oku fe'unga:

flowchart TD
    A["'Oku 'ikai lava 'e he sisitemi Linux ke Boot ki he Desktop / Hu"] --> B{"Ko e hā ‘oku fakahaa‘i ‘i he screen?"}
    B -->|"grub fakahaofi> pe grub> vave"| C["Siteisi 1 Ta'elavame'a: Faka'aonga'i 'a e ls ke kumi / boot / grub, fokotu'u 'a e aka & prefix, boot OS, pea lele grub-fakahu ."]
    B -->|"Puha femo'uekina (initramfs) pe dracut:/# fo'i 'anga'anga"| D["Siteisi 2 Ta'elavame'a: Faka'ilonga'i 'a e vahevahe 'o e aka mo e blkid pea lele fsck -y /dev/vahevahe ."]
    B -->|"Mode Fakavavevave: 'Oatu 'a e lea fufuu 'o e aka ki hono tokanga'i ."| E["Siteisi 3 Ta'elavame'a: Lele 'a e mo'unga -o remount,rw / pea fakalelei'i pe fakamatala ki tu'a 'a e UUID 'oku maumau 'i he /etc/fstab ."]
    B -->|"Screen 'uli'uli pe cursor 'oku kuikui hili 'a e GRUB ."| F["Stage 4 Failure: Press Ctrl+Alt+F3 (or boot emergency.target) to clear 100% full disk or GPU driver"]
    B -->|"Boots straight into Windows or 'No Bootable Device'"| G["UEFI/EFI Boot Order Wiped: Boot Live USB, mount Root + EFI, chroot, and reinstall GRUB"]

Comparison of Linux boot failure prompts, causes, and commands

On-Screen Error / Prompt Kuo a'u ki he Tu'unga 'o e Boot Tupu'anga Tefito Fastest Repair Command Sequence
error: no such partition / grub rescue> Siteisi 1 (Uho GRUB) Disk partitions resized, cloned, or UUID changed; GRUB cannot find /boot/grub/normal.mod. ls -> set root=(hdX,gptY) -> set prefix=(hdX,gptY)/boot/grub -> insmod normal -> normal
grub> (Standard GRUB CLI) Stage 1.5 (GRUB Normal) /boot/grub/grub.cfg is missing or deleted, though GRUB modules loaded fine. set root=(hdX,gptY) -> linux /boot/vmlinuz-... root=/dev/nvme0n1p2 -> initrd /boot/initrd.img-... -> boot
BusyBox (initramfs) or dracut:/# Stage 2 (Kernel + Initramfs) Unclean power-off left ext4/xfs root journal dirty, requiring manual fsck approval. blkid -> fsck -y /dev/nvme0n1p2 (or xfs_repair -L for XFS) -> reboot -f
You are in emergency mode (sulogin fakavave) Stage 3 (systemd Mounts) Secondary drive or swap partition in /etc/fstab was unplugged, reformatted, or corrupted. Enter root password -> mount -o remount,rw / -> nano /etc/fstab (add nofail pe . #) -> systemctl daemon-reload -> reboot
[FAILED] Failed to start GNOME Display Manager / Blinking Cursor Stage 4 (Display Manager / GUI) Root partition / is 100% full (0 bytes free for /tmp or Xorg sockets) OR broken Nvidia kernel module (dkms). Press Ctrl+Alt+F3 -> df -h -> journalctl --vacuum-size=100M & apt clean OR ubuntu-drivers autoinstall

Scenario 1: Escaping the grub rescue> pe . grub> prompt without a USB stick

If your screen displays error: unknown filesystem, error: no such partition, pe . Minimal BASH-like line editing is supported followed by grub rescue> pe . grub>, your Linux installation and personal files are usually still sitting intact on your SSD or hard drive, GRUB has simply lost track of which partition holds /boot/grub. You can boot directly into your installed OS from this prompt in 2 minutes:

Case A: You are at the grub rescue> prompt

At grub rescue>, only four basic commands work (ls, set, unset, and insmod). Follow these steps carefully:

  1. List all disks and partitions seen by the motherboard firmware:
    grub rescue> ls
    
    GRUB will print a line like: (hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3) (or (hd0,msdos1) on older MBR disks).
  2. Inspect each partition until you find your Linux root (or /boot) directory: (Remember to include the trailing slash / at the end of each ls check so GRUB lists the filenames inside that partition):
    grub rescue> ls (hd0,gpt1)/
    grub rescue> ls (hd0,gpt2)/
    grub rescue> ls (hd0,gpt3)/
    
  3. If (hd0,gpt1)/ shows efi/, that is your small FAT32 EFI System Partition.
  4. When a partition outputs boot/ etc/ home/ usr/ var/ vmlinuz initrd.img, you have found your main Linux root partition (for example, (hd0,gpt2)). (Note: If you use Btrfs with @ subvolumes on Ubuntu/Fedora, ls (hd0,gpt2)/ will show @/ @home/, meaning your boot folder is at (hd0,gpt2)/@/boot/grub.)
  5. Point GRUB to your partition and load the normal module: Assuming your Linux root is on (hd0,gpt2):
    grub rescue> set root=(hd0,gpt2)
    grub rescue> set prefix=(hd0,gpt2)/boot/grub
    grub rescue> insmod normal
    grub rescue> normal
    
    (If you have a separate dedicated /boot partition on (hd0,gpt2), use set prefix=(hd0,gpt2)/grub without /boot.)
  6. Make the fix permanent once your desktop boots: As soon as normal runs, your regular GRUB menu will appear and boot your Linux system. Important: Those set commands were temporary in RAM. The moment you log into your Linux desktop, open a terminal and permanently write the correct GRUB location to your drive:
    sudo update-grub
    sudo grub-install /dev/nvme0n1   # (Or /dev/sda ,  use your whole disk name, NOT a partition number)
    

Case B: You are at the standard grub> prompt

If you see grub> (without the word rescue), the normal module is already loaded, but your grub.cfg menu file is missing or broken. You can manually boot the Linux kernel in four lines using Tab auto-completion:

grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinuz-6.8.0-45-generic root=/dev/nvme0n1p2 ro
grub> initrd /boot/initrd.img-6.8.0-45-generic
grub> boot
(Tip: Just type linux /boot/vmlinuz and press the Tab key, GRUB will auto-complete the exact kernel version numbers installed on your disk.) Once booted into your OS, run sudo update-grub (Debian/Ubuntu) or sudo grub2-mkconfig -o /boot/grub2/grub.cfg (Fedora/RHEL) to regenerate the missing menu file.

Scenario 2: Fixing (initramfs) pe . dracut shells with fsck

If your PC passes the GRUB menu, shows the Linux boot splash for a few seconds, and then drops into a black text prompt reading:

BusyBox v1.36.1 (Ubuntu) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) _
Look 3 to 5 lines above the (initramfs) prompt. Nine times out of ten, you will see: The root filesystem on /dev/nvme0n1p2 requires a manual fsck

Step-by-step filesystem repair from (initramfs)

  1. Confirm which partition needs repair: If the partition name is not printed right above the prompt, type blkid and press Enter to list your ext4, xfs, pe . btrfs partitions.
  2. Run the matching filesystem repair tool:
    • For ext4 / ext3 filesystems (default on Ubuntu, Debian, Mint):
      (initramfs) fsck -y /dev/nvme0n1p2
      
      The -y flag automatically answers "yes" to every corrupted inode, orphaned block, and journal replay prompt instead of making you press y Tuʻo 500.
    • **For XFS ngaahi faile (faka'aonga'i 'i he RHEL, 'AlamaLinux, Linux Maka, CentOS) **: Tu'unga fsck 'oku 'ikai ke ne fai ha me'a 'i he XFS. ‘I ha . dracut:/# shell 'i ha sisitemi XFS, lele:
      dracut:/# xfs_repair /dev/mapper/rhel-root
      
      (Paasi pe 'a e -L fuka ke zero 'a e tohi fakamatala metadata XFS kapau . xfs_repair fakafisi ke lele koe'uhi ko ha fu'u 'akau 'uli 'oku 'ikai lava ke fokotu'u pea 'oku 'ikai ha'o fili kehe).
    • **For Btrfs ngaahi faile (faka'aonga'i 'i he Fedora, fakaavaSUSE) **: 'Uluakí feinga ke fakama'a 'a e 'akau 'akau Btrfs malu 'aki 'a e . btrfs rescue zero-log /dev/nvme0n1p2. Never run btrfs check --repair tukukehe kapau 'oku fakahinohino'i 'e ha developer Btrfs pe hili hono backup 'o e fakamatala mei ha USB Mo'ui, 'o hange ko e . --repair 'oku lau 'oku fakatu'utamaki 'i he Btrfs.
  3. Mavahe pea toe kamata: Tu'o taha fsck prints ***** FILE SYSTEM WAS MODIFIED *****, type exit (or reboot -f) and press Enter. Your system will mount the clean partition and boot normally.

Scenario 3: Fixing /etc/fstab errors in systemd Emergency Mode

If your screen stops mid-boot with:

You are in emergency mode. After logging in, type "journalctl -xb" to view system logs,
"systemctl reboot" to reboot, or "exit" to continue bootup.
Give root password for maintenance (or press Control-D to continue):
This almost always happens because you edited /etc/fstab, formatted a swap partition (which changed its UUID), or unplugged a secondary internal/external hard drive that is listed in /etc/fstab without the nofail option. By default, systemd halts the entire operating system boot if any disk listed in /etc/fstab fails to respond within 90 seconds.

How to fix /etc/fstab in 90 seconds

  1. Type your root password (or press Enter if on Ubuntu where the root account is locked and it drops you in directly; if Ubuntu says Cannot open access to console, the root account is locked, see the init=/bin/bash fakatokanga ʻi laló).
  2. Remount the root filesystem as Read-Write: In emergency mode, / is often mounted Read-Only, so if you try to save /etc/fstab, nano will say Error writing /etc/fstab: Read-only file system. Run this first:
    mount -o remount,rw /
    
  3. Find out which line in /etc/fstab is broken: Run mount -a. Whatever drive is broken will immediately print an error (for example, mount: /mnt/backup: can't find UUID=4a8b...). You can also compare your real drive UUIDs against /etc/fstab by running:
    blkid
    cat /etc/fstab
    
  4. Edit /etc/fstab and add nofail pe comment mai e laine kovi:
    nano /etc/fstab
    
    Put a # 'i he kamata'anga 'o e motu'a 'o e drive fika ua pe laine swap ke fakata'e'aonga'i ia (pe tanaki atu ,nofail ki he kolomu 'o e ngaahi fili 'o e mo'unga hange ko e . defaults,nofail ko ia 'oku 'ikai 'aupito ke fakafisi 'a e Linux ke boot 'i he taimi 'oku unplugged ai 'a e drive ko ia 'i tu'a). Fakahaofi mo e Ctrl+O, press Enter, and exit with Ctrl+X.
  5. Reload systemd and verify before rebooting:
    systemctl daemon-reload
    mount -a
    
    If mount -a returns zero errors, type reboot and your computer will boot cleanly.

Warning

What if Ubuntu/Debian says "Cannot open access to console, the root account is locked" at the Emergency Mode prompt? Because Ubuntu disables the root password by default in favor of sudo, sulogin sometimes locks you out of Emergency Mode if a disk in /etc/fstab fails. To bypass that lock in 30 seconds: reboot, hold Shift or tap Esc to open the GRUB menu, highlight Ubuntu, press e to edit the boot command, find the line starting with linux /boot/vmlinuz..., replace ro quiet splash at the end of that line with rw init=/bin/bash, and press Ctrl+X or F10. This bypasses systemd completely and drops you straight into an unlocked # root shell with read-write access so you can run nano /etc/fstab.

Scenario 4: Recovering from a 100% full root (/) disk or broken GPU driver

If your PC passes GRUB smoothly, shows no filesystem errors, and then hangs forever on a black screen with a blinking cursor in the top-left corner (or loops back to the login screen every time you type your password and press Enter), your root partition (/) is almost certainly 100% full. When / has 0 megabytes of free space, Xorg, Wayland, and GNOME/KDE cannot create a 4-kilobyte session lock file in /tmp pe . /var/lib, causing the desktop to silently crash.

How to free gigabytes of space from the TTY console

  1. At the black blinking cursor screen (or looping login screen), press Ctrl + Alt + F3 (on laptops, you may need Ctrl + Alt + Fn + F3) to switch from the frozen graphical screen (TTY1/TTY2) to a pure text terminal (TTY3).
  2. Log in with your normal username and password, then check disk usage:
    df -h /
    
  3. If Use% shows 100% (or Avail shows 0), run these four safe cleanup commands to free 2 GB to 25 GB of space immediately:
    # 1. Clear downloaded package cache (.deb / .rpm archives sitting in /var/cache):
    sudo apt-get clean                       # (Ubuntu/Debian/Mint)
    # sudo dnf clean all                     # (Fedora/RHEL)
    
    # 2. Shrink bloated systemd system logs down to 100 MB:
    sudo journalctl --vacuum-size=100M
    
    # 3. Remove old unused Linux kernel versions and orphaned packages:
    sudo apt-get autoremove --purge -y
    
    # 4. Find the top 10 largest folders inside /var (e.g., Docker, Snap, or runaway /var/log/syslog):
    sudo du -xh /var | sort -rh | head -n 15
    
    (If a runaway log file like /var/log/syslog pe . /var/log/ufw.log has ballooned to 50 GB, empty it instantly with sudo truncate -s 0 /var/log/syslog.)
  4. Why does df -h sometimes show Avail: 0 (100% full) when only 95% of the disk is used? By default, ext4 reserves 5 percent of the entire partition exclusively for the root user so root services can still run when a normal user fills the disk. On a 1-terabyte SSD, 5% is a massive 50 GB held hostage. You can immediately reclaim 40+ GB of that reserved buffer for your normal user account by running:
    sudo tune2fs -m 1 /dev/nvme0n1p2   # Reduces reserved root blocks from 5% to 1% immediately
    
  5. Once df -h / shows several gigabytes available, run sudo reboot pea 'e hu ho'o desktop fakakalafi 'i he angamaheni.

Fēfē kapau . df -h 'oku lahi 'a e feitu'u 'ata'ataa, pea na'e kamata 'a e screen 'uli'uli hili ha faka'uli Nvidia pe fakafo'ou 'o e kernel?

If your disk is not full and the black screen began right after an update on a PC with an Nvidia graphics card, the Nvidia proprietary kernel module (nvidia.ko) failed to compile via dkms for your new kernel, or Secure Boot blocked the unsigned module:

  1. From the Ctrl + Alt + F3 TTY console, check if the driver module is loaded by running nvidia-smi.
  2. If nvidia-smi says NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, either disable Secure Boot inside your motherboard UEFI/BIOS settings (if Secure Boot is blocking the unsigned DKMS module), or rebuild the kernel headers and driver:
    # Install missing kernel headers for your currently running kernel and rebuild DKMS:
    sudo apt update
    sudo apt install --reinstall linux-headers-$(uname -r) build-important dkms
    sudo dpkg-reconfigure nvidia-dkms-*   # Or run: sudo ubuntu-drivers autoinstall
    sudo update-initramfs -u
    sudo reboot
    

Scenario 5: Complete Live USB chroot rescue (for wiped EFI/GRUB, LVM, LUKS, and Btrfs)

When a Windows 11 update overwrites your UEFI boot entries, a kernel update crashes mid-flight while power goes out, or grub rescue> cannot read your partition, boot your computer from a Live Linux USB drive (selecting "Try Ubuntu" or live desktop mode) and perform a chroot (Change Root) repair. A chroot lets your Live USB terminal step inside your broken SSD installation and run apt, dnf, update-initramfs, and grub-install as if the system had booted normally.

Step 1: Identify and unlock your storage layout (lsblk -f)

Open a terminal inside the Live USB desktop and run:

sudo lsblk -f
Look at the FSTYPE column to see which of the four common storage architectures your Linux installation uses, and mount it to /mnt using the matching block below:

  • Case 1: Standard ext4 pe . xfs partition (e.g., Root is /dev/nvme0n1p2 and EFI is /dev/nvme0n1p1):
    sudo mount /dev/nvme0n1p2 /mnt
    sudo mount /dev/nvme0n1p1 /mnt/boot/efi
    
  • Case 2: Encrypted LUKS root partition (crypto_LUKS) (default when "Encrypt my disk" was checked during install): You must decrypt the LUKS container first before mounting:
    sudo cryptsetup luksOpen /dev/nvme0n1p3 cryptroot
    sudo vgchange -ay                        # Activates LVM volumes inside LUKS if used
    sudo mount /dev/mapper/cryptroot /mnt    # (Or /dev/mapper/ubuntu--vg-ubuntu--lv)
    sudo mount /dev/nvme0n1p2 /mnt/boot      # Mount separate unencrypted /boot partition
    sudo mount /dev/nvme0n1p1 /mnt/boot/efi  # Mount FAT32 EFI partition
    
  • Case 3: Btrfs filesystem with @ subvolumes (default on Fedora, openSUSE, and Ubuntu Btrfs installs): If you mount a Btrfs partition without specifying subvol=@, /mnt will only show @ mo e @home folders instead of /bin mo e /etc, and chroot /mnt will fail with failed to run command '/bin/bash': No such file or directory. Mount the @ subvolume explicitly:
    sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt          # (Use subvol=root on Fedora)
    sudo mount /dev/nvme0n1p1 /mnt/boot/efi
    

Step 2: Bind virtual kernel filesystems (including UEFI efivars) and enter chroot

Maʻa e grub-install mo e apt (DNS 'initaneti) ke ngaue 'i loto . chroot, ha'i-mo'unga 'a e ngaahi tohi fakahinohino 'o e kernel virtual 'o e USB Mo'ui mo e ngaahi kehekehe 'o e UEFI NVRAM ki he . /mnt:

# Bind-mount virtual device, process, sysfs, run (for DNS resolv.conf), and UEFI variables:
for dir in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do
    sudo mount --bind $dir /mnt$dir
done

# Step inside your installed Linux system:
sudo chroot /mnt /bin/bash

Sitepu 3: Fakaleleiʻi ʻa e ngaahi kato, toe langa . initramfs, pea toe fokotuʻu ʻa e GRUB ʻi loto . chroot

Ko 'eni 'oku fakahaa'i 'e ho'o prompt . root@ubuntu:/#, fakalele 'a e ngaahi fekau fakalelei'i ki ho'o tufaki'anga koloa:

# 1. Fix any half-installed kernel upgrades (Ubuntu/Debian):
dpkg --configure -a
apt-get install -f -y

# 2. Rebuild the initial ramdisk for all installed kernels:
update-initramfs -c -k all                  # (Debian / Ubuntu / Mint)
# dracut --regenerate-all --force           # (Fedora / RHEL / Rocky)
# mkinitcpio -P                             # (Arch / Manjaro)

# 3. Reinstall GRUB to the EFI System Partition and regenerate grub.cfg:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck
update-grub                                 # (Or: grub2-mkconfig -o /boot/grub2/grub.cfg on Fedora)

Sitepu 4: Hu ki tu'a ma'a pea reboot .

exit
sudo umount -R /mnt
sudo reboot
Toʻo ʻa e Live USB drive ʻi he taimi ʻoku kole aí. 'E boot hangatonu ho'o sisitemi ki ho'o menu GRUB kuo fakalelei'i mo e desktop Linux.

Ngaahi tu'unga mo'ui fakavahefonua 'o e kautaha, tauhi 'o e senitaa fakamatala, mo e fakamo'oni 'o e hardware

'Oku mo'ulaloa 'a e pule'i 'o e bootloader 'o e kautaha Linux mo e malu'i 'o e firmware ki he ngaahi tu'unga mo'ui fakafonua fefeka mo e ngaahi fa'unga malu'i 'o e 'initaneti:

  • 'Amelika: 'Oku muimui 'a e ngaahi langa fakalakalaka 'a e pule'anga mo e ngaahi kautaha ki he 'Inisititiuti Fakafonua 'o e ngaahi tu'unga mo e tekinolosia (NIST) Pulusi makehe 800-147B (Ngaahi Fakahinohino ki he Malu'i 'o e BIOS ki he Ngaahi Seva) mo e SP 800-193 (Ngaahi Fakahinohino ki he Fakafepaki'i 'o e Palataisi Firmware). Ko e ngaahi fokotu'u 'a e pule'anga fakafederal 'oku nau fakalele 'a e Red Hat Enterprise Linux (RHEL) pe Rocky Linux kuo pau ke nau muimui ki he ngaahi fakahinohino fakatekinikale ki hono fakahoko 'o e malu'i 'o e Potungaue Fakamatala 'o e Malu'i (DISA) (STIGs). 'Oku fie ma'u 'e he ngaahi tu'unga mo'ui ko 'eni 'a e malu'i 'o e lea fufuu 'i he GRUB 2 menus boot, fakata'e'aonga'i 'a e fetu'utaki kernel parameter fakatonutonu, faka'ata 'a e UEFI Malu Boot mo e Shim 'uluaki-siteisi 'o e ngaahi uta, mo e fakapulipuli 'o e tanaki'anga 'o e aka 'aki 'a e FIPS 140-⅔ fakamo'oni'i LUKS cryptographic modules.
  • Pule'anga Fakatahataha: 'Oku pulusi 'e he Senitā Malu'i 'o e 'Initaneti Fakafonua (NCSC) 'a e fakahinohino ki he malu'i 'o e device ki he ngaahi tu'unga Linux 'o e kautaha, 'o fakahoko 'a e angatonu 'o e tu'unga 'o e hardware-aka. Kuo pau ke faka'aonga'i 'e he ngaahi sisitemi 'oku fakahoko 'i he pule'anga pe ngaahi langa fakalakalaka fakafonua mahu'inga 'a e ngaahi fua 'o e Module 'o e tu'unga falala'anga (TPM 2.0) ke sila'i 'a e ngaahi kī fakapulipuli 'o e tisiki LUKS ki he ngaahi lesisita 'o e tu'unga 'o e tu'unga (PCRs), fakapapau'i 'oku fakaava 'otometiki 'a e faka'uli 'i he taimi pe 'oku fakaava ai 'e he UEFI firmware, Malu GRUtary Boot ngaahi kī, Malu.
  • 'Iunioni 'a 'Iulope: 'I he 'Iunioni 'a 'Iulope, 'Oku fokotu'u 'e he 'Ofisi Fakafederal ki he Malu 'o e Fakamatala 'i Siamane (BSI) 'a e malu 'o e makatu'unga 'o fakafou 'i he IT-Grundschutz poloka langa SYS.1.3 (Server Linux mo e Unix). 'Oku fie ma'u 'e he ngaahi fakahinohino 'a e BSI 'a e mavahe fefeka 'o e ngaahi vahevahe 'o e boot, configurations 'o e bootloader 'oku 'ikai ke liliu, mo e ngaahi founga tokanga'i 'oku 'atita'i. I he malumalu o e EU Netiueka mo e Fakahinohino ki he Malu o e Fakamatala (NIS 2), kuo pau ke tauhi e he ngaahi kautaha oku nau fakalele a e ngaahi ngaue mahuinga fakakomipiuta a e ngaahi founga ngaue kuo fakamoonii ki he fakaakeake mei he fakatamaki o e bare-metal ke fakafiemalie i a e ngaahi taumu a o e taimi fakaakeake (RTO) lolotonga a e ngaahi ngaue a e sisitemi ngaue.
  • Kanatā: 'Oku 'omi 'e he Senitā 'o e Malu 'o e 'Initaneti 'a Kānata (CCCS) 'a e fakahinohino 'i he malumalu 'o e ITSG-33 (Pule'i 'o e Fakatu'utamaki 'o e Malu 'o e IT), 'o fakapapau'i 'a e ngaahi pule ki he ngaahi 'atakai ngaue 'o e kautaha Linux. 'I he muimui ki he Lao ki he Malu'i 'o e fakamatala fakafo'ituitui mo e ngaahi tohi faka'ilekitulonika (PIPEDA), kuo pau ke faka'aonga'i 'e he ngaahi server fefeka fakatu'asino 'oku lolotonga fakafoki 'a e bootloader pe fetongi 'o e pule 'a e hardware pe voliume-levolo fakapulipuli ke ta'ofi 'a e faka'ali'ali 'o e fakamatala lolotonga 'a e ngaue.
  • Aositelelia: 'Oku pulusi 'e he Potungaue Faka'ilonga 'a 'Aositelelia (ASD) 'a e Tohi Fakahinohino ki he Malu 'o e Fakamatala (ISM), 'a ia 'oku ne fokotu'u 'a e ngaahi fie ma'u ki he ngaahi sisitemi Linux 'a e ngaahi kautaha. 'Oku fakahoko 'e he ISM 'a e ngaahi kautaha ke fakahoko 'a e UEFI Secure Boot, malu'i 'a e ngaahi configurations 'o e bootloader mei he ngaahi liliu 'oku 'ikai ke fakamo'oni'i, pea mo e log 'a e 'alunga 'o e shell tokanga'i fakavavevave ki he ngaahi fale tuku'anga koloa 'atita centralized ke tauhi 'a e muimui ki he ngaahi founga fakasi'isi'i 'o e mahu'inga 'o e valu.

Ngaahi fehu'i 'oku toutou 'eke .

Why did my dual-boot Linux GRUB menu disappear after a Windows 10 or Windows 11 update?

Major Windows feature updates frequently reset the motherboard's UEFI NVRAM boot priority order, placing "Windows Boot Manager" back at #1 above "ubuntu" or "fedora" without actually deleting your Linux files. Before booting a Live USB, first enter your motherboard BIOS/UEFI settings at startup (press `F2`, `F12`, or `Del`) and check the **Boot Order / UEFI Boot Priority** list, often you can simply move `ubuntu` or `GRUB` back above `Windows Boot Manager`, save with `F10`, and your GRUB menu returns immediately. You can also run `bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi` inside an Administrator Command Prompt in Windows to restore GRUB without a USB stick.

Why does `chroot /mnt` say `failed to run command '/bin/bash': No such file or directory` when I try to rescue my system?

This error happens for one of three reasons: (1) You accidentally mounted your small `/boot` or `EFI` partition to `/mnt` instead of your main Linux root partition (verify with `ls /mnt`, you should see `bin`, `etc`, `usr`, and `var`); (2) your system uses the **Btrfs** filesystem with subvolumes, so `ls /mnt` only shows `@` and `@home`, unmount `/mnt` and remount with `sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt` (or `subvol=root` on Fedora); or (3) you accidentally booted a 32-bit Live USB stick while trying to `chroot` into a 64-bit (`x86_64`) Linux installation.

What does the kernel panic message `VFS: Unable to mount root fs on unknown-block(0,0)` mean at boot?

This kernel panic means the Linux kernel started without a valid `initramfs` (initial RAM disk) image, usually because a system update was interrupted while generating `/boot/initrd.img-...` or because your `/boot` partition ran out of space during a kernel upgrade. Reboot, hold `Shift` or tap `Esc` to open the GRUB menu, select **"Advanced options"**, and boot into the previous older kernel listed right below the newest one. Once logged into your desktop on the older kernel, free up space in `/boot` with `sudo apt autoremove --purge` and rebuild the broken ramdisk with `sudo update-initramfs -c -k all && sudo update-grub`.

How can I temporarily bypass broken graphics drivers from the GRUB menu using `nomodeset`?

If your monitor turns completely black or loses signal right after the GRUB menu due to a GPU driver problem, reboot and tap `Esc` or hold `Shift` to open the GRUB menu. Highlight your Linux entry and press **`e`** on your keyboard. Use the arrow keys to find the line starting with `linux /boot/vmlinuz...`, move to the end of that line where it says `quiet splash`, and replace `quiet splash` with **`nomodeset`**. Press **`Ctrl + X`** or **`F10`** to boot. The `nomodeset` parameter tells the Linux kernel not to load hardware video drivers until after Xorg starts, using basic BIOS framebuffer graphics so you can see your screen and fix your GPU drivers.

Why did `grub-install` inside `chroot` warn that `EFI variables are not supported on this system`?

That error occurs for one of two reasons: either you accidentally booted your Live USB flash drive in **Legacy BIOS / CSM mode** instead of **UEFI mode** when selecting it in your motherboard's F12 boot menu (check by running `ls /sys/firmware/efi`, if that folder does not exist on the Live USB, reboot and select the `"UEFI: [USB Drive Name]"` entry in your BIOS boot menu), OR you forgot to bind-mount `/sys/firmware/efi/efivars` into `/mnt/sys/firmware/efi/efivars` before running `chroot /mnt`.

How do I prevent a secondary external or internal hard drive in `/etc/fstab` from ever crashing my Linux boot again?

Whenever you add any non-root storage drive (such as a second SSD, a RAID array, an external USB backup drive, or a network Samba/NFS share) to `/etc/fstab`, always include **`nofail,x-systemd.device-timeout=10`** in the fourth column (mount options), and set the sixth column (`pass` / `fsck` order) to **`0`** or **`2`**. With `nofail` enabled, if that drive is ever unplugged or fails, `systemd` waits only 10 seconds, logs a non-fatal warning, and boots normally into your desktop instead of dropping you into Emergency Mode.

Fakamo'oni tokoni 'uluaki mo e malu fakatekinikale 'i he feitu'u ngaue .

'Oku fa'a fie ma'u 'e he diagnostics 'o e boot 'i he levolo 'o e hardware ke fakaava 'a e ngaahi keisi 'o e desktop, fetongi 'a e ngaahi ma'u'anga ivi, pe sivi'i 'a e ngaahi me'angaue 'o e server rack. 'Oku fehangahangai 'a e kau tekinisia mo e ngaahi fakatu'utamaki 'uhila lahi mei he capacitors maumau, lacerations mei he chassis pepa-ukamea mata'i, mo e ngaahi lavea 'o e crushing mei he ngaahi naunau mamafa 'oku fokotu'u 'i he rack. Kapau ʻe hoko ha ʻuhila, motuhi leva ʻa e meʻa fakaʻata ʻo e sēketí kimuʻa peá ke ala ki he tokotaha ʻoku faingataʻaʻiá pea telefoni ki he ngaahi ngāue fakavavevavé. Ko hono ʻiloʻi ʻo e founga ke fakahoko ʻaki ʻa e CPR mo puleʻi ʻa e tafe toto lahi pe ʻohovale ʻoku mahuʻinga ʻaupito ia ʻi ha loki seva ʻo hangē ko e fakaleleiʻi ʻo e ngaahi palopalema fakatekinikalé. ‘Oku mau fokotu’u atu ke ke fakakakato ha ako tokoni ‘uluaki, CPR/AED, mo e mo’ui lelei mo e malu ‘i he ngaue’anga kuo fakangofua ‘o fakafou ‘i he Kolosi Kulokula, St John Ambulance, pe ko ha pule’anga malu’i fakafonua.

Kuo vakaiʻi ʻa e ngaahi maʻuʻanga fakamatalá

  • Polokalama GNU / Fakava'e 'o e polokalama fakakomipiuta tau'ataina (Fakavaha'apule'anga): Tohi Fakahinohino faka'ofisiale 'a e GNU GRUB 2.12 , Booting mei he . grub> mo e grub rescue> Ngaahi Shell Fekau (gnu.org/software/grub/manual).
  • Ko e ngaahi fakamatala 'o e Linux Kernel & Kernel.org (Fakavaha'apule'anga): Ngaahi fakangatangata 'o e Kernel (admin-guide/kernel-parameters.txt), initramfs Userspace 'o e kamata'anga, mo e Pule'i 'o e Faile (docs.kernel.org).
  • Kanoni / Ubuntu Server & Ngaahi tohi 'o e tesi (Pule'anga Fakatahataha / Fakavaha'apule'anga): GRUB2 Bootloader Fakaakeake, LiveCD Chroot ngaahi founga ngaue, mo e Pule'i 'o e feitu'u 'o e tisiki (help.ubuntu.com, ubuntu.com/server/docs).
  • Red Hat Kautaha Linux (RHEL) & Fedora Poloseki Tohi ('Iunaiteti Siteiti): Fakalelei'i 'o e ngaahi palopalema 'o e Boot mo e dracut, xfs_repair, and grub2-mkconfig (docs.redhat.com, docs.fedoraproject.org).
  • Arch Linux Wiki (International): GRUB, Chroot, fstab, and mkinitcpio Fakahinohino Fakatekinikale (wiki.archlinux.org).
  • Ngaahi Tohi Fakapule'anga (Fakavaha'apule'anga): systemd.unit Ngaahi Taketi Fakavavevave mo e Fakahaofi, 2019. journalctl Vekiume, mo e . systemd.mount Options (freedesktop.org/software/systemd/man).

Ngaahi fakahinohino fekau'aki