help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create legacy bios/uefi dual boot usb stick


From: Andrei Borzenkov
Subject: Re: Create legacy bios/uefi dual boot usb stick
Date: Wed, 23 Dec 2015 14:53:30 +0300

On Wed, Dec 23, 2015 at 2:39 PM, John Frankish
<address@hidden> wrote:
> Hi,
>
> I've been trying, without success, to create a legacy bios/uefi dual boot
> usb stick.
>
> If I partition the usb stick using gdisk, like this:
>
>
> $ sudo gdisk /dev/sdc
> ...
> Number  Start (sector)    End (sector)  Size       Code  Name
>    1            2048         2097152   1023.0 MiB  EF00  EFI System
>    2         2099200         2103295   2.0 MiB     EF02  BIOS boot partition
>    3         2103296        61013982   28.1 GiB    8300  Linux filesystem
>
> $ sudo mkfs.vfat /dev/sdc1
> $ sudo mkfs.ext4 /dev/sdc3
>
> $ sudo mount /dev/sdc1
> $ sudo x86_64-grub-install --target=x86_64-efi
> --boot-directory=/mnt/sdc1/EFI/BOOT --efi-directory=/mnt/sdc1 --removable
>
> $ sudo mount /dev/sdc3
> $ sudo x86_64-grub-install --target=i386-pc --boot-directory=/mnt/sdc3/boot
> /dev/sdc2
>

That's wrong. BIOS boot partition is used as replacement for post-MBR
gap, i.e. it is never used directly by grub.

> ..the last line fails with an error message that I forgot to note down.
>
> If I then try:
>
> $ sudo x86_64-grub-install --target=i386-pc --boot-directory=/mnt/sdc3/boot
> /dev/sdc
>

That's correct; but why do you use different boot directory? The whole
point of using multiboot medium is to have *single* /boot grub (and
whatever configuration, themes etc are there) that is used by every
platform.

> ..there is no error message, uefi boot works fine, but legacy bios boot
> fails with an "invalid partition table" error
>

Where this error comes from? I do not see this string in GRUB sources
and it really does not care; it would stop in rescue mode then.

Recently someone reported problem with booting rescue image on legacy
BIOS - it would refuse to consider medium bootable unless medium has
*msdos* partition table with active partition. This sounds like it
could be the reason.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]