[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot
From: |
Andrey Borzenkov |
Subject: |
Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD |
Date: |
Tue, 12 Nov 2013 07:07:49 +0400 |
В Mon, 11 Nov 2013 20:40:55 +0100
Jacek Konieczny <address@hidden> пишет:
> On Mon, 11 Nov 2013 23:15:50 +0400
> Andrey Borzenkov <address@hidden> wrote:
> > > For EFI boot it should be straightforward – use the disk image as
> > > a hard-disk-emulation El-Torito EFI boot image.
> >
> > Do you mean - in addition to EFI boot image? Because EFI requires ESP
> > in "no emulation" mode to boot.
>
> Does it? Can you give me any pointers to relevant documentation?
Sure. EFI spec, 12.3.2.1 :)
IS0-9660 is the industry standard low level format used on CD-ROM and DVD-ROM.
The CD-
ROM format is completely described by the “El Torito” Bootable CD-ROM Format
Specification
Version 1.0. To boot from a CD-ROM or DVD-ROM in the boot services environment,
an EFI
System partition is stored in a “no emulation” mode as defined by the “El
Torito” specification. A
Platform ID of 0xEF indicates an EFI System Partition. The Platform ID is in
either the Section
Header Entry or the Validation Entry of the Booting Catalog as defined by the
“El Torito”
specification. EFI differs from “El Torito” “no emulation” mode in that it does
not load the “no
emulation” image into memory and jump to it. EFI interprets the “no emulation”
image as an EFI
system partition.
> I did that (using disk emulation image) with other loaders (plain EFI
> shell and ELILO) and it just worked ('no emulation' did not work with my
> disk image).
Yes, is your image partitioned? Could you give example how your image
is seen in EFI shell? EFI path for a media access would be
interesting.
> But it that is explicitely forbidden, then I will try
> something else.
>
It is not forbidden in any way; it is just that such CD will not be
directly bootable by EFI.
> > Why "msdos"? El-Torito CD does not have standard DOS label, so it
> > would be wrong name. And if you place whole image of partitioned disk
> > there, it becomes nested partition (dos label in El-Torito
> > "partition").
> >
> > Something like (cd,eltorito0,msdos1) probably.
>
> Hmmm. I expected GRUB to see the eltorito image as EFI disk – separate
> device.
It is not separate device. In EFI such partition would have media path
like CDROM(1) where `1' is boot catalog number. Could you please show
device path used to access your partition?
Do not confuse with BIOS which emulates Floppy/HDD for a selected boot
entry. I have not seen such requirement is EFI spec (although vendors
are free to implement it of course).
> But if GRUB ignores the EFI file system access interface (and I
> am afraid it does), then that may not work.
>
> > No. As it stands currently grub does not expose El-Torito image as
> > partition of CD media.
>
> I would not expect that.
>
> > But you need to place image on CD either way. Are you using this image
> > for anything else, like directly booting on non-EFI?
>
> The image is used directly (not in ISO) for booting (EFI and non-EFI)
> from USB disk, and for both EFI and non-EFI boot from CD.
>
Well, using it outside of CD is irrelevant for this :) But having image
for BIOS emulation boot already available could be an argument.
> BTW… my 'workaround' (with calling 'configfile' first with first
> 'search' result and continuing with loopback if that fails) worked well
> in VirtualBox, but failed on a real machine (manual loopback setup in
> the rescue shell still worked)… strange.
>
It could be a bug and you need to give more information, starting with
how you build grub, your CD and how you boot it.
>
> > > GRUB should be able to see the
> > > El-Torito contents, shouldn't it?
> > >
> >
> > So far there was not any use case. But yes, technically EFI does
> > expose it as "partition" so grub probably should too.
>
> I see. That would not techincally differ much from using the loopback
> device.
>
> My initial idea was a bit different. Having experience
> with other EFI loaders I expected GRUB to see files on the FAT partition
> of the image, like other loaders and EFI shell see. That seemed like a
> trivial solution - converting a bootable HDD image into a bootable CD
> was just adding it as an El-Torito there. It works for EFI shell and the
> shell sees the files on the FAT partition the same way when booted from
> the CD as when it was booted from the USB stick.
>
> But it seems GRUB does not use the EFI file-system access at all. Is
> that right?
Yes.
> Are there any plans to change that?
>
I do not think so.
> Anyway… it seems I need to change a boot loader, use separate GRUB boot
> image for EFI and use the loopback, or do things like everybody seems to
> do – make the ISO the 'primary' boot image and store that in other
> filesystems to make a USB stick bootable (using GRUB loopback)…
>
The thing is, placing files in El-Torito boot image makes them
effectively invisible for anyone - there is no simple way to "mount" it
under normal operating system either, which makes it hard to see what's
in there. And I doubt EFI envisioned full-fledged use if it - rather it
was done to enable access to ESP. So it is much easier to use standard
CD for actual content leaving this magic for absolutely necessary ESP
access.
But it is not set in stone - try describing your use case on grub-devel.
- GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Jacek Konieczny, 2013/11/11
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Andrey Borzenkov, 2013/11/11
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Jacek Konieczny, 2013/11/11
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD,
Andrey Borzenkov <=
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Jacek Konieczny, 2013/11/12
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Andrey Borzenkov, 2013/11/12
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Jacek Konieczny, 2013/11/12
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Andrey Borzenkov, 2013/11/14
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Jacek Konieczny, 2013/11/14
- Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD, Andrey Borzenkov, 2013/11/14