All of lore.kernel.org
 help / color / mirror / Atom feed
* Using efi image on USB stick
@ 2010-05-17 21:48 Vladimir 'φ-coder/phcoder' Serbinenko
  2010-05-18 11:12 ` Colin Watson
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-05-17 21:48 UTC (permalink / raw)
  To: Thomas Schmitt; +Cc: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

Thanks to Seth Goldberg's and Jordan Uggla's testing it was discovered
how to make same iso bootable on EFI as both cdrom and usb stick. For
this it's needed in addition to el-torito to add a partition table with
a partition type 0xef pointing to the EFI image. What do you think the
best way to make it work with protective partition? Perhaps we should
have 3 partitions: protective1, EFI image, protective2. Perhaps we'll
need to have a fat partition with a stadard FAT partition type for
i386-ieee1275 (pure speculation, nothing checked yet). And MBR has space
only for 4 entries. I see following possibilities for this case:
1) Forcing FAT partitions to follow each other. It will probably be
tricky to implement and will mainly offset the problem
2) Leaving some space unprotected. Not good because it won't be possible
to safely add partitions to stick after DD'ing
3) Using GPT. Tricky because of backup GPT copy at disk end and doesn't
solve all the problems.
4) Using extened partition. IMHO it's the best way. We can have one
extended partition spanning accross the whole iso (marked as bootable to
workaround bugs in some BIOSes).  EBR will be placed into 2 sector which
is currently occupied by kernel.img but kernel.img can be moved anywhere
on iso9660. This way we have unlimited number of partitions available
for usage and leace the user 3 primary slots and unlimited number of
secondary partitions.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using efi image on USB stick
  2010-05-17 21:48 Using efi image on USB stick Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-05-18 11:12 ` Colin Watson
  2010-05-18 11:25   ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Watson @ 2010-05-18 11:12 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Thomas Schmitt

On Mon, May 17, 2010 at 11:48:12PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Thanks to Seth Goldberg's and Jordan Uggla's testing it was discovered
> how to make same iso bootable on EFI as both cdrom and usb stick. For
> this it's needed in addition to el-torito to add a partition table with
> a partition type 0xef pointing to the EFI image.

I ran across http://fedoraproject.org/wiki/Anaconda/Features/UEFI the
other day, which says that a number of BIOSes fail to handle multiple El
Torito boot images correctly.  You seem to be taking a somewhat
different approach; does it avoid this problem?  I don't know how well
BIOSes handle MBR partition tables on CD-ROMs.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using efi image on USB stick
  2010-05-18 11:12 ` Colin Watson
@ 2010-05-18 11:25   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-05-18 12:03     ` Colin Watson
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-05-18 11:25 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Thomas Schmitt

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

Colin Watson wrote:
> On Mon, May 17, 2010 at 11:48:12PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>   
>> Thanks to Seth Goldberg's and Jordan Uggla's testing it was discovered
>> how to make same iso bootable on EFI as both cdrom and usb stick. For
>> this it's needed in addition to el-torito to add a partition table with
>> a partition type 0xef pointing to the EFI image.
>>     
>
> I ran across http://fedoraproject.org/wiki/Anaconda/Features/UEFI the
> other day, which says that a number of BIOSes fail to handle multiple El
> Torito boot images correctly.  You seem to be taking a somewhat
> different approach; does it avoid this problem?
We still need 2 El Torito images. I was just discussing how to make it
bootable when dd'ed to USB stick. We keep BIOS El-torito image first in
catalog so buggy BIOSes should still handle it correctly.
>   I don't know how well
> BIOSes handle MBR partition tables on CD-ROMs.
>
>   
We and syslinux did it previously with no apparent problems



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using efi image on USB stick
  2010-05-18 11:25   ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-05-18 12:03     ` Colin Watson
  2010-05-18 12:44       ` Thomas Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Watson @ 2010-05-18 12:03 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Thomas Schmitt

