Code: Select all
sda 8:0 0 1.8T 0 disk
├─sda4 8:4 0 994.6G 0 part
├─sda2 8:2 0 100M 0 part /boot/efi
├─sda5 8:5 0 232.9G 0 part /
├─sda3 8:3 0 16M 0 part [SWAP]
├─sda1 8:1 0 450M 0 part
└─sda6 8:6 0 29.8G 0 part [SWAP]
efibootmgr:
Code: Select all
Boot0000* Win10
Boot0001* ubuntu
-With gparted, (in LM18.2), I removed sda7 <- Ubuntu server "/" partition, and then I ran "update-grub" (in LM18.2) and all looked well.
-rebooted;
-Win10 came up fine.
-but LM18.2 got stuck at "grub>" prompt. I didn't care about the now-removed Ubuntu-Server distro, but I really didn't want to lose all my stuff on LM18.2.
The ONLY way I could fix this self-inflicted? mess was this:
Boot LIVE from an LM18.2 64-bit usb/iso:
Code: Select all
mount /dev/sda5 /mnt (<-LM18.2 "/")
mount /dev/sda2 /mnt/boot/efi
#
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
#
sudo chroot /mnt
efibootmgr -b 0001 -B <-remove the corrupted "ubuntu" boot entry
rm -rf /boot/efi/EFI/ubuntu
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck
# (Note: I first tried the "grub-install" with ...-bootloader-id=LM18.2"..." but that failed to boot up afterwards ?!)
update-grub
exit (<- exit chroot env)
#---------------------
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt/boot/efi
sudo umount /mnt
sudo reboot
Somehow I pooched grub earlier when trying to remove/delete the prior Ubuntu-Server distro?
There maybe better ways to do this, including "Repair-Disk", but I just though I'd share this recent experience I had.