Check Ubuntu boot loader location
Posted: Tue Aug 25, 2020 5:57 am
When originally installing Ubuntu last year I was not entirely clear minded about how to proceed. The BIU installation guide for Ubuntu calls for Grub to be installed to / (root) in the partition prepared for Ubuntu. I missed that detail. This resulted in Ubuntu's boot loader being installed to the ESP, not root.
The system dual boots Win10 and Ubuntu.
BIU was installed first, then Win10, then Ubuntu.
A week ago I reinstalled Ubuntu 18.04. One of the ambitions of this reinstall was to to remedy the location of the boot loader. Unfortunately I neglected to make a new boot item. I used the same boot item created long ago for the original Ubuntu install. However, I did take care to direct the Ubuntu installer to put the boot loader in / (root).
The install was a no-worries process. Ubuntu boots and works A-OK. However, I would like to be certain that the boot loader is located in root.
Using Ubuntu's file manager to check the root directory, the only stray files outside a child directory are:
initrd.img
initrd.img.old
vmlinuz
If the install had proceeded as it should have done I would expect to find the boot loader there.
Boot items with different settings each successfully boot Ubuntu.
1) Boot from Ubuntu partition.
Ubuntu boots successfully when boot item is directed to /boot (not / root) to find a boot file from either of:
/boot/grub/x86_64-efi/grub.efi
/boot/grub/x86_64-efi/core.efi
(the directory /boot/efi is empty)
2) Boot from EFI system.
If boot item is directed to files in ESP Ubuntu boots normally too:
/EFI/Ubuntu.001/grubx64.efi
Although when I tested this just now a couple of text screens flashed up too quickly for me to read.
My guess is that booting from Ubuntu partition is somehow redirected to find grub in the ESP.
How can I determine precisely how Ubuntu is booting?
I would like to have the boot loader referenced from root.
Every time grub is updated BIU is hijacked and needs to be reset.
I expect to have to make changes to OS files to have Ubuntu recognise grub if it is moved to root.
The system dual boots Win10 and Ubuntu.
BIU was installed first, then Win10, then Ubuntu.
A week ago I reinstalled Ubuntu 18.04. One of the ambitions of this reinstall was to to remedy the location of the boot loader. Unfortunately I neglected to make a new boot item. I used the same boot item created long ago for the original Ubuntu install. However, I did take care to direct the Ubuntu installer to put the boot loader in / (root).
The install was a no-worries process. Ubuntu boots and works A-OK. However, I would like to be certain that the boot loader is located in root.
Using Ubuntu's file manager to check the root directory, the only stray files outside a child directory are:
initrd.img
initrd.img.old
vmlinuz
If the install had proceeded as it should have done I would expect to find the boot loader there.
Boot items with different settings each successfully boot Ubuntu.
1) Boot from Ubuntu partition.
Ubuntu boots successfully when boot item is directed to /boot (not / root) to find a boot file from either of:
/boot/grub/x86_64-efi/grub.efi
/boot/grub/x86_64-efi/core.efi
(the directory /boot/efi is empty)
2) Boot from EFI system.
If boot item is directed to files in ESP Ubuntu boots normally too:
/EFI/Ubuntu.001/grubx64.efi
Although when I tested this just now a couple of text screens flashed up too quickly for me to read.
My guess is that booting from Ubuntu partition is somehow redirected to find grub in the ESP.
How can I determine precisely how Ubuntu is booting?
I would like to have the boot loader referenced from root.
Every time grub is updated BIU is hijacked and needs to be reset.
I expect to have to make changes to OS files to have Ubuntu recognise grub if it is moved to root.