On Tue, May 18, 2010 at 01:25:10PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Colin Watson wrote:
> > On Mon, May 17, 2010 at 11:48:12PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >> Thanks to Seth Goldberg's and Jordan Uggla's testing it was discovered
> >> how to make same iso bootable on EFI as both cdrom and usb stick. For
> >> this it's needed in addition to el-torito to add a partition table with
> >> a partition type 0xef pointing to the EFI image.
> >
> > I ran across http://fedoraproject.org/wiki/Anaconda/Features/UEFI the
> > other day, which says that a number of BIOSes fail to handle multiple El
> > Torito boot images correctly.  You seem to be taking a somewhat
> > different approach; does it avoid this problem?
> 
> We still need 2 El Torito images. I was just discussing how to make it
> bootable when dd'ed to USB stick. We keep BIOS El-torito image first in
> catalog so buggy BIOSes should still handle it correctly.

The Fedora wiki page suggests that this is sadly not the case.  I guess
all we can do is test ...

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using efi image on USB stick
  2010-05-18 12:03     ` Colin Watson
@ 2010-05-18 12:44       ` Thomas Schmitt
  2010-05-18 12:54         ` Colin Watson
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Schmitt @ 2010-05-18 12:44 UTC (permalink / raw)
  To: grub-devel

Hi,

Colin Watson wrote:
> I don't know how well
> BIOSes handle MBR partition tables on CD-ROMs.

According to ECMA-119 (aka ISO 9660) the first
32 kB of an image are "System Area" with
arbitrary custom content.
El Torito specs mention that this area may
contain a bootable disk image. (Figure 1,
case "Multiple Boot-Image Configuration").
To my view, a bootable disk image may well begin
by an MBR which does not necessarily have to
describe the geometry of the entire CD.
The BIOS learns the positions of boot images from
the El Torito boot catalog. The position of the
boot catalog is given by the El Torito record in
sector 17 (decimal) of the CD.

So it seems natural that the BIOS should not
interpret the system area of a CD unless the
boot catalog points to it as boot image.
Currently the xorriso generated boot catalogs
do not point to the system area.
But even if they would, then the bytes at the
position of a partition table should not be
interpreted as partition table of the CD.


> http://fedoraproject.org/wiki/Anaconda/Features/UEFI :
"Many BIOS implementations, ... do not correctly
 handle the multiple El-Torito boot blocks"

El Torito specs (of 1995) talk of "BIOS with
Single Boot-Image capability" in contrast to
"BIOS with Multiple Boot-Image capability".
I interpret the following statement as a
prescription that single-boot BIOSes shall ignore
further boot images:
"Single-Image INT 19 knows nothing about
 multiple-images, nor does it know about their
 possible entries listed in the Booting Catalog."


> I guess all we can do is test ...

Maybe one should publish a little test image
which is alread yknown to work on some systems.
(I could test with a 64 bit AMD quadcore and an
 old 32 bit AMD of 2004.)


Have a nice day :)

Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Using efi image on USB stick
  2010-05-18 12:44       ` Thomas Schmitt
@ 2010-05-18 12:54         ` Colin Watson
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Watson @ 2010-05-18 12:54 UTC (permalink / raw)
  To: The development of GNU GRUB

On Tue, May 18, 2010 at 02:44:09PM +0200, Thomas Schmitt wrote:
> Colin Watson wrote:
> > http://fedoraproject.org/wiki/Anaconda/Features/UEFI :
> "Many BIOS implementations, ... do not correctly
>  handle the multiple El-Torito boot blocks"
> 
> El Torito specs (of 1995) talk of "BIOS with
> Single Boot-Image capability" in contrast to
> "BIOS with Multiple Boot-Image capability".
> I interpret the following statement as a
> prescription that single-boot BIOSes shall ignore
> further boot images:
> "Single-Image INT 19 knows nothing about
>  multiple-images, nor does it know about their
>  possible entries listed in the Booting Catalog."

I agree with you on the theory, but as we know the world is full of
buggy BIOSes and it's often hard for users to deal with this when
they're at the level of their rescue CD not working.  I was just
wondering if you had any more practical information.

> > I guess all we can do is test ...
> 
> Maybe one should publish a little test image
> which is alread yknown to work on some systems.
> (I could test with a 64 bit AMD quadcore and an
>  old 32 bit AMD of 2004.)

Yes - I was planning to do this at some point as well.  I need to get
round to upgrading xorriso first.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-18 12:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-17 21:48 Using efi image on USB stick Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-18 11:12 ` Colin Watson
2010-05-18 11:25   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-18 12:03     ` Colin Watson
2010-05-18 12:44       ` Thomas Schmitt
2010-05-18 12:54         ` Colin Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.