2

on my Dell XPS 13" with UEFI "bios", I installed Ubuntu 18.04 some time ago as dualboot with preinstalled Windows 10. Back then I had to enable Legacy boot, resized the partition with gparted and everything went was fine.

Today I wanted to reinstall Windows 10, so I proceeded to installer, but it complained something about GPT and refused to install (sth like this but little different message).

The next - BAD - idea was to delete all the Windows related partitions through Win installer, and create a new one. It also didnt work. But i dont care if my Win works, so I wanted to make ubuntu bootable again. Boot prompt said just

error: no such partition
Entering rescue mode...
grub rescue>

Typing ls got (hd0) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1). Typing ls (hd0,gpt4) got Filesystem is ext2 which was not true. Other partitions were unknown.

I had used grub-install several years ago, so I was pretty confident. But unfortunately grub-install /dev/sd<Tab> didnt give any results. I realized that GPT and nvme would be the problem.

Blindly run sudo grub-install /dev/nvme0n1p1 didnt help and gparted said my linux partions were unreadable. And sudo update-grub got Failed to get canonical path of /cow.

  • 1
    How you boot install media UEFI or BIOS/CSM is then how it installs. So if you had booted in UEFI mode, it would have installed in UEFI mode and needed an ESP - efi system partition (FAT32 with boot flag). UEFI/gpt partitioning in Advance: askubuntu.com/questions/743095/… & help.ubuntu.com/community/DiskSpace – oldfred Nov 23 '18 at 23:15
  • Thats the missing piece! I didnt realize its possible to load USB drive in UEFI mode. Once i did, i was able to install Windows. Thanks! – zbycz Nov 26 '18 at 21:48
1

Finally after 1 hour, I figured it out - I had to boot in ubuntu live, install Boot-repair tool there:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

and hit "Recommended repair".

I got message: "GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again."

So i created "unformatted" 2MB partition in the beggining of the disk and committed changes. Then luckily gparted started to recognize my Linux partitions as well. Right click on the partition allowed selected "Flags" which listed "bios_grub". Running boot-repair again responded with OK message and Ubuntu booted again.

  • pretty good explanation of EFI vs BIOS and GPT vs MBR is here. Seems I use the computer in BIOS mode with GPT. (Thats quite counterintuitive since the machine has UEFI)
0

Windows does that every update. I fix it within windows with easy bcd. Or what it like even more is to use 2 separate hdds for the two operating systems. easy bcd has a free version btw.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.