Page 2 of 2

Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sat Jul 27, 2024 6:17 pm
by jp734

THIS IS OFFICIALLY SOLVED

To summarize:

ORIGINAL PROBLEM: "Can't boot from external usb drive". It's because the table created was GPT/UEFI and my desktop is set to Legacy boot because the internal SSDs were created using the MSDOS table just as @dimkr suspected.

SOLUTION: Recreating the table on the SSDs or flip-flopping between UEFI/Legacy bios setting is too much hassle. So, I re-created the table on the external usb drive to use MSDOS

RESULT: I am now making this post using the distro I'm testing, that is installed on the external usb drive :thumbup:

Thanks again to all. You all make learning computer FUN and easy. One last thing, speed performance of this usb external drive is surprisingly fast. Was expecting a bit slower than this. So, needless to say, I will be a happy distro tester. LOL :lol:


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sat Jul 27, 2024 9:16 pm
by williwaw
dimkr wrote: Sat Jul 27, 2024 3:22 pm

UEFI boot will only work with GPT.

is that a constraint only with windows?
I thought I had UEFI working with MBR on a disk with a fat32 and ext4, but maybe not.
https://superuser.com/questions/1807640 ... on-to-boot


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 5:08 am
by dimkr

If you use GPT, you don't have a MBR, so I don't see how BIOS boot can work (even if we ignore the use of GPT rather than BIOS). And the other way around - if you have a MBR and all you don't have an ESP. Maybe your system is configured to fall back to BIOS if UEFI boot fails, and that's why things seem to work although you're not using GPT.


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 6:26 am
by williwaw
dimkr wrote: Sun Jul 28, 2024 5:08 am

If you use GPT, you don't have a MBR, so I don't see how BIOS boot can work (even if we ignore the use of GPT rather than BIOS). And the other way around - if you have a MBR and all you don't have an ESP. Maybe your system is configured to fall back to BIOS if UEFI boot fails, and that's why things seem to work although you're not using GPT.

this purported lack of compatibility between mbr and gpt has been a source of confusion.
Not to be pendatic, but a good understanding of what works and what doesnt is important if good advice about booting is to be given when we help forum visitors with booting problems ( it comes up quite often)
https://en.wikipedia.org/wiki/BIOS_boot_partition


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 11:58 am
by jp734

@williwaw i agree with you and this link you provided just added to that confusion.

I think I'll stick with GPT for UEFI and MBR/MSDos for Legacy for now until I get more clarification. It's what worked for me and I feel confident it will work for others as well. It obviously solved geo_c problem with his latest project


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 12:42 pm
by wizard

@dimkr
@williwaw
@jp734

UEFI boot will only work with GPT.

Don't think this is accurate. Just set up a hdd as follows:

-partition table = msdos
-part 1 = 100mb, fat32, boot, ESP, grub2 UEFI only
-part 2 = 20gb, ext3, linux, f96ce4

Drive is in a Dell E6430 laptop, bios/setup is configured to boot UEFI only.

The drive boots f96ce4 without issue.

Thanks
wizard


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 1:44 pm
by Jafadmin
wizard wrote: Sun Jul 28, 2024 12:42 pm

@dimkr
@williwaw
@jp734

UEFI boot will only work with GPT.

Don't think this is accurate. Just set up a hdd as follows:

-partition table = msdos
-part 1 = 100mb, fat32, boot, ESP, grub2 UEFI only
-part 2 = 20gb, ext3, linux, f96ce4

Drive is in a Dell E6430 laptop, bios/setup is configured to boot UEFI only.

The drive boots f96ce4 without issue.

Thanks
wizard

Absolutely correct. Every UEFI PC I have is set up UEFI/MSDOS

In fact, I routinely set up thumbdrives to boot either UEFI or BIOS automatically


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 2:00 pm
by dimkr
wizard wrote: Sun Jul 28, 2024 12:42 pm

-partition table = msdos
-part 1 = 100mb, fat32, boot, ESP, grub2 UEFI only

How can you configure a partition as the ESP if you're not using GPT? Partitions under a BIOS partition tables have the boot flag, not the ESP flag.


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 2:10 pm
by jp734

Down the rabbit hole we go :lol:

Ok, so...
BIOS LEGACY + UEFI or GPT TABLE HD = NO BOOT (based on my pc not booting from external usb drive)
BIOS LEGACY + MSDOS TABLE HD = BOOT (based on my pc finally booting from external usb drive after re-creating partition table from GPT to MSDOS)
BIOS UEFI + MSDOS TABLE HD with UEFI grub2 = BOOT (based on @wizard's setup - could this be the "fall back" @dimkr was talking about?)

To test what @wizard did, using bookwormpup 10.0.7, I reinstalled grub2config on my internal SSD with MSDOS partition table and checked EFI BOOT LOADER (see bottom of screenshot). Now, my pc boots after setting BIOS to UEFI, when yesterday it will not. :?: :roll: This is very interesting. My sda drive IS NOW listed under both UEFI and Legacy bootable device. Last time it was just under Legacy as mentioned on my previous post.

The only file(s)/folder(s)that was added to my sda boot partition is the EFI folder and apparently, it's the only thing we need to boot MSDOS partitioned tabled HD on UEFI


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 2:59 pm
by wizard

@dimkr

How can you configure a partition as the ESP if you're not using GPT?

The drive was set up using Gparted and it allowed setting both the "boot" and "ESP" flags. Went back and removed the ESP flag and it did not affect booting.

One other thought, if UEFI boot would only work with GPT, how are we able to create UEFI bootable USB flash drives which are not set up with GPT partition tables?

Thanks
wizard


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 3:28 pm
by dimkr
wizard wrote: Sun Jul 28, 2024 2:59 pm

how are we able to create UEFI bootable USB flash drives which are not set up with GPT partition tables?

Do you have legacy boot enabled? Do you have a boot loader and a MBR on the flash drive?

EDIT: some resources say there are old UEFI implementations that boot from BIOS partition tables, I probably never witnessed one of those, although I have a 2011 laptop that's supposed to be old enough.


Re: Grub Entry for USB External Drive [SOLVED]

Posted: Sun Jul 28, 2024 4:30 pm
by wizard

@dimkr

Do you have legacy boot enabled?

No and confirmed that there is no "fallback" by trying to boot a drive set up as legacy MBR only, which fails to boot.

Do you have a boot loader and a MBR on the flash drive?

Yes

Thanks
wizard