1

Installed Windows 10 on one disk. Installed Ubuntu 20.04 on a separate disk and set up dual boot: everything was working. Now Ubuntu disk appears to have died: not even visible in the BIOS/UEFI. Boot just gives a grub> prompt. A replacement disk arrives tomorrow.

Is it just a simple case of installing Ubuntu on this new disk (I have a bootable USB I can use) to get back to a dual boot system, or are there any other steps I'll need to do?

1 Answer 1

0

I do assume that a windows update re-wrote the EFI partition Windows will overwrite the boot sector whenever you install it, upgrade it to a new version, or use tools like bootrec /fixmbr, bootrec /fixboot, or the older fdisk /mbr. source

WARNING: This Only works for EFI

Use a Live Ubuntu USB and choose try live instead of install. Open GParted to determine the names of the following partitions

  1. The EFI partition. (filesystem: FAT, size: 100MB-500MB)
  2. You Ubuntu partition. (filesystem: ext4, size: ?????)

If you want to use the terminal (which I believe is ALOT easier), open a terminal with CTRL+ALT+T.

type the following

sudo fdisk -l

You should get an output similar to the following: (I will ignore other partitions)

/dev/sda1      2048    206847    204800  100M EFI System <========    
/dev/sda3 527517696 554121215  26603520 12.7G Linux filesystem <=======

Device name can also be /dev/nvmen1pXX if you use nvme drives

I will assume that EFI partition is /dev/sda1 and Ubuntu is /dev/sda2 Type the following in a terminal:

Chrooting

sudo mount /dev/sda2 /mnt 
sudo mount /dev/sda1 /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

Fixing Grub

Install GRUB with

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

Generate Grub-config grub-mkconfig -o /boot/grub/grub.cfg

That should fix grub, you can now exit with exit or Ctl+D and reboot.

Note: you might need to update BIOS boot order

Preventing windows from doing this again

I don't use windows so I can't help, but you SHOULD stop windows from re-writing your EFI partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .