From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JtnM1-0000pD-J8 for mharc-grub-devel@gnu.org; Wed, 07 May 2008 13:22:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtnLz-0000o7-4L for grub-devel@gnu.org; Wed, 07 May 2008 13:22:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtnLx-0000nu-Tu for grub-devel@gnu.org; Wed, 07 May 2008 13:22:54 -0400 Received: from [199.232.76.173] (port=41386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtnLx-0000nn-NK for grub-devel@gnu.org; Wed, 07 May 2008 13:22:53 -0400 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JtnLx-0004dN-7n for grub-devel@gnu.org; Wed, 07 May 2008 13:22:53 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 07 May 2008 13:22:51 -0400 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 5DC0D619058 for ; Wed, 7 May 2008 13:22:51 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20080507130307.GD16492@thorin> References: <4807AA02.1020909@mail.berlios.de> <20080418132858.GH29226@thorin> <480A02F3.7000504@mail.berlios.de> <20080420100713.GA16764@thorin> <1208773866.29071.11.camel@dv> <20080506151800.GA25697@thorin> <1210088628.2796.14.camel@dv> <20080507130307.GD16492@thorin> Content-Type: text/plain Date: Wed, 07 May 2008 13:22:50 -0400 Message-Id: <1210180970.2321.17.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: retiring device.map X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 17:22:55 -0000 On Wed, 2008-05-07 at 15:03 +0200, Robert Millan wrote: > On Tue, May 06, 2008 at 11:43:48AM -0400, Pavel Roskin wrote: > > On Tue, 2008-05-06 at 17:18 +0200, Robert Millan wrote: > > > > > I completely agree. How do we go about this? First of all we need support > > > for labels, right? > > > > We have it already in the "search" command. Of course, there is always > > room for improvement. GRUB doesn't recognize Linux swap labels. It > > cannot set root to, say, partition 3 on a disk where partition 1 has the > > given label. > > Sorry, I was confusing labels with UUIDs. The problem with labels is they're > not garanteed to be unique, right? So maybe we need support for UUIDs.. Right. > > Anyway, the fix belongs to the installer. The first step would be not > > to use device.map is it's not needed. In other words, if it's not a > > cross-device install, don't read device.map and don't try to create it. > > I think this isn't an easy as it looks. grub-setup works much like grub-emu > in that it uses code from outside util/, which only understands devices when > represented in GRUB syntax. > > Maybe we could force-feed it something like "(/dev/something)" as if it > were a GRUB drive, but then how would it know how are partitions represented > by the OS? (%d, p%d, etc) Yes, that would be consistent with our use of names having everything needed for the access, without any mapping (like hd96 or ata2). We could probably try all possible partition styles for the given OS (numbers, letters, p + number). If we only needed mounted partitions, we could go through the list and check mounted devices for being partitions of the drive. Anyway, I'm afraid that part will remain OS-specific for now. > > Finally, update-grub should be modified to look for partitions by > > labels. > > We can do this already, without changing how device.map works. Though, we > need to reuse the same code in GRUB to obtain the labels (for robustness), > which would need some new option in grub-probe or so. Agreed. And we could probably use UUIDs too (optionally), although labels seem more readable to me. -- Regards, Pavel Roskin