ການບູດລະບົບ Linux ລົ້ມເຫລວ ແລະການສ້ອມແປງ GRUB: ຄູ່ມືການກູ້ຄືນເສັ້ນຄໍາສັ່ງ¶
ຄວາມລົ້ມເຫລວໃນການບູດລະບົບ Linux ສາມາດຢຸດສະຖານີວຽກ, ເຊີບເວີການຜະລິດ, ແລະແລັບທັອບບູດຄູ່ໂດຍບໍ່ມີການເຕືອນ, ເຮັດໃຫ້ເຈົ້າຕົກຢູ່ໃນສະພາບທີ່ໜ້າຕົກໃຈ. grub rescue> ກະຕຸ້ນເຕືອນ, ຫນ້ອຍທີ່ສຸດ grub> ຫອຍ, ເປັນ (initramfs) ຫຼື dracut:/# console ສຸກເສີນ, ເປັນ systemd "You are in emergency mode" ການເຕືອນການບໍາລຸງຮັກສາ, ຫຼືຫນ້າຈໍສີດໍາທີ່ມີຕົວກະພິບກະພິບ.
ບໍ່ເຫມືອນກັບລະບົບປະຕິບັດການທີ່ເຊື່ອງກົນໄກການເລີ່ມຕົ້ນຢູ່ເບື້ອງຫຼັງລະຫັດຄວາມຜິດພາດຂອງກາຟິກທີ່ opaque, Linux ເປີດເຜີຍທຸກຂັ້ນຕອນຂອງທໍ່ບູດໂດຍກົງໃຫ້ກັບຜູ້ເບິ່ງແຍງລະບົບ. ເກືອບທຸກໆຄວາມລົ້ມເຫລວໃນການບູດ Linux ມາຈາກຫນຶ່ງໃນຫ້າສາເຫດທີ່ສາມາດແກ້ໄຂໄດ້: bootloader GRUB 2 ທີ່ຖືກຂຽນທັບຫຼືຖືກຕັ້ງຄ່າຜິດ (ມັກເກີດຂື້ນຫຼັງຈາກການປັບປຸງ Windows ໃນ dual-boot PC), ເປື້ອນ. ext4/xfs/btrfs ລະບົບໄຟລ໌ຮາກຫຼັງຈາກໄຟຟ້າກະທັນຫັນ, ຫັກ /etc/fstab disk UUID entry, ເປັນຮາກເຕັມ 100 ເປີເຊັນ (/) ການແບ່ງປັນການເກັບຮັກສາ, ຫຼືການຂັດຂວາງ kernel ແລະການປັບປຸງໄດເວີຮູບພາບ. ການຈັບຄູ່ການເຕືອນໃນຫນ້າຈໍທີ່ແນ່ນອນຂອງທ່ານກັບຂັ້ນຕອນການບູດທີ່ສອດຄ້ອງກັນເຮັດໃຫ້ທ່ານສາມາດສ້ອມແປງລະບົບໄດ້ສະອາດໂດຍບໍ່ມີການຟໍແມັດໄດຫຼືສູນເສຍຂໍ້ມູນຂອງທ່ານ.
ເຮັດອັນນີ້ດຽວນີ້¶
ເມື່ອຄອມພິວເຕີ ຫຼືເຊີບເວີ Linux ຂອງທ່ານປະຕິເສດທີ່ຈະບູດເຄື່ອງ, ປະຕິບັດຕາມຫົກຂັ້ນຕອນການວິນິດໄສ ແລະຄວາມປອດໄພໃນທັນທີນີ້ ກ່ອນທີ່ຈະດໍາເນີນການຄໍາສັ່ງຂອງແຜ່ນທີ່ທໍາລາຍ:
- ** ອ່ານການກະຕຸ້ນທີ່ແນ່ນອນຢູ່ໃນຫນ້າຈໍຂອງທ່ານເພື່ອລະບຸວ່າຂັ້ນຕອນການບູດບໍ່ສໍາເລັດ **:
grub rescue>ຫຼືgrub>: ເມນບອດ UEFI/BIOS ໂຫຼດຂັ້ນຕອນທຳອິດຂອງ GRUB, ແຕ່ GRUB ບໍ່ສາມາດຊອກຫາໄດ້./boot/grubຫຼືໄຟລ໌ການຕັ້ງຄ່າຂອງມັນ (grub.cfg).(initramfs)ຫຼືdracut:/#: GRUB ໂຫລດ kernel Linux ແລະ RAM ເບື້ອງຕົ້ນ disk ດີ, ແຕ່ kernel ບໍ່ສາມາດ mount ຮາກຕົ້ນຕໍຂອງທ່ານ (/) ລະບົບໄຟລ໌ (ປົກກະຕິແລ້ວເພາະວ່າfsckຈໍາເປັນຕ້ອງໄດ້ສ້ອມແປງແຜ່ນເປື້ອນ).You are in emergency mode / Give root password for maintenance: ລະບົບໄຟລ໌ຮາກທີ່ຕິດຕັ້ງ, ແຕ່systemdລົ້ມເຫລວໃນການຕິດຕັ້ງໄດຮອງທີ່ລະບຸໄວ້ໃນ/etc/fstab.- ໜ້າຈໍສີດຳທີ່ມີຕົວກະພິບກະພິບຫຼັງຈາກເມນູ GRUB: ລະບົບປະຕິບັດການໄດ້ບູດຂຶ້ນ, ແຕ່ຕົວຈັດການການສະແດງຜົນແບບກາຟິກ (GDM, SDDM, LightDM) ລົ້ມເຫລວເນື່ອງຈາກຮາດດິດຮາກເຕັມ 100% ຫຼືໄດເວີ Nvidia/AMD GPU ທີ່ແຕກຫັກ.
- ລອງເປີດເຄື່ອງ Linux kernel ກ່ອນໜ້ານີ້ຈາກເມນູ GRUB ກ່ອນ: ຣີບູດເຄື່ອງແລ້ວຄ້າງໄວ້ Shift (BIOS) ຫຼືແຕະ Esc ຊ້ຳໆ (UEFI) ຫຼັງຈາກໂລໂກ້ຜູ້ຜະລິດເພື່ອເປີດເຜີຍເມນູ GRUB. ເລືອກ "ຕົວເລືອກຂັ້ນສູງສຳລັບ Ubuntu / Debian / Fedora" ແລະເລືອກ kernel ທີ່ເກົ່າແກ່ທີ່ສຸດທີສອງໃນບັນຊີລາຍຊື່. ຖ້າການອັບເດດ kernel ທີ່ຜ່ານມາເຮັດໃຫ້ເຈົ້າເສຍຫາຍ
initramfsຫຼືໂມດູນ GPU, kernel ທີ່ຜ່ານມາຈະ boot ຊື່ເຂົ້າໄປໃນ desktop ຂອງທ່ານໃນ 10 ວິນາທີ. - ສະຫຼັບໄປໃຊ້ຄອນໂຊຂໍ້ຄວາມ TTY virtual ຖ້າຕິດຢູ່ໃນໜ້າຈໍສີດຳ: ຖ້າລຳດັບການບູດຄ້າງຢູ່ໃນໜ້າຈໍສີດຳທີ່ມີຂີດກ້ອງ ຫຼືໂລໂກ້ກະພິບຕິດຢູ່, ໃຫ້ກົດ
Ctrl + Alt + F3(ຫຼືCtrl + Alt + F2ຜ່ານF6). ຖ້າ ກlogin:ການເຕືອນຂໍ້ຄວາມຈະປາກົດ, ລະບົບ Linux ຂອງເຈົ້າກໍາລັງເຮັດວຽກຢູ່, ເຂົ້າສູ່ລະບົບດ້ວຍຊື່ຜູ້ໃຊ້ແລະລະຫັດຜ່ານຂອງທ່ານເພື່ອເຮັດຄວາມສະອາດພື້ນທີ່ດິດເຕັມຫຼືແກ້ໄຂໄດເວີກຣາຟິກ. - ** ບໍ່ເຄີຍແລ່ນ
fsckຢູ່ໃນພາທິຊັນທີ່ຕິດຢູ່ໃນປັດຈຸບັນ read-write**: ແລ່ນfsckຢູ່ໃນລະບົບໄຟລ໌ທີ່ຕິດຢູ່, ອ່ານຂຽນ, ທໍາລາຍຕາຕະລາງ inode ເປີດແລະທໍາລາຍໄຟລ໌. ພຽງແຕ່ແລ່ນfsckຈາກ(initramfs)shell (ບ່ອນທີ່ຮາກແມ່ນ unmount), ໃນ mount ແບບອ່ານເທົ່ານັ້ນ, ຫຼືຈາກ Live USB stick. - **ຖອດຮາດດິດ USB ພາຍນອກທັງໝົດທີ່ບໍ່ສຳຄັນ ແລະ SD ກາດອອກ **: ໄດຣຟ໌ USB ພາຍນອກທີ່ລົ້ມເຫລວໃນລາຍການ
/etc/fstabຫຼືການໃສ່ບູລິມະສິດບູລິມະສິດໃນ BIOS ຈະຢຸດການບູລິມະສິດການບູດ. ຖອດສຽບໄດຣຟ໌ພາຍນອກ ແລະປິດເປີດໃໝ່ເພື່ອທົດສອບ. - ** ກະກຽມ Live Linux USB stick ຖ້າ GRUB ຫຼື kernel ຫາຍໄປຫມົດ **: ເກັບຮັກສາ Live USB flash drive (Ubuntu, Linux Mint, Fedora, ຫຼື SystemRescue) ໄວ້ໃຫ້ເປັນປະໂຫຍດເພື່ອໃຫ້ທ່ານສາມາດຕິດຕັ້ງພາທິຊັນທີ່ຖືກເຂົ້າລະຫັດຫຼືມາດຕະຖານຂອງທ່ານແລະດໍາເນີນການ.
chrootການສ້ອມແປງ bootloader.
ສິ່ງສໍາຄັນ: ສິ່ງທີ່ບໍ່ຄວນເຮັດ
ບໍ່ເຄີຍແລ່ນ grub-install, dd, fdisk, ຫຼື mkfs ຈົນກ່ວາທ່ານໄດ້ກວດສອບທີ່ແນ່ນອນແຜ່ນແລະການຈັດວາງການແບ່ງປັນຂອງທ່ານໂດຍນໍາໃຊ້ lsblk -f ຫຼື blkid. ຊື່ node ອຸປະກອນເຊັ່ນ /dev/sda and /dev/sdb are assigned dynamically by the Linux kernel at boot and can swap order when a Live USB stick is plugged in. Accidentally formatting or overwriting the partition table of the wrong /dev/sdX drive will destroy your data. In addition, never run filesystem repair utilities like fsck on partitions mounted read-write, never force-power off a system during an active kernel or bootloader package upgrade, and never delete system libraries in /usr/lib ຫຼື /lib in an attempt to clear space on a full root drive.
ຕົ້ນໄມ້ການຕັດສິນໃຈ: ການວິນິດໄສ 5 ຂັ້ນຕອນການບູດ Linux ລົ້ມເຫລວ¶
Use this diagnostic flowchart to trace your exact screen output to the matching command-line fix:
flowchart TD
A["ລະບົບ Linux ລົ້ມເຫລວໃນການ Boot ກັບ Desktop / ເຂົ້າສູ່ລະບົບ"] --> B{"ສິ່ງທີ່ສະແດງຢູ່ໃນຫນ້າຈໍ?"}
B -->|"grub rescue> ຫຼື grub> prompt"| C["ຂັ້ນຕອນທີ 1 ຄວາມລົ້ມເຫຼວ: ໃຊ້ ls ເພື່ອຊອກຫາ /boot/grub, ຕັ້ງ root & prefix, boot OS, ຫຼັງຈາກນັ້ນດໍາເນີນການ grub-install"]
B -->|"BusyBox (initramfs) ຫຼື dracut:/# shell"| D["Stage 2 Failure: Identify root partition with blkid and run fsck -y /dev/partition"]
B -->|"Emergency Mode: Give root password for maintenance"| E["Stage 3 Failure: Run mount -o remount,rw / and fix or comment out broken UUID in /etc/fstab"]
B -->|"Black screen or blinking cursor after 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 | Boot Stage Reached | Primary Root Cause | Fastest Repair Command Sequence |
|---|---|---|---|
error: no such partition / grub rescue> |
Stage 1 (GRUB Core) | 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 prompt) |
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 ຫຼື #) -> systemctl daemon-reload -> reboot |
[FAILED] Failed to start GNOME Display Manager / ກະພິບຕົວກະພິບ |
ຂັ້ນຕອນທີ 4 (ຕົວຈັດການການສະແດງຜົນ / GUI) | ການແບ່ງປັນຮາກ / ແມ່ນ 100% ເຕັມ (0 bytes ຟຣີ /tmp ຫຼືຊັອກເກັດ Xorg) ຫຼືໂມດູນແກ່ນ Nvidia ທີ່ແຕກຫັກ (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. ທ່ານສາມາດບູດໂດຍກົງເຂົ້າໄປໃນ OS ທີ່ຕິດຕັ້ງຂອງທ່ານຈາກການເຕືອນນີ້ໃນ 2 ນາທີ:
ກໍລະນີ A: ເຈົ້າຢູ່ທີ່ 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 System Partition ຂະຫນາດນ້ອຍຂອງເຈົ້າ. - ເມື່ອ partition ຜົນໄດ້ຮັບ
boot/ etc/ home/ usr/ var/ vmlinuz initrd.img, ທ່ານໄດ້ພົບເຫັນການແບ່ງປັນຮາກ Linux ຕົ້ນຕໍຂອງທ່ານ (ຕົວຢ່າງເຊັ່ນ,(hd0,gpt2)). (ຫມາຍເຫດ: ຖ້າທ່ານໃຊ້ Btrfs ກັບ@subvolumes ໃນ Ubuntu / Fedora,ls (hd0,gpt2)/ຈະສະແດງໃຫ້ເຫັນ@/ @home/, ຊຶ່ງຫມາຍຄວາມວ່າໂຟນເດີ boot ຂອງທ່ານຢູ່ທີ່(hd0,gpt2)/@/boot/grub.) - ** ຊີ້ GRUB ໃສ່ພາທິຊັນຂອງທ່ານແລະໂຫລດ
normalໂມດູນ **: ສົມມຸດວ່າຮາກ 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.) - ** ເຮັດໃຫ້ການແກ້ໄຂຢ່າງຖາວອນເມື່ອ desktop ຂອງທ່ານເກີບ **:
ທັນທີທີ່
normalແລ່ນ, ເມນູ GRUB ປົກກະຕິຂອງທ່ານຈະປາກົດຂຶ້ນແລະເປີດລະບົບ Linux ຂອງທ່ານ. ** ສິ່ງສໍາຄັນ **: ເຫຼົ່ານັ້ນsetຄໍາສັ່ງແມ່ນຊົ່ວຄາວໃນ RAM. ໃນປັດຈຸບັນທີ່ທ່ານເຂົ້າສູ່ລະບົບ desktop Linux ຂອງທ່ານ, ເປີດ terminal ແລະຂຽນສະຖານທີ່ GRUB ທີ່ຖືກຕ້ອງຢ່າງຖາວອນໃສ່ drive ຂອງທ່ານ:
ກໍລະນີ B: ເຈົ້າຢູ່ໃນມາດຕະຖານ grub> ດ່ວນ¶
ຖ້າເຈົ້າເຫັນ grub> (ໂດຍບໍ່ມີຄໍາ rescue), ໄດ້ normal ໂມດູນຖືກໂຫລດແລ້ວ, ແຕ່ຂອງທ່ານ grub.cfg ໄຟລ໌ເມນູຫາຍໄປ ຫຼືແຕກ. ທ່ານສາມາດ boot kernel Linux ດ້ວຍຕົນເອງໃນສີ່ແຖວໂດຍໃຊ້ 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
linux /boot/vmlinuz ແລະກົດ Tab key, GRUB ຈະຕື່ມຂໍ້ມູນຕົວເລກເວີຊັນ kernel ທີ່ແນ່ນອນທີ່ຕິດຕັ້ງຢູ່ໃນແຜ່ນຂອງທ່ານ. sudo update-grub (Debian/Ubuntu) ຫຼື sudo grub2-mkconfig -o /boot/grub2/grub.cfg (Fedora/RHEL) ເພື່ອຟື້ນຟູໄຟລ໌ເມນູທີ່ຂາດຫາຍໄປ.
ສະຖານະການ 2: ການແກ້ໄຂ (initramfs) ຫຼື dracut ຫອຍກັບ fsck¶
ຖ້າ PC ຂອງທ່ານຜ່ານເມນູ GRUB, ສະແດງໃຫ້ເຫັນ Linux boot splash ສໍາລັບສອງສາມວິນາທີ, ແລະຫຼັງຈາກນັ້ນລົງໃສ່ຂໍ້ຄວາມສີດໍາທີ່ອ່ານທັນທີ:
BusyBox v1.36.1 (Ubuntu) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) _
(initramfs) ດ່ວນ. ເກົ້າເທື່ອຈາກສິບ, ເຈົ້າຈະເຫັນ:
The root filesystem on /dev/nvme0n1p2 requires a manual fsck
ການສ້ອມແປງລະບົບໄຟລ໌ຂັ້ນຕອນໂດຍຂັ້ນຕອນຈາກ (initramfs)¶
- ** ຢືນຢັນວ່າພາທິຊັນໃດທີ່ຕ້ອງການສ້ອມແປງ **: ຖ້າຫາກວ່າຊື່ພາທິຊັນບໍ່ໄດ້ຖືກພິມໄວ້ຂ້າງເທິງກະຕຸ້ນໃຫ້ພິມ.
blkidແລະກົດ Enter ເພື່ອລາຍຊື່ຂອງທ່ານext4,xfs, ຫຼືbtrfsການແບ່ງສ່ວນ. - ** ແລ່ນເຄື່ອງມືການສ້ອມແປງລະບົບໄຟລ໌ທີ່ກົງກັນ **:
- ** ສໍາລັບ
ext4/ext3ລະບົບໄຟລ໌ (ຄ່າເລີ່ມຕົ້ນໃນ Ubuntu, Debian, Mint)**: ໄດ້-yທຸງຈະຕອບ "ແມ່ນ" ໂດຍອັດຕະໂນມັດຕໍ່ທຸກໆ inode ທີ່ເສຍຫາຍ, ບລັອກເດັກກຳພ້າ, ແລະການເຕືອນການຫຼິ້ນວາລະສານຄືນໃຫມ່ແທນທີ່ຈະເຮັດໃຫ້ທ່ານກົດ.y500 ເທື່ອ. - ** ສໍາລັບ
XFSລະບົບໄຟລ໌ (ຄ່າເລີ່ມຕົ້ນໃນ RHEL, AlmaLinux, Rocky Linux, CentOS)**: ມາດຕະຖານfsckບໍ່ມີຫຍັງກ່ຽວກັບ XFS. ໃນ ກdracut:/#shell ໃນລະບົບ XFS, ດໍາເນີນການ: (ພຽງແຕ່ຜ່ານ-Lທຸງໄປຫາສູນບັນທຶກ metadata XFS ຖ້າxfs_repairປະຕິເສດທີ່ຈະແລ່ນເນື່ອງຈາກໄມ້ທ່ອນເປື້ອນທີ່ບໍ່ສາມາດເຊື່ອມຕໍ່ໄດ້ ແລະເຈົ້າບໍ່ມີທາງເລືອກອື່ນ). - ** ສໍາລັບ
Btrfsລະບົບໄຟລ໌ (ຄ່າເລີ່ມຕົ້ນໃນ Fedora, openSUSE)**: ທໍາອິດໃຫ້ພະຍາຍາມລ້າງໄມ້ທ່ອນ Btrfs ຢ່າງປອດໄພດ້ວຍbtrfs rescue zero-log /dev/nvme0n1p2. ບໍ່ເຄີຍແລ່ນbtrfs check --repairເວັ້ນເສຍແຕ່ໄດ້ຮັບການແນະນໍາໂດຍຜູ້ພັດທະນາ Btrfs ຫຼືຫຼັງຈາກສໍາຮອງຂໍ້ມູນຂໍ້ມູນຈາກ Live USB, ເປັນ--repairຖືວ່າເປັນອັນຕະລາຍໃນ Btrfs.
- ** ສໍາລັບ
- ** ອອກແລະ reboot **: ເມື່ອໃດ
fsckພິມ***** FILE SYSTEM WAS MODIFIED *****, ປະເພດexit(orreboot -f) ແລະກົດ Enter. ລະບົບຂອງທ່ານຈະຕິດຕັ້ງພາທິຊັນທີ່ສະອາດແລະການບູດໄດ້ປົກກະຕິ.
ສະຖານະການທີ 3: ການແກ້ໄຂ /etc/fstab ຄວາມຜິດພາດໃນ systemd ໂໝດສຸກເສີນ¶
ຖ້າໜ້າຈໍຂອງເຈົ້າຢຸດກາງເປີດເຄື່ອງດ້ວຍ:
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, ຈັດຮູບແບບພາທິຊັນ swap (ທີ່ປ່ຽນ UUID ຂອງມັນ), ຫຼືຖອດຮາດດິດພາຍໃນ/ພາຍນອກສຳຮອງທີ່ລະບຸໄວ້ໃນ /etc/fstab ໂດຍບໍ່ມີການ nofail ທາງເລືອກ. ໂດຍຄ່າເລີ່ມຕົ້ນ, systemd ຢຸດການບູດລະບົບປະຕິບັດງານທັງໝົດ ຖ້າມີແຜ່ນໃດນຶ່ງທີ່ມີລາຍຊື່ຢູ່ໃນ /etc/fstab ບໍ່ຕອບສະໜອງພາຍໃນ 90 ວິນາທີ.
ວິທີການແກ້ໄຂ /etc/fstab ໃນ 90 ວິນາທີ¶
- ພິມລະຫັດຜ່ານຮາກຂອງທ່ານ (ຫຼືກົດ Enter ຖ້າຫາກວ່າໃນ Ubuntu ບ່ອນທີ່ບັນຊີຮາກໄດ້ຖືກລັອກແລະມັນລົງທ່ານໂດຍກົງ; ຖ້າ Ubuntu ເວົ້າວ່າ
Cannot open access to console, the root account is locked, ເບິ່ງinit=/bin/bashຫມາຍເຫດຂ້າງລຸ່ມນີ້). - 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 addnofailຫຼືອອກຄວາມຄິດເຫັນອອກເສັ້ນທີ່ບໍ່ດີ **: ເອົາ ກ#ໃນຕອນເລີ່ມຕົ້ນຂອງໄດຮອງທີ່ແຕກຫັກຫຼືສາຍ swap ເພື່ອປິດການໃຊ້ງານມັນ (ຫຼືເພີ່ມ,nofailກັບຖັນຕົວເລືອກ mount ເຊັ່ນ:defaults,nofailດັ່ງນັ້ນ Linux ບໍ່ເຄີຍປະຕິເສດທີ່ຈະບູດເມື່ອໄດພາຍນອກນັ້ນຖືກຖອດອອກ). ຊ່ວຍປະຢັດດ້ວຍCtrl+O, ກົດ Enter, ແລະອອກດ້ວຍCtrl+X. - ** ໂຫຼດຄືນໃໝ່
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 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 ຫຼື /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.logໄດ້ປູມເປົ້າເປັນ 50 GB, ຫວ່າງມັນທັນທີທີ່ມີsudo truncate -s 0 /var/log/syslog.) - ** ເປັນຫຍັງ
df -hບາງຄັ້ງສະແດງໃຫ້ເຫັນAvail: 0(ເຕັມ 100%) ເມື່ອໃຊ້ພຽງແຕ່ 95% ຂອງແຜ່ນ?** ຕາມຄ່າເລີ່ມຕົ້ນ,ext4ສະຫງວນ **5 ສ່ວນຮ້ອຍຂອງການແບ່ງປັນທັງຫມົດ ** ສະເພາະສໍາລັບການrootຜູ້ໃຊ້ເພື່ອໃຫ້ການບໍລິການຮາກຍັງສາມາດດໍາເນີນການໄດ້ເມື່ອຜູ້ໃຊ້ປົກກະຕິຕື່ມຂໍ້ມູນໃສ່ແຜ່ນ. ໃນ SSD 1-terabyte, 5% ແມ່ນຕົວປະກັນຂະຫນາດໃຫຍ່ 50 GB. ທ່ານສາມາດຮຽກຄືນ 40+ GB ຂອງ buffer ທີ່ຈອງໄວ້ໃນທັນທີສໍາລັບບັນຊີຜູ້ໃຊ້ປົກກະຕິຂອງທ່ານໂດຍການແລ່ນ: - ຄັ້ງດຽວ
df -h /ສະແດງໃຫ້ເຫັນຫຼາຍ gigabytes ທີ່ມີຢູ່, ດໍາເນີນການsudo rebootແລະ desktop graphical ຂອງທ່ານຈະເຂົ້າສູ່ລະບົບເປັນປົກກະຕິ.
ຈະເປັນແນວໃດຖ້າ df -h ມີພື້ນທີ່ຫວ່າງຫຼາຍ, ແລະຫນ້າຈໍສີດໍາເລີ່ມຕົ້ນຫຼັງຈາກໄດເວີ Nvidia ຫຼືການອັບເດດ kernel ບໍ?¶
ຖ້າຫາກວ່າແຜ່ນຂອງທ່ານບໍ່ເຕັມທີ່ແລະຫນ້າຈໍສີດໍາໄດ້ເລີ່ມຕົ້ນໃນທັນທີຫຼັງຈາກການປັບປຸງກ່ຽວກັບ PC ທີ່ມີ ** Nvidia ກາດກາຟິກ**, ໂມດູນ Nvidia ຊັບພະຍາກອນ.nvidia.ko) ລົ້ມເຫລວໃນການລວບລວມຜ່ານ dkms ສໍາລັບ kernel ໃຫມ່ຂອງທ່ານ, ຫຼື Secure Boot ໄດ້ບລັອກໂມດູນທີ່ບໍ່ໄດ້ເຊັນ:
- ຈາກ
Ctrl + Alt + F3TTY console, ກວດເບິ່ງວ່າໂມດູນໄດເວີຖືກໂຫລດໂດຍການແລ່ນnvidia-smi. - ຖ້າ
nvidia-smiເວົ້າວ່າNVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, ບໍ່ວ່າຈະປິດການໃຊ້ງານ Secure Boot ພາຍໃນການຕັ້ງຄ່າ UEFI/BIOS ຂອງເມນບອດຂອງທ່ານ (ຖ້າ Secure Boot ກໍາລັງຂັດຂວາງໂມດູນ DKMS ທີ່ບໍ່ໄດ້ເຊັນ), ຫຼືສ້າງສ່ວນຫົວ ແລະໄດເວີຄືນໃໝ່:
ສະຖານະການ 5: ສໍາເລັດ Live USB chroot ການກູ້ໄພ (ສໍາລັບການເຊັດ EFI/GRUB, LVM, LUKS, ແລະ Btrfs)¶
ເມື່ອການອັບເດດ Windows 11 ຂຽນທັບລາຍການບູດ UEFI ຂອງທ່ານ, ການອັບເດດ kernel ຂັດຂ້ອງລະຫວ່າງການບິນໃນຂະນະທີ່ໄຟຫມົດ, ຫຼື. grub rescue> ບໍ່ສາມາດອ່ານພາທິຊັນຂອງທ່ານ, boot ຄອມພິວເຕີຂອງທ່ານຈາກ Live Linux USB drive (ເລືອກ "ລອງ Ubuntu" ຫຼືຮູບແບບ desktop ສົດ) ແລະດໍາເນີນການ chroot (ປ່ຽນຮາກ) ສ້ອມແປງ. ກ chroot ໃຫ້ຂັ້ນຕອນ Live USB terminal ຂອງທ່ານ * ພາຍໃນ * ການຕິດຕັ້ງ SSD ທີ່ແຕກຫັກຂອງທ່ານແລະດໍາເນີນການ apt, dnf, update-initramfs, ແລະ grub-install ຄືກັບວ່າລະບົບໄດ້ເປີດເຄື່ອງປົກກະຕິ.
ຂັ້ນຕອນທີ 1: ກໍານົດແລະປົດລັອກຮູບແບບການເກັບຮັກສາຂອງທ່ານ (lsblk -f)¶
ເປີດ terminal ພາຍໃນ Live USB desktop ແລະດໍາເນີນການ:
ເບິ່ງຢູ່FSTYPE ຖັນເພື່ອເບິ່ງວ່າສະຖາປັດຕະຍະກໍາການເກັບຮັກສາທົ່ວໄປສີ່ອັນໃດທີ່ການຕິດຕັ້ງ Linux ຂອງທ່ານໃຊ້, ແລະຕິດຕັ້ງມັນໃສ່ /mnt ການນໍາໃຊ້ block ທີ່ກົງກັນຂ້າງລຸ່ມນີ້:
- **ກໍລະນີທີ 1: ມາດຕະຖານ
ext4ຫຼືxfspartition ** (ເຊັ່ນ: ຮາກແມ່ນ/dev/nvme0n1p2ແລະ EFI ແມ່ນ/dev/nvme0n1p1): - ** ກໍລະນີ 2: ການເຂົ້າລະຫັດ LUKS root partition (
crypto_LUKS)** (ຄ່າເລີ່ມຕົ້ນເມື່ອ "ເຂົ້າລະຫັດດິສຂອງຂ້ອຍ" ຖືກກວດສອບໃນລະຫວ່າງການຕິດຕັ້ງ): ທ່ານຕ້ອງຖອດລະຫັດ LUKS container ກ່ອນທີ່ຈະຕິດຕັ້ງ: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ຈະສະແດງເທົ່ານັ້ນ@and@homefolders ແທນ/binand/etc, ແລະchroot /mntຈະລົ້ມເຫລວກັບfailed to run command '/bin/bash': No such file or directory. ພູ@ປະລິມານຍ່ອຍຢ່າງຈະແຈ້ງ:
ຂັ້ນຕອນທີ 2: ຜູກມັດລະບົບໄຟລ໌ kernel virtual (ລວມທັງ UEFI efivars) ແລະເຂົ້າ chroot¶
ສໍາລັບ grub-install and apt (ການເຂົ້າເຖິງອິນເຕີເນັດ DNS) ເພື່ອເຮັດວຽກພາຍໃນ chroot, bind-mount the Live USB's virtual kernel directories and UEFI NVRAM variables into /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: ອອກຢ່າງສະອາດແລະ reboot¶
ຖອດສາຍ USB ໄດຣຟ໌ສົດເມື່ອຮ້ອງຂໍ. ລະບົບຂອງທ່ານຈະເປີດໂດຍກົງໃສ່ເມນູ GRUB ທີ່ທ່ານສ້ອມແປງ ແລະ desktop Linux.ມາດຕະຖານວິສາຫະກິດພາກພື້ນ, ການປະຕິບັດຕາມສູນຂໍ້ມູນ, ແລະການຢັ້ງຢືນຮາດແວ¶
ການຈັດການ bootloader Linux ຂອງອົງກອນ ແລະຄວາມປອດໄພຂອງເຟີມແວແມ່ນຂຶ້ນກັບມາດຕະຖານແຫ່ງຊາດທີ່ເຂັ້ມງວດ ແລະກອບຄວາມປອດໄພທາງໄຊເບີ:
- ສະຫະລັດ: ໂຄງສ້າງພື້ນຖານຂອງລັດຖະບານ ແລະວິສາຫະກິດປະຕິບັດຕາມສະຖາບັນມາດຕະຖານ ແລະເທັກໂນໂລຍີແຫ່ງຊາດ (NIST) ການພິມຈຳໜ່າຍພິເສດ 800-147B (ຂໍ້ແນະນຳການປົກປ້ອງ BIOS ສຳລັບເຊີບເວີ) ແລະ SP 800-193 (ຂໍ້ແນະນຳຄວາມຢືດຢຸ່ນຂອງແພລດຟອມເຟີມແວ). ການຕິດຕັ້ງຂອງລັດຖະບານກາງທີ່ດໍາເນີນການ Red Hat Enterprise Linux (RHEL) ຫຼື Rocky Linux ຕ້ອງປະຕິບັດຕາມຄໍາແນະນໍາດ້ານການປະຕິບັດດ້ານເຕັກນິກຄວາມປອດໄພຂອງອົງການປ້ອງກັນຄວາມປອດໄພ (DISA) (STIGs). ມາດຕະຖານເຫຼົ່ານີ້ຕ້ອງການການປົກປ້ອງລະຫັດຜ່ານໃນ GRUB 2 ເມນູບູດ, ປິດການທໍາງານການແກ້ໄຂພາລາມິເຕີ kernel ແບບໂຕ້ຕອບ, ເປີດໃຊ້ UEFI Secure Boot ກັບຕົວໂຫຼດຂັ້ນຕອນທໍາອິດ Shim, ແລະການເຂົ້າລະຫັດການເກັບຮັກສາຮາກດ້ວຍໂມດູນການເຂົ້າລະຫັດລັບ FIPS 140-⅔ ທີ່ມີຄວາມຖືກຕ້ອງຂອງ LUKS.
- ** ສະຫະປະຊາຊະອານາຈັກ:** ສູນຄວາມປອດໄພ Cyber ແຫ່ງຊາດ (NCSC) ເຜີຍແຜ່ຄໍາແນະນໍາຄວາມປອດໄພອຸປະກອນສໍາລັບເວທີ Linux ຂອງວິສາຫະກິດ, ບັງຄັບໃຫ້ຄວາມສົມບູນຂອງພື້ນຖານຂອງຮາດແວ. ລະບົບທີ່ນຳໃຊ້ໃນທົ່ວລັດຖະບານ ຫຼື ພື້ນຖານໂຄງລ່າງແຫ່ງຊາດທີ່ສຳຄັນຈະຕ້ອງໃຊ້ການວັດແທກ Trusted Platform Module (TPM 2.0) ເພື່ອປິດກະແຈການເຂົ້າລະຫັດດິສກ໌ LUKS ຕໍ່ກັບການລົງທະບຽນການກຳນົດຄ່າຂອງແພລດຟອມ (PCRs), ຮັບປະກັນວ່າໄດຣຟ໌ຈະປົດລັອກໂດຍອັດຕະໂນມັດເມື່ອເຟີມແວ UEFI, ລະຫັດບູດທີ່ປອດໄພ ແລະ GRUB ampunted ທັງໝົດຍັງຄົງຢູ່.
- ສະຫະພາບເອີຣົບ: ໃນສະຫະພາບເອີຣົບ, ຫ້ອງການລັດຖະບານກາງສໍາລັບຄວາມປອດໄພຂໍ້ມູນຂ່າວສານໃນເຢຍລະມັນ (BSI) ສ້າງຕັ້ງຄວາມປອດໄພພື້ນຖານໂດຍຜ່ານ IT-Grundschutz building block SYS.1.3 (Server Linux ແລະ Unix). ຂໍ້ແນະນໍາ BSI ຮຽກຮ້ອງໃຫ້ມີການແຍກແຍະບູດທີ່ເຂັ້ມງວດ, ການຕັ້ງຄ່າ bootloader ທີ່ບໍ່ປ່ຽນແປງໄດ້, ແລະຂັ້ນຕອນການບໍາລຸງຮັກທີ່ຖືກກວດສອບ. ພາຍໃຕ້ຄໍາແນະນໍາຂອງເຄືອຂ່າຍ EU ແລະຄວາມປອດໄພຂໍ້ມູນຂ່າວສານ (NIS 2), ຫນ່ວຍງານທີ່ດໍາເນີນການບໍລິການດິຈິຕອນທີ່ສໍາຄັນຕ້ອງຮັກສາຂັ້ນຕອນການຟື້ນຕົວຈາກໄພພິບັດໂລຫະເປົ່າທີ່ມີຄວາມຖືກຕ້ອງເພື່ອຕອບສະຫນອງຈຸດປະສົງການຟື້ນຕົວ (RTO) ໃນລະຫວ່າງຄວາມລົ້ມເຫຼວຂອງລະບົບປະຕິບັດການ.
- ການາດາ: ສູນຄວາມປອດໄພທາງໄຊເບີຂອງການາດາ (CCCS) ໃຫ້ຄໍາແນະນໍາພາຍໃຕ້ ITSG-33 (IT Security Risk Management), ການລະບຸການຄວບຄຸມສໍາລັບສະພາບແວດລ້ອມການດໍາເນີນງານ Linux ຂອງວິສາຫະກິດ. ໂດຍປະຕິບັດຕາມກົດໝາຍວ່າດ້ວຍການປົກປ້ອງຂໍ້ມູນສ່ວນຕົວ ແລະເອກະສານອີເລັກໂທຣນິກ (PIPEDA), ຮາດໄດເຊີບເວີຕົວຈິງທີ່ກໍາລັງດໍາເນີນການກູ້ຂໍ້ມູນ bootloader ຫຼືປ່ຽນແທນຕົວຄວບຄຸມຈະຕ້ອງໃຊ້ການເຂົ້າລະຫັດຮາດແວ ຫຼືລະດັບສຽງເພື່ອປ້ອງກັນການເປີດເຜີຍຂໍ້ມູນໃນລະຫວ່າງການໃຫ້ບໍລິການ.
- ** ອອສເຕຣເລຍ:** ກົມສັນຍານຂອງອົດສະຕຣາລີ (ASD) ເຜີຍແຜ່ຄູ່ມືຄວາມປອດໄພຂໍ້ມູນຂ່າວສານ (ISM), ເຊິ່ງກໍານົດຂໍ້ກໍານົດສໍາລັບລະບົບ Linux ຂອງວິສາຫະກິດ. ISM ກໍານົດໃຫ້ອົງການຈັດຕັ້ງບັງຄັບໃຊ້ UEFI Secure Boot, ປົກປ້ອງການຕັ້ງຄ່າ bootloader ຕໍ່ກັບການປ່ຽນແປງທີ່ບໍ່ໄດ້ຮັບການຢືນຢັນ, ແລະບັນທຶກການເຂົ້າເຖິງ shell ການບໍາລຸງຮັກສາສຸກເສີນເຂົ້າໄປໃນບ່ອນເກັບຂໍ້ມູນການກວດສອບສູນກາງເພື່ອຮັກສາການປະຕິບັດຕາມຍຸດທະສາດການຫຼຸດຜ່ອນ Essential Eight.
ຄຳຖາມທີ່ມັກຖາມເລື້ອຍໆ¶
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.
ການຢັ້ງຢືນການຊ່ວຍເຫຼືອຄັ້ງທໍາອິດແລະຄວາມປອດໄພຂອງບ່ອນເຮັດວຽກດ້ານວິຊາການ¶
ການວິນິໄສການບູດລະດັບຮາດແວມັກຈະຮຽກຮ້ອງໃຫ້ມີການເປີດກໍລະນີຂອງ desktop, ປ່ຽນອຸປະກອນການສະຫນອງພະລັງງານ, ຫຼືການກວດສອບອຸປະກອນ rack ເຊີບເວີ. ຊ່າງປະເຊີນໜ້າກັບໄພໄຟຟ້າຢ່າງຮ້າຍແຮງຈາກຕົວເກັບປະກອບປະກອບໄຟທີ່ເສຍຫາຍ, ມີຮອຍຫ້ອຍຈາກແຜ່ນເຫຼັກຄົມຊັດ, ແລະບາດເຈັບຈາກຮາດແວທີ່ຕິດກັບຮາດແວທີ່ຕິດກັບແພັກຢ່າງໜັກ. ຖ້າເກີດໄຟຟ້າຊັອດ, ໃຫ້ຕັດເຄື່ອງຕັດວົງຈອນທັນທີກ່ອນທີ່ຈະແຕະຜູ້ເຄາະຮ້າຍແລະໂທຫາບໍລິການສຸກເສີນ. ການຮູ້ວິທີສົ່ງ CPR ແລະຈັດການເລືອດໄຫຼຮຸນແຮງຫຼືອາການຊ໊ອກແມ່ນມີຄວາມສໍາຄັນໃນຫ້ອງເຊີຟເວີເທົ່າກັບການແກ້ໄຂບັນຫາດ້ານວິຊາການ. ພວກເຮົາແນະນໍາໃຫ້ເຮັດສໍາເລັດການຊ່ວຍເຫຼືອຄັ້ງທໍາອິດທີ່ໄດ້ຮັບການຮັບຮອງ, CPR/AED, ແລະຫຼັກສູດສຸຂະພາບແລະຄວາມປອດໄພໃນບ່ອນເຮັດວຽກໂດຍຜ່ານອົງການກາແດງ, St John Ambulance, ຫຼືອົງການຄວາມປອດໄພແຫ່ງຊາດ.
ກວດສອບແຫຼ່ງທີ່ມາ¶
- ໂຄງການ GNU / ມູນນິທິຊອບແວຟຣີ (ສາກົນ): ຄູ່ມື GNU GRUB ຢ່າງເປັນທາງການ 2.12 , ເລີ່ມຕົ້ນຈາກ
grub>andgrub rescue>Command Shells (gnu.org/software/grub/manual). - The Linux Kernel Archives & Kernel.org (ສາກົນ): Kernel Parameters (
admin-guide/kernel-parameters.txt),initramfsEarly Userspace, ແລະການຄຸ້ມຄອງລະບົບໄຟລ໌ (docs.kernel.org). - ເອກະສານ Canonical / Ubuntu Server & Desktop Documentation (ສະຫະລາຊະອານາຈັກ / ສາກົນ): GRUB2 Bootloader Recovery, LiveCD Chroot Procedures, ແລະ Disk Space Management (
help.ubuntu.com,ubuntu.com/server/docs). - Red Hat Enterprise Linux (RHEL) & Fedora Project Documentation (ສະຫະລັດ): ການແກ້ໄຂບັນຫາ Boot ກັບ
dracut,xfs_repair, ແລະgrub2-mkconfig(docs.redhat.com,docs.fedoraproject.org). - ** Arch Linux Wiki (ສາກົນ)**: GRUB, Chroot,
fstab, ແລະmkinitcpioການອ້າງອິງດ້ານວິຊາການ (wiki.archlinux.org). - ** Freedesktop.org / systemd Documentation (ສາກົນ)**:
systemd.unitເປົ້າຫມາຍເຫດການສຸກເສີນແລະການກູ້ໄພ,journalctlການດູດຝຸ່ນ, ແລະsystemd.mountຕົວເລືອກ (freedesktop.org/software/systemd/man).