PDA

View Full Version : [SOLVED] Boot Ubuntu from HD partition on a Windows system? (help with GRUB)



gilius2
November 22nd, 2019, 11:23 PM
When I write the ISO to USB then it automatically created the EFI folder - all to a single partition:
https://i.postimg.cc/MGP5bFkx/iso1.png

However, if I simply extract everything to a single partition then I have to extract the EFI from the [BOOT] Folder and move it to the root.

When I boot from USB I get to the install menu; but when I add \EFI\BOOT\BOOTAA64.EFI as a boot device from HD partition I get the Grub prompt instead.

How can I make the EFI file "chainload"(?) to the install menu instead of giving me a Grub prompt? And how can I achieve this without using any apps - only the command line?

Why does writing to USB chainload correctly - but simply extracting the files lead to a Grub prompt?

oldfred
November 22nd, 2019, 11:50 PM
What is \EFI\BOOT\BOOTAA64.EFI ?
Normal boot file for flash drive or hard drive is /EFI/Boot/bootx64.efi. And version on flash drive is a copy of a limited grub just to boot flash drive.

Full install of grub to a flash drive has a full copy of shimx64.efi as bootx64.efi and internally also needs /EFI/ubuntu for more boot files.

I used to use the extract method, but newest Ubuntu now has some links and links are not allowed with FAT32. But UEFI has to boot from FAT32.
https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1849534

For an internal drive, you have to have an ESP - efi system partition. And then add UEFI boot entries into UEFI.
If booting the hard drive entry, that is also a fallback entry that is like the flash drive entry. /EFI/Boot/bootx64.efi. But standard install has a 3 line grub.cfg that uses configfile to load the full grub install. With flash drive that grub is the boot of the installer files.

Example of configfile:
https://ubuntuforums.org/showthread.php?t=2076205&page=54&p=13788092#post13788092
https://askubuntu.com/questions/958760/what-does-gpt7-refers-to-in-my-grub-cfg

gilius2
November 23rd, 2019, 01:23 AM
The \EFI\BOOT\BOOTAA64.EFI is the ARM64 counterpart to /EFI/Boot/bootx64.efi (AMD64)

but the architecture doesn't matter so much because the Windows EFI Boot Loader handles them in the same way.

There's no other EFI files on that live ISO, so that should be the gateway to the install menu:
https://ubuntu.com/download/server/arm

The single partition is indeed FAT32


But standard install has a 3 line grub.cfg that uses configfile to load the full grub install. With flash drive that grub is the boot of the installer files.
That's the part that interests me. I need to learn how the EFI file can load that grub installer - perhaps via the Grub prompt? You see I don't know anything about grub; I only know how to boot stray windows partitions.
https://i.postimg.cc/PxbPGKZc/grub.png

gilius2
November 23rd, 2019, 01:50 AM
I followed this guide:
https://askubuntu.com/questions/159846/tried-to-boot-ubuntu-but-the-grub-rescue-prompt-shows-up-instead

But then encountered this error:
https://askubuntu.com/questions/142300/how-to-fix-error-unknown-filesystem-grub-rescue

I think it might be because the FAT32 partition is on a GPT disk instead of MBR?

oldfred
November 23rd, 2019, 04:42 AM
With PC & Mac the ESP - efi system partition must be FAT32 for UEFI to find it.
Windows requires gpt for UEFI boot.
Ubuntu recommends gpt, but does let you install to MBR with either BIOS or UEFI.

Not sure then about ARM and what its configuration is.

gilius2
November 23rd, 2019, 02:59 PM
Don't forget I was trying to boot the live CD from HD - not the actual operating system. However, I can now confirm it works via MBR - and GPT was indeed the problem. In the process I've also learnt a bit about GRUB, so that when it comes to booting the actual operating system by way of an EFI file that chainloads to GRUB then I'll hopefully be able to expand on this exercise to achieve that. And as you said: maybe GPT will then become an option for the main OS.