[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?
From: |
Andrei Borzenkov |
Subject: |
Re: Does grub-mkrescue support UEFI hybrid USB/DVD images? |
Date: |
Fri, 23 Jan 2015 20:58:39 +0300 |
В Fri, 23 Jan 2015 10:45:08 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden> пишет:
> On 23.01.2015 10:40, Andrei Borzenkov wrote:
> > On Fri, Jan 23, 2015 at 1:15 AM, Vladimir 'φ-coder/phcoder' Serbinenko
> > <address@hidden> wrote:
> >> On 22.01.2015 22:25, Kris Moore wrote:
> >>>
> >>> Hey all,
> >>>
> >>> We are trying to create hybrid USB/DVD images, and they work just fine
> >>> on BIOS. However it doesn't seem to work when creating UEFI.
> >>>
> >> Try this:
> >> diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
> >> index 3b12c34..983afdb 100644
> >> --- a/grub-core/disk/efi/efidisk.c
> >> +++ b/grub-core/disk/efi/efidisk.c
> >> @@ -862,9 +862,7 @@ grub_efidisk_get_device_name (grub_efi_handle_t
> >> *handle)
> >> if (! ctx.partition_name)
> >> {
> >> grub_disk_close (parent);
> >> - if (is_cdrom)
> >> - return grub_strdup (device_name);
> >> - return 0;
> >> + return grub_strdup (device_name);
> >
> > How is it possible? So we have EFI device path that refers to
> > partition (or at least to something that does not start on device
> > first block) but grub does not see this partition? In case of CD-ROM
> > this happens because CD-ROM media subtype actually refers to ESP and
> > so points inside CD-ROM. But how it can happen for hard disk?
> >
> I think his EFI uses eltorito even from the stick. In that case we end
> up in exactly the same scenario as CD-ROM.
Not eltorito, but normal ESP.
Media paths
Handle 0x2f241518
/ACPI(a0341d0,0)/PCI(0,4)/HD(1,40,8c,8678dcb08dcc6944,2,2)/EndEntire
disk
block
device path
Handle 0x2f241298
/ACPI(a0341d0,0)/PCI(0,4)/HD(2,cc,1680,8678dcb08dcc6944,2,2)/EndEntire
simple FS
disk
c12a7328-f81f-11d2-ba4b-00a0c93ec93b
block
device path
Handle 0x2f241018
/ACPI(a0341d0,0)/PCI(0,4)/HD(3,174c,3548,8678dcb08dcc6944,2,2)/EndEntire
disk
block
device path
All of them match existing partitions. EFI boots from ESP as it should.
Boot path grub gets
/ACPI(a0341d0,0)/PCI(0,4)/HD(2,cc,1680,8678dcb08dcc6944,2,2)/EndEntire
which matches ESP. The reason it is not found at startup is missing part_gpt:
grub rescue> ls
(hd0) (hd0,apple4) (hd0,apple3) (hd0,apple2) (hd0,apple1) (fd0) (fd1) (cd0)
After adjusting prefix:
grub> insmod part_gpt
grub> ls
(proc) (hd0) (hd0,apple4) (hd0,apple3) (hd0,apple2) (hd0,apple1) (hd0,gpt3)
(hd0,gpt2) (hd0,gpt1) (fd0) (fd1) (cd0)
But returning (hd0,gpt2) would also be wrong here - ESP on CD image is
empty, we need to somehow jump from ESP to full ISO image.
So I guess your patch is the least evil. I will add some comments to
grub_efidisk_get_device_name() and grub-mkrescue to explain what
happens here after you push it.
pgpSnvkPVbkOU.pgp
Description: OpenPGP digital signature
- Does grub-mkrescue support UEFI hybrid USB/DVD images?, Kris Moore, 2015/01/22
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/01/22
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Andrei Borzenkov, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Andrei Borzenkov, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Thomas Schmitt, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Kris Moore, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Thomas Schmitt, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?,
Andrei Borzenkov <=
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Andrei Borzenkov, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Andrei Borzenkov, 2015/01/23
- Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, Thomas Schmitt, 2015/01/23
Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?, adrian15, 2015/01/23