From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: How to prepare an ISO 9660 CD for booting via GRUB ?
Date: Fri, 02 Apr 2010 13:51:14 +0200 [thread overview]
Message-ID: <4BB5DA32.8000401@gmail.com> (raw)
In-Reply-To: <105805073418349@192.168.2.69>
[-- Attachment #1: Type: text/plain, Size: 5582 bytes --]
Thomas Schmitt wrote:
> Hi,
>
> Drake Donahue wrote:
>
>>>> mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4
>>>> -boot-info-table -o grub.iso iso
>>>>
>> run the script it generates the image, presuming on a linux system
>>
>
> Regrettably i cannot spot stage2_eltorito on my
> SuSE 10.2 (which has such files but not eltorito)
> or on Debian 5.04 (where the GRUB installation
> has files like cdboot.img).
>
>
stage2_eltorito is grub legacy. Please disregard this part
> The Debian system (where i am novice too) does
> have /usr/bin/grub-mkrescue which has the line
> PACKAGE_VERSION=1.96
> It uses genisoimage and no --embedded-boot for
> a MBR-style image.
>
>
1.96 is way too old. Please disregard.
> So my plan for development looks like this:
> - Use grub-mkrescue on Debian to produce a
> bootable CD.
> - Examine it and check whether libisofs can
> produce the same. Make necessary enhancements.
> - Substitute genisoimage in grub-mkrescue by
> xorriso and produce bootable CD.
> - Upgrade Debian to GRUB 1.98 and try to produce
> an image that boots from USB stick and from CD.
>
>
From 1.96 to 1.98 grub-mkrescue was essentially rewritten. Supporting
1.96 (buggy, years old release) is basically a waste of time. Please use
either http://alpha.gnu.org/gnu/grub/grub-1.98.tar.gz or bzr checkout
from http://bzr.savannah.gnu.org/r/grub/trunk/grub/.
> This may last a few days. I have to dive into
> libisofs and check where we might be glued
> to ISOLINUX, inadvertedly.
> I will have to learn about GRUB installation
> and might need to cry for help.
>
Feel free to ask. But please use current versions.
> When i can perform grub-mkrescue gestures, then
> i plan to enable hard-disk emulation so that
> others (Vladimir ?) can test that.
>
>
It must be choseable whether to use emulation. By default no emulation
should be used (recent BIOSes have problems with emulation).
> Vladimir wrote about HFS:
>
>> I have an imac g3 I could test it on. The only catch is that I have no
>> burner at home. But it should be manageable. I never looked deeply into
>> HFS but I think I can do it.
>>
>
> If you have the time, then try to find specs for
> HFS
http://developer.apple.com/legacy/mac/library/documentation/mac/Files/Files-2.html
> and make a sketch how a HFS tree would
> be structured.
>
Bad news are that it needs B* trees and isn't compatible with embedded
boot trick.
B* trees should be relatively easy to generate since we have to do it
only once and not maintain their structure over time.
> I would then prepare hooks in libisofs where
> a HFS tree can be generated and inserted into
> the emerging ISO image.
>
> Then we could put our knowledge together for
> the HFS tree generator.
> libisofs holds a tree model of nodes, from which
> the image trees get derived. Ideally, i would
> have made any needed preparations in the tree
> model, and you would know how to express it in
> HFS.
>
Just being sorted is mostly enough. Trouble is that HFS uses its own way
of sorting.
>
>
>>>> --protective-msdos-label
>>>>
>> 3) Put 0x80 (for bootable partition), 0, 2, 0 (C/H/S of the start), 0xcd
>> (partition type), [3 bytes of C/H/S end], 0x01, 0x00, 0x00, 0x00 (LBA
>> start in little endian), [LBA end in little endian] at 446-462
>>
>
> What number of sectors/head and heads/cylinder
> to use ?
>
>
63/255 as its what is reported on most harddisks. Most modern tools will
ignore this field altogether so putting just anything sane is enough
> me:
>
>>> --protective-msdos-label without --embedded-boot ?)
>>>
> Vladimir:
>
>> Yes, for example to allow people dd images to USB sticks without a fear
>> of another OS willing to format the stick.
>>
>
> So OSes would pop up dangerous dialogs if they
> see a USB stick without partition table ?
>
>
I think they would, especially if they find no FS they expect to (fat).
> I would then have to write all zeros except the
> one slot in the partition table ?
>
>
Basically you need a fake partition to avoid disk appear as unformatted
> ------------------------------------------------
>
> Curiosity to fill my lack of MBR knowledge:
>
>
> How does "0x01, 0x00, 0x00, 0x00 (LBA start" match
> with "0, 2, 0 (C/H/S of the start)" ?
> I see in isohybrid a similar addition of 1 to
> start sector. So it is obviously correct.
> But why ?
>
>
Because sector value is 1-based.
> Isn't there any field where the number of sectors
> per head, and heads per cylinder is recorded ?
>
No. In times when it was a hard property of disk it was deemed
unnecessary. When big disks appeared C/H/S was largely abandoned.
> Is there a convention to express this in
> "C/H/S end" ? isohybrid seems to do so:
> heads-1 , sectors | high(cyls-1) , low(cyls-1)
> This gives in the sum the number of cyls.
> One could express that easier.
> Purpose could be to squeeze in the 1024th cylinder
> or to express heads/cyl and sectors/head.
>
/* The head of the start. */
grub_uint8_t start_head;
/* (S | ((C >> 2) & 0xC0)) where S is the sector of the start and C
is the cylinder of the start. Note that S is counted from one. */
grub_uint8_t start_sector;
/* (C & 0xFF) where C is the cylinder of the start. */
grub_uint8_t start_cylinder;
It's pretty much historical.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]
next prev parent reply other threads:[~2010-04-02 11:52 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 13:49 How to prepare an ISO 9660 CD for booting via GRUB ? Thomas Schmitt
2010-04-01 16:59 ` Frombenny
2010-04-01 17:59 ` Thomas Schmitt
2010-04-01 19:28 ` Drake Donahue
2010-04-01 20:43 ` Thomas Schmitt
2010-04-01 20:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-01 21:47 ` Drake Donahue
2010-04-01 18:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-01 20:25 ` Thomas Schmitt
2010-04-01 20:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-01 22:05 ` Thomas Schmitt
2010-04-01 22:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-02 9:32 ` Thomas Schmitt
2010-04-02 11:51 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-04-02 17:10 ` Thomas Schmitt
2010-04-02 17:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-03 8:03 ` Thomas Schmitt
2010-04-03 14:15 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-06 11:26 ` Thomas Schmitt
2010-04-07 12:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-07 14:11 ` Thomas Schmitt
2010-04-09 20:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-09 22:28 ` Thomas Schmitt
2010-04-09 22:53 ` Seth Goldberg
2010-04-10 7:37 ` Thomas Schmitt
2010-04-10 11:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-10 11:57 ` Thomas Schmitt
2010-04-10 12:27 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-10 12:57 ` Thomas Schmitt
2010-04-10 15:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-10 23:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-11 7:46 ` Thomas Schmitt
2010-04-11 12:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-11 12:56 ` Thomas Schmitt
2010-04-11 17:32 ` Colin Watson
2010-04-17 14:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-17 17:52 ` Thomas Schmitt
2010-04-17 18:04 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-17 19:39 ` Thomas Schmitt
2010-04-17 20:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-18 11:26 ` Thomas Schmitt
2010-04-24 19:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-18 12:41 ` Thomas Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB5DA32.8000401@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.