UEFI vs BIOS I give up ( A Rant)

Message
Author
User avatar
jackdanielsesq
Posts: 244
Joined: Sun Apr 21, 2019 9:02 am

Re: UEFI vs BIOS I give up ( A Rant)

#11 Post by jackdanielsesq »

fehlix wrote: Mon Jan 06, 2020 8:01 pm
MS introduced this artifical limitation of not allowing WinOS to install in MBR mode to boot from GPT. Well I have installed WInOS10 in BIOS mode on a this GPT disk, which I have running here ;=) It's a 4TB disk with multiple Linux all in MBR (NON-UEFI).
For GRUB to boot in BIOS/MBR from a GPT disk, one needs simply add an 1MB (unformatted) partition marked as bios_grub - preferable at the beginning of the disk, so BIOS can better find it.... :turtle:


Thank you for that .... :number1:

Regards

Jack

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: UEFI vs BIOS I give up ( A Rant)

#12 Post by Head_on_a_Stick »

rs55 wrote: Mon Jan 06, 2020 6:44 pm I wanted to have this usb drive work on a friend's machine - on the off chance I was ever in a position with no laptop of my own. No luck.
To get the stick to work with both UEFI and non-UEFI you will need a GUID partition table with a BIOS boot partition[0] & an EFI system partition[1] and also the grub-pc-bin, grub-efi-ia32-bin & grub-efi-amd64-bin packages.

Then use these commands from the system on the USB stick:

Code: Select all

sudo -i
mount /dev/sdXY /mnt
grub-install --target=i386-pc /dev/sdX
grub-install --target=i386-efi --removable --efi-directory=/mnt
grub-install --target=x86_64-efi --removable --efi-directory=/mnt
umount /mnt
exit
Replace X with the letter assigned to the drive and replace Y with the number for the EFI system partition.

And remember to disable Secure Boot, MX does not support it.

[0] Type "ef02" in gdisk or "bios_grub" in gparted, *do not* format. It only needs to be ~0.5MiB so I use sectors 34-2047, they should be free in an optimally aligned disk.
[1] Needs to be FAT-formatted and of type "ef00" in gdsik or "boot,esp" in gparted.

EDIT: changed gparted's name for the BIOS boot partition, thanks fehlix.
Last edited by Head_on_a_Stick on Tue Jan 07, 2020 3:05 pm, edited 1 time in total.
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 12766
Joined: Wed Apr 11, 2018 5:09 pm

Re: UEFI vs BIOS I give up ( A Rant)

#13 Post by fehlix »

Head_on_a_Stick wrote: Tue Jan 07, 2020 1:31 pm
rs55 wrote: Mon Jan 06, 2020 6:44 pm I wanted to have this usb drive work on a friend's machine - on the off chance I was ever in a position with no laptop of my own. No luck.
To get the stick to work with both UEFI and non-UEFI you will need a GUID partition table ...
GPT is not strictly required to boot from in UEFI mode. (That's about the confusen of GPT/DOS disks vs UEFI/BIOS boot)
MX Live USB can boot in both modes UEFI and BIOS from GPT or MBR(DOS) partition table layouts.
You can decide when you create with Live USB maker to choose either GPT or MBR partition table layout.
Head_on_a_Stick wrote: Tue Jan 07, 2020 1:31 pm ... with a BIOS boot partition[0] & an EFI system partition[1]
... the BIOS boot partition is recommended to have Grub boot reliable from GPT disks in BIOS mode.
But note, Grub can boot also using blocklists without this bios-boot partition - - not recommended , but working.
rs55 wrote: Mon Jan 06, 2020 6:44 pm [0] Type "ef02" in gdisk or "bios_boot" in gparted, *do not* format. It only needs to be ~0.5MiB so I use sectors 34-2047, they should be free in an optimally aligned disk.
To make it simpler, just use Gparted and create 1 MB partition, and do stick to a alignment of 1MB boundary within Gparted.
Also, the bios-boot partition flag is called "bios_grub" within both Gparted and in gdisk.
In addtion for multi-boot installs, it might be worth to consider to install the efi-bootloader for each install
separately into the ESP using different bootloader-id's. So incase reEFInd might come handy and one can select between these efi-loaders as most UEFI-firmware will not scan for further efi-loader but only the fallback at /EFI/boot/bootx64.efi

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: UEFI vs BIOS I give up ( A Rant)

#14 Post by Head_on_a_Stick »

fehlix wrote: Tue Jan 07, 2020 2:40 pmthe bios-boot partition flag is called "bios_grub" within both Gparted and in gdisk.
D'oh! Thanks for the correction :happy:

I don't think gdisk uses that name though:

Code: Select all

   4              34            2047   1007.0 KiB  EF02
And yes, there's more than one way to skin this particular cat.

EDIT:
fehlix wrote: Tue Jan 07, 2020 2:40 pm MX Live USB can boot in both modes UEFI and BIOS from GPT or MBR(DOS) partition table layouts.
Only if the firmware supports it. I've encountered machines that won't boot in UEFI mode from an msdos partition table.
Last edited by Head_on_a_Stick on Tue Jan 07, 2020 3:15 pm, edited 1 time in total.
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 12766
Joined: Wed Apr 11, 2018 5:09 pm

Re: UEFI vs BIOS I give up ( A Rant)

#15 Post by fehlix »

Head_on_a_Stick wrote: Tue Jan 07, 2020 3:04 pm I don't think gdisk uses that name though:

Code: Select all

   4              34            2047   1007.0 KiB  EF02
correct: gdisk shows only the code ef02 not the flag-name

Post Reply

Return to “Software / Configuration”