Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LizCD-0006AM-8g for mharc-grub-devel@gnu.org; Sun, 15 Mar 2009 18:52:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LizCB-00067Y-Nm for grub-devel@gnu.org; Sun, 15 Mar 2009 18:52:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LizCB-00067M-AJ for grub-devel@gnu.org; Sun, 15 Mar 2009 18:52:39 -0400 Received: from [199.232.76.173] (port=34307 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LizCB-00067J-7O for grub-devel@gnu.org; Sun, 15 Mar 2009 18:52:39 -0400 Received: from [74.93.104.97] (port=55456 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LizCA-0003ox-OG for grub-devel@gnu.org; Sun, 15 Mar 2009 18:52:38 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 3D821C8D940; Sun, 15 Mar 2009 15:52:26 -0700 (PDT) Date: Sun, 15 Mar 2009 15:52:26 -0700 (PDT) Message-Id: <20090315.155226.169145783.davem@davemloft.net> To: grub-devel@gnu.org, chaac@nic.fi From: David Miller In-Reply-To: <49BCC8CD.7030903@nic.fi> References: <20090314.151417.194555320.davem@davemloft.net> <49BCC8CD.7030903@nic.fi> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Subject: Re: GRUB device names wrt. ieee1275 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: Sun, 15 Mar 2009 22:52:39 -0000 From: Vesa J=E4=E4skel=E4inen Date: Sun, 15 Mar 2009 11:22:21 +0200 > David Miller wrote: > > The problem is two fold: > > = > > 1) "," characters can appear anywhere in an openfirmware path > > name. For example my workstations disk is: > > = > > /pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/disk@0 > > = > > There are no quick workarounds for this. For example, even if w= e > > can change the partition fetching code in GRUB to use "strrchr()= " > > instead of "strchr()" in kern/disk.c:grub_disk_open() it will > > still think the above path has partition ",600000" or something > > silly like that. > = > Actually related question here is that how do you specify similar dev= ice > paths in x86? Now that there is pci support and some kinda usb suppor= t > it could be good idea to specify exact device somehow in some use cas= es. I have no idea, it has to be something very similar. My suspicion is that they've been purely using device aliases which elides the whole "commas in the path" issue. > > 2) Disks can have multiple comma seperated components especially > > on SCSI in OF path names. For example a disk on target 2, > > lun 3, would have final path component "disk@2,3" > > = > > And currently that ",3" would look like a parition specification= > > to GRUB. > > = > > Therefore, I would suggest that we adopt the openfirmware partition= > > specification of ":" on GRUB for ieee1275 platforms. > > = > > Then we just have a machine specific path seperator, defined in > > some header file and the kernel/disk.c code > > and elsewhere use the macro instead of "," > > = > > Any objections? > = > So you propose following: > = > (/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/disk@0:1) > (/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/disk@0:a,1) > = > ( $FW_DISK_NAME + ':' + $GRUB_PARTITION_SCHEME ) I'm proposing purely ":a" instead of how grub currently says ",1". There is work some folks are doing on EFI support for openfirmware. One consequence of that is that you have to support more partitions than 'a' - 'z' can represent, and the encoding there would be to use decimal numbers for partitions larger than 25 so it would be ":26", ":27", etc. > Lets try couple of examples: > = > 1. (hd0) =3D> a-d) device alias 'hd0', no partition > = > 2. (hd0,1) =3D> a-d) device alias 'hd0', partition '1' > = > 3. (hd0:1) =3D> > a) device alias 'hd0:1', no partition > b) device alias 'hd0:1', no partition > c) device alias 'hd0', partition '1' > d) device alias 'hd0:1', no partition This is not what I'm proposing at all. On openfirmware platforms (only) what you would call "hd0,1" would become "$(OPENFIRMWARE_PATH_OR_DEVALIAS):a" So we'd have things like: disk:a /* openfirmware devalias */ disk1:a /* openfirmware devalias */ /pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/disk@0:a /* full path */ etc. There is no confusion here, ":" always means the path has ended and we are about to see a partition specifier. Lack of ":" means whole-disk.