🚀 How to Update GRUB and Regenerate Initramfs from a Manjaro Live USB System 🐧

Sometimes things break—it’s Linux life! 💻 Maybe your Manjaro installation isn’t booting correctly after an update or some system tweaks. Don’t panic! You can easily fix boot-related issues using your Manjaro Live USB stick.

Here’s how you can update your GRUB bootloader and regenerate your initramfs directly from a Manjaro Live USB. Let’s dive in! 🌊

🔧 Step 1: Boot into the Manjaro Live USB & Mount your System

Boot your computer with a Manjaro USB stick. Open a terminal and identify your root partition using:

sudo fdisk -l

Let’s say your root partition is /dev/sda2, then mount it:

sudo mount /dev/sda2 /mnt

If you have separate boot or EFI partitions, mount them too:

  • For a separate /boot partition:
sudo mount /dev/sda1 /mnt/boot
  • For an EFI partition:
sudo mount /dev/sdaX /mnt/boot/efi

(Replace /dev/sdaX with your actual EFI partition.)

🛠️ Step 2: Enter your Installed System with manjaro-chroot

Manjaro makes this super easy:

sudo manjaro-chroot /mnt

Now you’re working inside your actual system environment! 🚪

⚙️ Step 3: Update GRUB Bootloader

Run these commands based on your boot type:

  • For BIOS/Legacy boot:
grub-install /dev/sda
update-grub
  • For EFI boot:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
update-grub

🔄 Step 4: Regenerate your Initramfs

Now regenerate initramfs images:

mkinitcpio -P

🎉 Step 5: Finish & Restart!

Exit the chroot environment:

exit

Unmount your partitions:

sudo umount -R /mnt

And reboot your system:

sudo reboot

That’s it! 🎯 Your Manjaro system should now boot up smoothly.

🔗 Useful Resources:

👉 Check out my original conversation with ChatGPT here for more details.

Happy Linux adventures! 🐧✨

Leave a Reply

Your email address will not be published. Required fields are marked *