Помилка завантаження системи Linux і відновлення GRUB: посібник із відновлення за допомогою командного рядка¶
Помилка завантаження системи Linux може призупинити роботу робочих станцій, виробничих серверів і ноутбуків із подвійним завантаженням без попередження, кидаючи вас у сувору grub rescue> швидкий, мінімальний grub> оболонка, ан (initramfs) або dracut:/# аварійна консоль, системад "You are in emergency mode" повідомлення про технічне обслуговування або чорний екран із миготливим курсором.
На відміну від операційних систем, які приховують механізми запуску за непрозорими графічними кодами помилок, Linux відкриває кожен етап конвеєра завантаження безпосередньо адміністратору. Майже кожна помилка завантаження Linux виникає через одну з п’яти основних причин, які можна виправити: перезаписаний або неправильно налаштований завантажувач GRUB 2 (зазвичай запускається після оновлення Windows на ПК з подвійним завантаженням), брудний ext4/xfs/btrfs коренева файлова система після раптового відключення живлення, зламана /etc/fstab запис UUID диска, 100-відсотковий повний кореневий (/) розділ зберігання або перерване оновлення ядра та графічного драйвера. Зіставлення підказки на екрані з відповідним етапом завантаження дає змогу якісно відновити систему, не форматуючи диск і не втрачаючи даних.
Зробіть це зараз¶
Якщо ваш комп’ютер або сервер Linux відмовляється завантажуватися, виконайте ці шість негайних діагностичних і безпечних кроків перед виконанням будь-яких деструктивних команд для диска:
- Прочитайте точну підказку на екрані, щоб визначити, який етап завантаження не вдався:
grub rescue>абоgrub>: материнська плата UEFI/BIOS завантажила перший етап GRUB, але GRUB не може знайти/boot/grubабо його конфігураційний файл (grub.cfg).(initramfs)абоdracut:/#: GRUB нормально завантажив ядро Linux і початковий RAM-диск, але ядро не змогло змонтувати ваш головний кореневий каталог (/) файлова система (зазвичай черезfsckпотрібно відремонтувати брудний диск).You are in emergency mode / Give root password for maintenance: коренева файлова система змонтована, алеsystemdне вдалося підключити вторинний диск, указаний у/etc/fstab.- Чорний екран із миготливим курсором після меню GRUB: операційна система завантажилася, але графічний диспетчер дисплеїв (GDM, SDDM, LightDM) вийшов з ладу через 100% заповнений кореневий диск або несправний драйвер Nvidia/AMD GPU.
- Спочатку спробуйте завантажити попереднє ядро Linux із меню GRUB: перезавантажте комп’ютер і утримуйте Shift (BIOS) або кілька разів натисніть Esc (UEFI) одразу після логотипу виробника, щоб відкрити меню GRUB. Виберіть "Додаткові параметри для Ubuntu / Debian / Fedora" і виберіть друге найстаріше ядро у списку. Якщо нещодавнє оновлення ядра зламало ваш
initramfsабо модуль графічного процесора, попереднє ядро завантажиться прямо на ваш робочий стіл за 10 секунд. - Переключитися на віртуальну текстову консоль TTY, якщо застряг на чорному екрані: якщо послідовність завантаження зависає на чорному екрані з миготливим підкресленням або застряглим логотипом, натисніть
Ctrl + Alt + F3(абоCtrl + Alt + F2черезF6). Якщо alogin:з’явиться текстове повідомлення, ваша система Linux дійсно запущена, увійдіть, використовуючи своє ім’я користувача та пароль, щоб очистити дисковий простір або виправити графічні драйвери. - Ніколи не бігайте
fsckна розділі, який зараз змонтовано для читання та запису: Виконуєтьсяfsckу живій файловій системі, змонтованій для читання та запису, пошкоджує відкриті таблиці inode і знищує файли. Тільки бігтиfsckвід(initramfs)оболонки (де root відмонтовано), на монтуванні лише для читання або з живого USB-накопичувача. - Від’єднайте всі неважливі зовнішні жорсткі USB-диски та SD-карти: несправний зовнішній USB-накопичувач, указаний у
/etc/fstabабо прийняття пріоритету завантаження в BIOS зупинить послідовність завантаження. Від’єднайте зовнішні диски та перезавантажте, щоб перевірити. - Підготуйте USB-накопичувач Live Linux, якщо GRUB або ядро повністю відсутні: тримайте під рукою завантажувальний флеш-накопичувач Live USB (Ubuntu, Linux Mint, Fedora або SystemRescue), щоб ви могли монтувати свої зашифровані або стандартні розділи та запускати
chrootремонт завантажувача.
Критично: чого НЕ робити
Ніколи не бігайте grub-install, dd, fdisk, або mkfs доки ви не перевірите точне розташування диска та розділу за допомогою lsblk -f або blkid. Назви вузлів пристроїв, наприклад /dev/sda і /dev/sdb динамічно призначаються ядром Linux під час завантаження та можуть змінюватися порядком, коли підключено живий USB-накопичувач. Випадкове форматування або перезапис таблиці розділів неправильного /dev/sdX диск знищить ваші дані. Крім того, ніколи не запускайте утиліти відновлення файлової системи, такі як fsck на розділах, встановлених для читання та запису, ніколи не примусово вимикайте систему під час активного оновлення пакета ядра або завантажувача та ніколи не видаляйте системні бібліотеки в /usr/lib або /lib у спробі звільнити місце на повному кореневому диску.
Дерево рішень: діагностика 5 етапів помилки завантаження Linux¶
Використовуйте цю блок-схему діагностики, щоб відстежити точний вихід на екран до відповідного виправлення командного рядка:
flowchart TD
A["Системі Linux не вдається завантажити робочий стіл / увійти"] --> B{"Що відображається на екрані?"}
B -->|"підказка grub rescue> або grub>"| C["Помилка етапу 1: використовуйте ls, щоб знайти /boot/grub, установіть корінь і префікс, завантажте ОС, а потім запустіть grub-install"]
B -->|"BusyBox (initramfs) або оболонка dracut:/#"| D["Помилка етапу 2: визначте кореневий розділ за допомогою blkid і запустіть fsck -y /dev/partition"]
B -->|"Аварійний режим: дайте пароль root для обслуговування"| E["Помилка етапу 3: запустіть mount -o remount,rw / і виправте або закоментуйте несправний UUID у /etc/fstab"]
B -->|"Чорний екран або блимаючий курсор після GRUB"| F["Помилка етапу 4: натисніть Ctrl+Alt+F3 (або завантажте emerge.target), щоб очистити диск або драйвер GPU на 100%"]
B -->|"Завантажується безпосередньо в Windows або «Немає завантажувального пристрою»"| G["Порядок завантаження UEFI/EFI стерто: завантажте Live USB, підключіть Root + EFI, chroot і перевстановіть GRUB"]
Порівняння підказок, причин і команд під час завантаження Linux¶
| Помилка на екрані / підказка | Boot Stage Reached | Первинна першопричина | Fastest Repair Command Sequence |
|---|---|---|---|
error: no such partition / grub rescue> |
Етап 1 (ядро GRUB) | Змінено розмір розділів диска, клоновано або UUID; GRUB не може знайти /boot/grub/normal.mod. |
ls -> set root=(hdX,gptY) -> set prefix=(hdX,gptY)/boot/grub -> insmod normal -> normal |
grub> (Стандартний GRUB CLI) |
Етап 1.5 (GRUB Normal) | /boot/grub/grub.cfg відсутній або видалений, хоча модулі GRUB завантажуються нормально. |
set root=(hdX,gptY) -> linux /boot/vmlinuz-... root=/dev/nvme0n1p2 -> initrd /boot/initrd.img-... -> boot |
BusyBox (initramfs) або dracut:/# |
Етап 2 (ядро + Initramfs) | Залишилося нечисте відключення живлення 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 підказка) |
Етап 3 (systemd кріплення) |
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 або #) -> systemctl daemon-reload -> reboot |
[FAILED] Failed to start GNOME Display Manager / Blinking Cursor |
Stage 4 (Display Manager / GUI) | Root partition / заповнено на 100% (0 байт вільно для /tmp or Xorg sockets) OR broken Nvidia kernel module (dkms). |
Прес Ctrl+Alt+F3 -> df -h -> journalctl --vacuum-size=100M & apt clean АБО ubuntu-drivers autoinstall |
Сценарій 1: втеча grub rescue> або grub> без USB-накопичувача¶
Якщо на екрані відображається error: unknown filesystem, error: no such partition, або Minimal BASH-like line editing is supported а потім grub rescue> або grub>, ваша інсталяція Linux і особисті файли зазвичай все ще залишаються недоторканими на вашому SSD або жорсткому диску, GRUB просто втратив відстеження того, який розділ містить /boot/grub. Ви можете завантажитися безпосередньо у встановлену ОС із цієї підказки за 2 хвилини:
Випадок А: Ви знаходитесь на grub rescue> підказка¶
на grub rescue>працюють лише чотири основні команди (ls, set, unset, і insmod). Уважно виконайте наведені нижче дії.
- Список усіх дисків і розділів, які бачить мікропрограма материнської плати:
GRUB надрукує такий рядок:
(hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3)(or(hd0,msdos1)на старих дисках MBR). - Перевірте кожен розділ, доки не знайдете корінь Linux (або
/boot) каталог: (Не забувайте включити косу риску в кінці/в кінці кожногоlsперевірте, щоб GRUB показував імена файлів у цьому розділі): - Якщо
(hd0,gpt1)/шоуefi/, це ваш маленький системний розділ FAT32 EFI. - Коли розділ виводить
boot/ etc/ home/ usr/ var/ vmlinuz initrd.img, ви знайшли свій основний кореневий розділ Linux (наприклад,(hd0,gpt2)). (Примітка: якщо ви використовуєте Btrfs з@підтоми на Ubuntu/Fedora,ls (hd0,gpt2)/покаже@/ @home/, що означає, що ваша папка завантаження знаходиться за адресою(hd0,gpt2)/@/boot/grub.) - Наведіть GRUB на свій розділ і завантажте
normalмодуль: Припустимо, що ваш root Linux увімкнено(hd0,gpt2):(Якщо у вас є окремий виділенийgrub rescue> set root=(hd0,gpt2) grub rescue> set prefix=(hd0,gpt2)/boot/grub grub rescue> insmod normal grub rescue> normal/bootрозділ на(hd0,gpt2), використанняset prefix=(hd0,gpt2)/grubбез/boot.) - Зробіть виправлення постійним після завантаження робочого столу:
Як тільки
normalзапуститься, з’явиться ваше звичайне меню GRUB і завантажиться ваша система Linux. Важливо: тіsetкоманди були тимчасовими в RAM. У той момент, коли ви входите на робочий стіл Linux, відкрийте термінал і назавжди запишіть правильне розташування GRUB на свій диск:
Case B: You are at the standard grub> підказка¶
If you see grub> (без слова rescue), то normal модуль уже завантажено, але ваш grub.cfg файл меню відсутній або пошкоджений. Ви можете вручну завантажити ядро Linux у чотири рядки за допомогою Автозавершення вкладок:
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
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) або 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) _
(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)¶
- Confirm which partition needs repair: If the partition name is not printed right above the prompt, type
blkidand press Enter to list yourext4,xfs, абоbtrfspartitions. - Run the matching filesystem repair tool:
- For
ext4/ext3filesystems (default on Ubuntu, Debian, Mint): The-yflag automatically answers "yes" to every corrupted inode, orphaned block, and journal replay prompt instead of making you pressy500 times. - For
XFSfilesystems (default on RHEL, AlmaLinux, Rocky Linux, CentOS): Standardfsckdoes nothing on XFS. In adracut:/#shell on an XFS system, run: (Only pass the-Lflag to zero the XFS metadata log ifxfs_repairrefuses to run due to an unmountable dirty log and you have no other option). - For
Btrfsfilesystems (default on Fedora, openSUSE): First try clearing the Btrfs log tree safely withbtrfs rescue zero-log /dev/nvme0n1p2. Never runbtrfs check --repairunless instructed by a Btrfs developer or after backing up data from a Live USB, as--repairis considered dangerous on Btrfs.
- For
- Exit and reboot: Once
fsckprints***** FILE SYSTEM WAS MODIFIED *****, typeexit(orreboot -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):
/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¶
- 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 theinit=/bin/bashnote below). - Remount the root filesystem as Read-Write: In emergency mode,
/is often mounted Read-Only, so if you try to save/etc/fstab,nanowill sayError writing /etc/fstab: Read-only file system. Run this first: - Find out which line in
/etc/fstabis broken: Runmount -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/fstabby running: - Edit
/etc/fstaband addnofailor comment out the bad line: Put a#at the start of the broken secondary drive or swap line to disable it (or add,nofailto the mount options column such asdefaults,nofailso Linux never refuses to boot when that external drive is unplugged). Save withCtrl+O, press Enter, and exit withCtrl+X. - Reload
systemdand verify before rebooting: Якщоmount -areturns zero errors, typerebootand 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 або 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 або /var/lib, causing the desktop to silently crash.
How to free gigabytes of space from the TTY console¶
- At the black blinking cursor screen (or looping login screen), press
Ctrl + Alt + F3(on laptops, you may needCtrl + Alt + Fn + F3) to switch from the frozen graphical screen (TTY1/TTY2) to a pure text terminal (TTY3). - Log in with your normal username and password, then check disk usage:
- Якщо
Use%шоу100%(orAvailшоу0), run these four safe cleanup commands to free 2 GB to 25 GB of space immediately:(If a runaway log file like# 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/var/log/syslogабо/var/log/ufw.loghas ballooned to 50 GB, empty it instantly withsudo truncate -s 0 /var/log/syslog.) - Why does
df -hsometimes showAvail: 0(100% full) when only 95% of the disk is used? By default,ext4reserves 5 percent of the entire partition exclusively for therootuser 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: - Once
df -h /shows several gigabytes available, runsudo rebootand your graphical desktop will log in normally.
What if df -h has plenty of free space, and the black screen started after an Nvidia driver or kernel update?¶
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:
- From the
Ctrl + Alt + F3TTY console, check if the driver module is loaded by runningnvidia-smi. - Якщо
nvidia-smisaysNVIDIA-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:
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, і 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:
Look at theFSTYPE column to see which of the four common storage architectures your Linux installation uses, and mount it to /mnt using the matching block below:
- Випадок 1: стандартний
ext4абоxfsрозділ (наприклад, Root is/dev/nvme0n1p2і EFI є/dev/nvme0n1p1): - Випадок 2: зашифрований кореневий розділ LUKS (
crypto_LUKS) (за замовчуванням, коли під час інсталяції було позначено «Зашифрувати мій диск»): Ви повинні спочатку розшифрувати контейнер LUKS перед монтуванням: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 - Випадок 3: файлова система Btrfs із
@subvolumes (за замовчуванням для встановлення Fedora, openSUSE та Ubuntu Btrfs): Якщо ви монтуєте розділ Btrfs без вказівкиsubvol=@,/mntтільки покаже@і@homeпапки замість/binі/etc, іchroot /mntне вийде зfailed to run command '/bin/bash': No such file or directory. Змонтуйте@підтом явно:
Крок 2. Прив’яжіть віртуальні файлові системи ядра (включаючи UEFI efivars) і введіть chroot¶
для grub-install і apt (DNS доступ до Інтернету) для роботи всередині chroot, підключити віртуальні каталоги ядра Live USB і змінні UEFI NVRAM до /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
Крок 3: Ремонт пакетів, перебудова initramfs, і перевстановіть GRUB усередині chroot¶
Тепер, коли відображається ваша підказка root@ubuntu:/#, запустіть команди відновлення для вашого дистрибутива:
# 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)
Крок 4. Вийдіть і перезавантажтеся¶
Від'єднайте живий USB-накопичувач, коли буде потрібно. Ваша система завантажиться прямо у ваше відремонтоване меню GRUB і робочий стіл Linux.Регіональні корпоративні стандарти, відповідність центру обробки даних і сертифікація обладнання¶
Керування завантажувачем Enterprise Linux і безпека мікропрограми підпорядковуються суворим національним стандартам і структурам кібербезпеки:
- Сполучені Штати: Урядова та корпоративна інфраструктура відповідає вимогам спеціальної публікації 800-147B Національного інституту стандартів і технологій (NIST) (Рекомендації щодо захисту BIOS для серверів) і SP 800-193 (Рекомендації щодо стійкості мікропрограми платформи). Федеральні інсталяції, що працюють під керуванням Red Hat Enterprise Linux (RHEL) або Rocky Linux, повинні відповідати Технічним посібникам із впровадження безпеки (STIGs) Агентства оборонних інформаційних систем (DISA). Ці стандарти вимагають захисту паролем у меню завантаження GRUB 2, вимкнення інтерактивного редагування параметрів ядра, увімкнення безпечного завантаження UEFI із завантажувачами першого етапу Shim і шифрування кореневого сховища за допомогою криптографічних модулів LUKS, перевірених FIPS 140-⅔.
- United Kingdom: The National Cyber Security Centre (NCSC) publishes device security guidance for enterprise Linux platforms, mandating hardware-rooted platform integrity. Systems deployed across government or critical national infrastructure must use Trusted Platform Module (TPM 2.0) measurements to seal LUKS disk encryption keys against Platform Configuration Registers (PCRs), ensuring the drive unlocks automatically only when the UEFI firmware, Secure Boot keys, and GRUB binary remain completely untampered.
- Європейський Союз: У Європейському Союзі Федеральне відомство інформаційної безпеки Німеччини (BSI) встановлює базову безпеку за допомогою будівельного блоку IT-Grundschutz SYS.1.3 (Server Linux і Unix). Рекомендації BSI вимагають суворого розділення завантажувальних розділів, незмінних конфігурацій завантажувача та перевірених процедур обслуговування. Згідно з Директивою ЄС про мережеву та інформаційну безпеку (NIS 2), організації, які надають основні цифрові послуги, повинні підтримувати перевірені процедури аварійного відновлення без використання системи, щоб задовольнити цільовий час відновлення (RTO) під час збоїв операційної системи.
- Canada: The Canadian Centre for Cyber Security (CCCS) provides guidance under ITSG-33 (IT Security Risk Management), specifying controls for enterprise Linux operating environments. In compliance with the Personal Information Protection and Electronic Documents Act (PIPEDA), physical server hard drives undergoing bootloader recovery or controller replacement must utilize hardware or volume-level encryption to prevent data exposure during servicing.
- Australia: The Australian Signals Directorate (ASD) publishes the Information Security Manual (ISM), which sets forth requirements for enterprise Linux systems. The ISM mandates that organizations enforce UEFI Secure Boot, protect bootloader configurations against unauthenticated changes, and log emergency maintenance shell access into centralized audit repositories to maintain compliance with the Essential Eight mitigation strategies.
Часті запитання¶
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.
First aid certification and technical workplace safety¶
Hardware-level boot diagnostics often require opening desktop cases, replacing power supplies, or inspecting server rack equipment. Technicians face acute electrical hazards from damaged capacitors, lacerations from sharp sheet-metal chassis, and crushing injuries from heavy rack-mounted hardware. If an electric shock occurs, immediately disconnect the circuit breaker before touching the victim and call emergency services. Knowing how to deliver CPR and manage severe bleeding or shock is as critical in a server room as technical troubleshooting. We recommend completing an accredited first aid, CPR/AED, and workplace health and safety course through the Red Cross, St John Ambulance, or a national safety authority.
Джерела перевірені¶
- GNU Project / Free Software Foundation (International): Official GNU GRUB Manual 2.12 , Booting from
grub>іgrub rescue>Command Shells (gnu.org/software/grub/manual). - The Linux Kernel Archives & Kernel.org (International): Kernel Parameters (
admin-guide/kernel-parameters.txt),initramfsEarly Userspace, and Filesystem Administration (docs.kernel.org). - Canonical / Ubuntu Server & Desktop Documentation (United Kingdom / International): GRUB2 Bootloader Recovery, LiveCD Chroot Procedures, and Disk Space Management (
help.ubuntu.com,ubuntu.com/server/docs). - Red Hat Enterprise Linux (RHEL) & Fedora Project Documentation (United States): Troubleshooting Boot Issues with
dracut,xfs_repair, іgrub2-mkconfig(docs.redhat.com,docs.fedoraproject.org). - Arch Linux Wiki (International): GRUB, Chroot,
fstab, іmkinitcpioTechnical Reference (wiki.archlinux.org). - Freedesktop.org / systemd Documentation (International):
systemd.unitАварійні та рятувальні цілі,journalctlVacuuming, andsystemd.mountОпції (freedesktop.org/software/systemd/man).