Thank you for the additional details. It sounds like grub-install is not working properly, and update-grub is detecting your previous disk's OS rather than the new one in your chroot. This typically happens when the chroot environment is not fully or correctly set up, or if the mount points (especially EFI/system partitions) are not properly mounted before chroot.
Let's try a more thorough troubleshooting and repair. I'll provide you with a step-by-step method to cleanly fix your GRUB installation. This assumes a UEFI system—if you are on BIOS, let me know, and I'll adjust accordingly.
Step 1: Boot from a Live USB/CD
Boot your system from a Live USB/CD of your Linux distro.
Step 2: Identify your root and EFI partitions
Run:
sudo lsblk -f
- Look for your root partition (e.g.,
/dev/sda2 or /dev/nvme0n1p2) with your Linux filesystem (ext4, btrfs, etc.).
- Look for your EFI partition (
vfat/FAT32) which is typically around 100-500MB and mounted at /boot/efi in your system (e.g. /dev/sda1).
Step 3: Mount partitions properly
Mount the root filesystem:
sudo mount /dev/sdXY /mnt
(replace /dev/sdXY with your root partition)
Mount the EFI partition (very important for UEFI):
sudo mkdir -p /mnt/boot/efi
sudo mount /dev/sdXZ /mnt/boot/efi
(replace /dev/sdXZ with your EFI partition)
If you have a separate /boot partition, mount it too:
sudo mount /dev/sdXW /mnt/boot
Step 4: Mount essential virtual filesystems
for i in /dev /dev/pts /proc /sys /run; do sudo mount --bind $i /mnt$i; done
Step 5: Chroot into your installed system
sudo chroot /mnt
Step 6: Verify EFI mount inside chroot
Check if EFI partition is mounted:
ls /boot/efi
You should see EFI files like EFI/BOOT, EFI/ubuntu (example).
If nothing shows, exit chroot (exit) and mount EFI partition manually.
Step 7: Now reinstall GRUB
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck
If this command returns an error, please include the exact error in your reply.
grub-install /dev/sda
(adjust /dev/sda to the correct disk)
Step 8: Update grub config
Inside chroot:
update-grub
or
grub-mkconfig -o /boot/grub/grub.cfg
Step 9: Exit chroot and reboot
exit
sudo reboot
Remove live media so the system boots from disk.
If grub-install still broken or you get errors:
- Check EFI partition for space:
df -h /boot/efi
- Make sure your system is booted in UEFI mode from the live media (look for
/sys/firmware/efi):
ls /sys/firmware/efi
If this folder exists in the live environment, it's booted UEFI, otherwise it's BIOS.
- If your disk layout has changed or was cloned from another disk, update
/etc/fstab to reflect correct UUIDs or device paths. Use:
blkid
to get UUIDs and check /etc/fstab file.
Alternative: Use Boot-Repair tool (Ubuntu/Deb-based distros)
Boot-Repair automates grub repair.
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair
boot-repair
Run it, and select Recommended repair.
Please provide any error messages you get during grub-install or update-grub. That will help narrow down the issue further.