Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OO9fh-0000Zo-Lk for mharc-grub-devel@gnu.org; Mon, 14 Jun 2010 09:25:49 -0400 Received: from [140.186.70.92] (port=39642 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OO9ff-0000Xi-DT for grub-devel@gnu.org; Mon, 14 Jun 2010 09:25:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OO9fe-0003Sh-4t for grub-devel@gnu.org; Mon, 14 Jun 2010 09:25:47 -0400 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:40240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OO9fe-0003SV-0W for grub-devel@gnu.org; Mon, 14 Jun 2010 09:25:46 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1OO9fc-0006IT-Fd for grub-devel@gnu.org; Mon, 14 Jun 2010 13:25:44 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1OO9fX-0004If-00; Mon, 14 Jun 2010 14:25:39 +0100 Date: Mon, 14 Jun 2010 14:25:39 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100614132536.GO21862@riva.ucam.org> References: <4C0BE2C7.4020407@gmail.com> <4C0D5AAE.6070504@gmail.com> <4C13B6A8.7060102@gmail.com> <4C13C33B.4090302@gmail.com> <4C15044D.9050608@gmail.com> <20100614113702.GN21862@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-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 13:25:48 -0000 On Mon, Jun 14, 2010 at 08:07:35AM -0500, richardvoigt@gmail.com wrote: > Colin Watson wrote: > > 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. > > Instead of doing string replacement, why not just define a > disk-relative partition format? Simple string replacement would be much easier to implement, and probably smaller. Plus, we don't need disk-relative device naming elsewhere, and I think it would require putting platform-specific code (otherwise how do you know which disk to be relative to?) in places that are otherwise pretty platform-independent. > Also, the '\0' seems unnecessary. Is having "(," meaningful in some > way already? Good point. This would be sufficient. -- Colin Watson [cjwatson@ubuntu.com]