Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OO8GV-0007NE-J5 for mharc-grub-devel@gnu.org; Mon, 14 Jun 2010 07:55:44 -0400 Received: from [140.186.70.92] (port=50506 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OO8GN-00075w-UF for grub-devel@gnu.org; Mon, 14 Jun 2010 07:55:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OO7yU-0008QW-Cs for grub-devel@gnu.org; Mon, 14 Jun 2010 07:37:07 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:37136) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OO7yU-0008QB-3W for grub-devel@gnu.org; Mon, 14 Jun 2010 07:37:06 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1OO7yS-0005Dy-10 for grub-devel@gnu.org; Mon, 14 Jun 2010 11:37:04 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1OO7yR-0003WD-00; Mon, 14 Jun 2010 12:37:03 +0100 Date: Mon, 14 Jun 2010 12:37:03 +0100 From: Colin Watson To: The development of GNU GRUB Message-ID: <20100614113702.GN21862@riva.ucam.org> References: <4C0BE2C7.4020407@gmail.com> <4C0D5AAE.6070504@gmail.com> <4C13B6A8.7060102@gmail.com> <4C13C33B.4090302@gmail.com> <4C15044D.9050608@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4C15044D.9050608@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Which partitioning schemes should be supported by 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: Mon, 14 Jun 2010 11:55:40 -0000 On Sun, Jun 13, 2010 at 06:16:13PM +0200, Grégoire Sutre wrote: > On 06/12/2010 07:26 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: >> And currently grub isn't changed to new partition notation >> completely. E.g. during startup prefix is calculated with old syntax >> and confusing A+B with either A or B is likely to make user drop into >> rescue shell > > Is someone working on making the startup prefix use the new notation? I've only looked at the i386-pc startup sequence here, but the thing that jumps out at me is that grub_install_dos_part and grub_install_bsd_part are both longs. I doubt we really need to support 2 billion partitions. How about we split off, say, a byte of that to hold the partition map type, and then it would be easy enough for the startup code to turn that into appropriate prefixes? There are two downsides that I can see: * We would need to maintain an enum of partition map identifiers; but there's precedent for this approach already, such as grub_disk_dev_id. * The names of all the partition maps would have to live in the kernel somewhere; packed as sequential strings, this comes to 42 bytes plus the code to use it, which isn't a lot by most measures but I know we never have much slack in the kernel. I can think of an alternative. We do still need grub_install_dos_part and grub_install_bsd_part for the multiboot trampoline, which is in assembly, so it's difficult to abandon them altogether. However, there's no reason we need to use them in make_install_device. How about we invent a way to encode most of the information in string form in grub_prefix, while leaving a placeholder for make_install_device to fill in the disk? There are 64 bytes available for grub_prefix, which should be plenty. For example, how about the following (with \0 standing for ASCII NUL): (\0,msdos1,bsd1)/boot/grub It's then just a matter of spotting the "(\0," sequence and replacing the \0 with the drive name. I think this can probably be done using less code than the first option above, and all told it feels a bit less hacky to me. What do people prefer? -- Colin Watson [cjwatson@ubuntu.com]