[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub-install revamp and grub-mkrescue adjustments
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
grub-install revamp and grub-mkrescue adjustments |
Date: |
Mon, 30 Jan 2012 04:14:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
I was looking into Szymon Janc's patch to compress GRUB modules and
found out that adding decompression modules makes it grow bigger than
the embed zone. So I propose the following change: make boot sector
point to eltotito.img and use diskboot.img at this location. This has
given good results with using a very crude patch to xorriso (attached
for illustration purposes). I've seen that isohybrid image make similar
changes, what is the exact behaviour for isohybrid? PErhaps we can unify
it with ours?
Offsets aren't written in stone and I wanted to change boot.img for isos
a bit first to allow it botting as a floppy even on broken BIOSes (we
need few routines for those which are overwritten by partition table,
I'll move them to the space reserved for BBP, it's no big deal since
there is no BBP on iso9660).
This also allows to use other embed sectors to create alternative
filesystems. As for the roadmap for creating an iso bootable everywhere
as both USB stick and CDROM we'll need following adjustments
- i386-pc: detailed above.
- *-efi: we currently support only CD-ROMs. Supporting USB sticks needs
just to create a partition of type 0xEF pointing to EFI eltorito image.
- Macs would need an APM and HFS(+) filesystem. No need to have HFS span
over whole disk. It can just point to a small image. To have an APM we
need to have bytes
4552 0200 (512 sectors). Rest of table goes to sectors 1-n (n is the
number of partitions)
- IBM PPC require PreP (msdos with type=42) partition.
- ARC would require 0b e5 a9 41 at the beginning and so it's skipped
- Put i386-ieee1275 images to the same 0xef partition as EFI images.
- Have an ext2 partition for mipsel-loongson and i386-multiboot
- Sun would use most of sector 0, so it's skipped.
So the layout is:
4552 0200 <grub code> <partition map: 0xef, 0x42, logical, empty> 55 aa
<APM entry covering partmap itself><APM protective entry 1><APM HFS><APM
protective entry 2><usual iso9660, right after prep file, an EBR>
Adjustments to xorriso:
- patch address in boot sector to eltorito.img. Patch 2nd sector of
eltorito.img to point to itself.
- set addresses to partitions to point to efi.img, prep.img and to an
EBR right after max (prep.img, efi.img, 4 x 512). Make EBR describe a
logical partition spanning the rest of iso9660. efi.img or prep.img may
be missing
- generate APM to point to the hfs.img
For supporting Sun (only, without any other one using sector 0):
-generate sun disklabel and patch an address and size to boot image in
sector 1.
For supporting ARC (only, without any other one using sector 0):
-generate DVH and set it to point to address of arc.img.
What do you think about this how reasonable is it?
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
compress.diff
Description: Text Data
xor.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grub-install revamp and grub-mkrescue adjustments,
Vladimir 'φ-coder/phcoder' Serbinenko <=