Merge commit 'ecdfa2f7c4' as 'temp-repo'
This commit is contained in:
commit
2fe0c9a830
1258 changed files with 42112 additions and 0 deletions
80
temp-repo/Homelab/fix grub if linux doesn't boot.md
Executable file
80
temp-repo/Homelab/fix grub if linux doesn't boot.md
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
|
||||
sudo nano /etc/fstab
|
||||
|
||||
|
||||
|
||||
The error indicates that the system is trying to mount /dev/nvme0n1p3, but it’s not listed correctly in /etc/fstab or the UUIDs/labels don’t match. Here’s how to resolve this issue:
|
||||
|
||||
|
||||
---
|
||||
|
||||
1. Boot into the System Temporarily
|
||||
|
||||
Use GRUB commands to boot into your system, as you did previously:
|
||||
|
||||
set root=(hd0,gpt6)
|
||||
linux /boot/vmlinuz-5.15.0-130-generic root=/dev/nvme0n1p3 ro
|
||||
initrd /boot/initrd.img-5.15.0-130-generic
|
||||
boot
|
||||
|
||||
Replace /dev/nvme0n1p3 with the correct partition if needed.
|
||||
|
||||
|
||||
---
|
||||
|
||||
2. Check /etc/fstab
|
||||
|
||||
Once the system boots, open /etc/fstab to verify the partition setup:
|
||||
|
||||
Look for the line referring to the root filesystem (/). It should match the correct UUID or device name.
|
||||
|
||||
|
||||
---
|
||||
|
||||
3. Find the Correct UUID
|
||||
|
||||
Run the following command to list all partition UUIDs:
|
||||
|
||||
lsblk -f
|
||||
|
||||
Identify the UUID of /dev/nvme0n1p3 (or your root partition).
|
||||
|
||||
|
||||
---
|
||||
|
||||
4. Update /etc/fstab
|
||||
|
||||
Replace the incorrect entry in /etc/fstab with the correct UUID for the root partition. For example:
|
||||
|
||||
UUID=correct-uuid / ext4 defaults 0 1
|
||||
|
||||
Save and exit.
|
||||
|
||||
|
||||
---
|
||||
|
||||
5. Update GRUB
|
||||
|
||||
After fixing /etc/fstab, update GRUB to ensure the correct configuration is saved:
|
||||
|
||||
sudo update-grub
|
||||
sudo grub-install /dev/nvme0n1
|
||||
|
||||
|
||||
---
|
||||
|
||||
6. Reboot
|
||||
|
||||
Reboot the system and verify that it starts correctly:
|
||||
|
||||
sudo reboot
|
||||
|
||||
|
||||
---
|
||||
|
||||
If you still encounter issues, share the output of lsblk -f and the contents of /etc/fstab for further troubleshooting.
|
||||
|
||||
|
||||
|
||||
source : chatgpt
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue