From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NfPOm-0000qb-W9 for mharc-grub-devel@gnu.org; Wed, 10 Feb 2010 22:07:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfPOl-0000qC-A5 for grub-devel@gnu.org; Wed, 10 Feb 2010 22:07:23 -0500 Received: from [199.232.76.173] (port=37007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfPOk-0000q4-Vn for grub-devel@gnu.org; Wed, 10 Feb 2010 22:07:23 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfPOj-0006WN-UY for grub-devel@gnu.org; Wed, 10 Feb 2010 22:07:22 -0500 Received: from mail-bw0-f219.google.com ([209.85.218.219]:47366) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfPOj-0006WJ-KL for grub-devel@gnu.org; Wed, 10 Feb 2010 22:07:21 -0500 Received: by bwz19 with SMTP id 19so673652bwz.8 for ; Wed, 10 Feb 2010 19:07:20 -0800 (PST) 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=+wDGDR0MeRcCJE1KY7TNtEtCIVCbqi6o0n1O4G+Hzdk=; b=aFbxJLs2/MihNAKDGk+bB/gnmt9ZdHkJHCbfLPmepqMVAvFVaX2ZUyVuTvH+wfKuia 5TZxsqjyqslhEhU7/2PbYqqeGepqMCli3gB73SgGNOcjrAI71BhT8j/AIEsUQXV0KM5i /f1Uy7HDkvxJsjwPRmIlHoDax+1o5f0Nun1oI= 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=eBjsMJXDayPbvfoWz6h4kAURRuO5ymw9X1uLU0C/5vfzYvBmW8SXLBY0rZCJFISGup CJgBFf+9bWkGB3ZNdpqN1L2taw18v3Ua5hOvrqY8rzqvgvJ3ExcEEw11pUXPv590p/fz /pCM16WnzHkgDqSfn8YOK8Ax1YyGFqru+Z0v8= Received: by 10.204.33.196 with SMTP id i4mr761957bkd.155.1265857640223; Wed, 10 Feb 2010 19:07:20 -0800 (PST) Received: from debian.bg45.phnet (gprs27.swisscom-mobile.ch [193.247.250.27]) by mx.google.com with ESMTPS id 15sm844392bwz.8.2010.02.10.19.07.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Feb 2010 19:07:19 -0800 (PST) Message-ID: <4B73745A.1070908@gmail.com> Date: Thu, 11 Feb 2010 04:07:06 +0100 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: <4B5E2B44.2060106@gmail.com> In-Reply-To: <4B5E2B44.2060106@gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigE2C089AE9DA79A1509EF92DE" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Multiboot's boot_device field specification + implementation bug 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: Thu, 11 Feb 2010 03:07:23 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE2C089AE9DA79A1509EF92DE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Gr=C3=A9goire Sutre wrote: > Hi, > > I'm trying to understand the specification of the multiboot > boot_device field. How should this information be interpreted by a > kernel that uses a native (non-DOS) disk label? For instance, if the > MBI passed to the NetBSD kernel says part1=3D5 and part2=3Dpart3=3D0xFF= , > does this mean: > > - 6th partition in the NetBSD disk-label, or > - 6th partition in the DOS disk label (MBR)? > > The specification says that part1 specifies the top-level partition > number. However there may be several top-level disk-labels. For > instance: take a disk with a DOS disk-label (in the MBR) but without > any UFS partition in it, and install a NetBSD disk-label on the > disk. The NetBSD disk-label will be written in the second sector of > the disk, and both disk-labels will be independent and top-level. For > a NetBSD kernel, the top-level disklabel will be the NetBSD one, and > for other kernels the top-level disk-label may be the DOS one. > Indeed multiboot1 doesn't specify which label was used. It simply doesn't pass this information. I suggest to replace partition number with 64-bit starting_byte field. This way you avoid problems with both labels and sector sizes, > > > On a related note, experiments with the multiboot example kernel show > that setting root in GRUB has an impact on the value of the > boot_device field: > > (a) set root=3D(hd1,2,a) ; multiboot /mbtest ; boot > --> boot_device =3D 0x810100ff > > (b) multiboot (hd1,2,a)/mbtest ; boot > --> boot_device =3D 0x8000ffff > > According to the spec, (a) is correct but (b) is wrong. It looks like > the boot_device field of MBI is set using the value of $root. > OS developer doesn't care where the kernel was loaded from: disk, network, flash or hyperspace. He cares only where the rest of the system is (optionally containing a copy of the kernel). Consider following case:= You have an operating system O which recognises only filesystem FO and bootloader B which recognises only filesystem FB. User wants to use O with B. He copies kernel from FO to FB. But now kernel is loaded from FB where no rest of the system is present so kernel still expects boot_device to point to FO. To this end I think spec has to be adjusted. It shouldn't give any backwards compatibility problems since OSes expect boot_devices to point to their root. > Best regards, > > Gr=C3=A9goire > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigE2C089AE9DA79A1509EF92DE 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 iF4EAREKAAYFAktzdGAACgkQNak7dOguQglqQAEAuKqaVqSvvtwqHckq4srnTZK3 7xpew5QwgSdED4XwFUoA/043hv87fUIodqddF1HytdiJ38yS9cemi20l/58/JJ6k =0cKz -----END PGP SIGNATURE----- --------------enigE2C089AE9DA79A1509EF92DE--