From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NxfQ2-0005Ss-0N for mharc-grub-devel@gnu.org; Fri, 02 Apr 2010 07:52:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxfPL-0003xK-DX for grub-devel@gnu.org; Fri, 02 Apr 2010 07:51:27 -0400 Received: from [140.186.70.92] (port=38161 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxfPJ-0003wK-SD for grub-devel@gnu.org; Fri, 02 Apr 2010 07:51:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxfPH-0007rX-P1 for grub-devel@gnu.org; Fri, 02 Apr 2010 07:51:25 -0400 Received: from mail-fx0-f227.google.com ([209.85.220.227]:59895) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxfPH-0007rN-DP for grub-devel@gnu.org; Fri, 02 Apr 2010 07:51:23 -0400 Received: by fxm27 with SMTP id 27so1082164fxm.8 for ; Fri, 02 Apr 2010 04:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=X7wJ+oOxSuqfFGd+LHz0eppRw9blcMmdbSnyFKKudcc=; b=bJIXR89JItYEppC9jmO1t2akbrPg08Tqff/ptHp+xtQvTobzaYd9g2zB051QP69NUk jEB4SuzDXNLvunmNZYBpjW8oeZR5IYDBX9dafQbp0HgaZOkI15uxd5iMrv85M2Ku7165 QrSXa1Wqp5nctc7XW0UIEyzI+PIh4t33rSW0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=CakwfjnbJtczQ+zMfEOwYSiw+iIJ1UT/F+zF7tsdHWU3XpGhZhdLj5/s4ysLjqIHFD oGi6mhhe0nq52yMWkJUQK0WUlTJWZf0VRY3ICBb2iqLvIF5H4WxTgxOuu/I5CIiU6sE5 b6Vis5gYYzLbo70uNRfRctRd/yHuAJ3qjoR50= Received: by 10.223.5.211 with SMTP id 19mr1839274faw.63.1270209082533; Fri, 02 Apr 2010 04:51:22 -0700 (PDT) Received: from debian.bg45.phnet (89-37.203-62.cust.bluewin.ch [62.203.37.89]) by mx.google.com with ESMTPS id 21sm19829016fks.53.2010.04.02.04.51.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 04:51:22 -0700 (PDT) Message-ID: <4BB5DA32.8000401@gmail.com> Date: Fri, 02 Apr 2010 13:51:14 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <4BB5218F.2000000@gmail.com> <105805073418349@192.168.2.69> In-Reply-To: <105805073418349@192.168.2.69> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig04CB60CA793B6764C8230AC8" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: How to prepare an ISO 9660 CD for booting via GRUB ? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 11:51:27 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig04CB60CA793B6764C8230AC8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thomas Schmitt wrote: > Hi, > > Drake Donahue wrote: > =20 >>>> mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-siz= e 4 >>>> -boot-info-table -o grub.iso iso >>>> =20 >> run the script it generates the image, presuming on a linux system >> =20 > > 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). > > =20 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=3D1.96 > It uses genisoimage and no --embedded-boot for > a MBR-style image. > > =20 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. > > =20 =46rom 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. > =20 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. > > =20 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: > =20 >> 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 int= o >> HFS but I think I can do it. >> =20 > > If you have the time, then try to find specs for > HFS=20 http://developer.apple.com/legacy/mac/library/documentation/mac/Files/Fil= es-2.html > and make a sketch how a HFS tree would > be structured. > =20 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. > =20 Just being sorted is mostly enough. Trouble is that HFS uses its own way of sorting. > > =20 >>>> --protective-msdos-label >>>> =20 >> 3) Put 0x80 (for bootable partition), 0, 2, 0 (C/H/S of the start), 0x= cd >> (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 >> =20 > > What number of sectors/head and heads/cylinder > to use ? > > =20 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: > =20 >>> --protective-msdos-label without --embedded-boot ?) >>> =20 > Vladimir: > =20 >> Yes, for example to allow people dd images to USB sticks without a fea= r >> of another OS willing to format the stick. >> =20 > > So OSes would pop up dangerous dialogs if they > see a USB stick without partition table ? > > =20 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 ? > > =20 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 ? > > =20 Because sector value is 1-based. > Isn't there any field where the number of sectors > per head, and heads per cylinder is recorded ? > =20 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. > =20 /* 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. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig04CB60CA793B6764C8230AC8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAku12jgACgkQNak7dOguQgmVxQD/chOZYkLHDtRe+24IGSiQlpMj sss8JMp+94Ai6G0hvB4A/AxYnty3bOgO76yTBjXi6Odu53AjbrMrp/BpJw8HHUvy =wQur -----END PGP SIGNATURE----- --------------enig04CB60CA793B6764C8230AC8--