Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MWq51-0006Bw-Gq for mharc-grub-devel@gnu.org; Fri, 31 Jul 2009 07:15:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWq4z-00069l-Iv for grub-devel@gnu.org; Fri, 31 Jul 2009 07:15:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWq4u-00061g-Jh for grub-devel@gnu.org; Fri, 31 Jul 2009 07:15:16 -0400 Received: from [199.232.76.173] (port=58133 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWq4u-00061S-7G for grub-devel@gnu.org; Fri, 31 Jul 2009 07:15:12 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:45278) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWq4t-0006IU-El for grub-devel@gnu.org; Fri, 31 Jul 2009 07:15:11 -0400 Received: by bwz22 with SMTP id 22so1437515bwz.42 for ; Fri, 31 Jul 2009 04:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XsAncU4cdpdN0ZaNNQJ9JbXhEl+aWvKPO4ZIUsCb2ME=; b=Vy3hK+kvb2+rCa1ycUTibgFhRd8R1tWXHTXN1fuhaLZP8ZO3GfnecxoMfC5KGOay+T yDezJtOr1AbFMKnl1c+zch7vWlpYI+UdiqhEQ3qWllyDMzsog5Ht9p2vpUcyQxnFHdaN byU/puvpysIRn1mOiBM/fekgP2TV3zL9CM1PQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=rZd18a0kgZ+EC7fv3te5Q69yGNdc+zP22yvXFA6QuEdGVH9JkeGwcSwAJCvwlhBgen 3wyxm5FAnuZwcfBEtUoObPk7xWX6x8ny6Q+wyDKAdVUzSpO6HsJQEUYPx1QRmlKGnVXh IsvwP0fntWK7TwV32XTsyVRjR6B36QIWxOjbM= MIME-Version: 1.0 Received: by 10.204.63.8 with SMTP id z8mr2651396bkh.55.1249038910489; Fri, 31 Jul 2009 04:15:10 -0700 (PDT) In-Reply-To: <20090731103602.GQ11691@riva.ucam.org> References: <20090729183547.GP11691@riva.ucam.org> <1248901424.4253.2.camel@mj> <20090731103602.GQ11691@riva.ucam.org> Date: Fri, 31 Jul 2009 13:15:10 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 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, 2) Subject: Re: grub-probe, but in reverse? 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: Fri, 31 Jul 2009 11:15:17 -0000 On Fri, Jul 31, 2009 at 12:36 PM, Colin Watson wrote: > On Wed, Jul 29, 2009 at 05:03:44PM -0400, Pavel Roskin wrote: >> On Wed, 2009-07-29 at 19:35 +0100, Colin Watson wrote: >> > $ sudo grub-probe -d /dev/sda1 -t drive >> > =A0 (hd0,1) >> > >> > I have a reason to want to do the reverse of this: I have a >> > libparted-based program that ensures that at least one partition on a >> > disk is marked active (needed for some BIOSes), and would like to call >> > it on the disk selected for installation of GRUB in d-i. Of course >> > libparted is only going to understand OS device names. If possible I'd >> > rather avoid reading device.map by hand to figure out how to map (hd0,= 1) >> > back to /dev/sda1. Is there any way to do this with the code as it >> > stands, and if not would it make sense to make it possible to pass GRU= B >> > device names to grub-probe? >> >> I think device.map is fundamentally unreliable and should be obsoleted. >> I don't know where you are getting the GRUB device names, but I suggest >> that you use UUID instead. > > They're entered by users choosing where to install GRUB, whom we can > hardly expect to enter UUIDs by hand. Perhaps we can figure out how to > give them a select list of available choices, which could then include > UUIDs behind the scenes ... > Asking for an input like "/dev/sda1" isn't a big change. Bug choice list is of course better > -- > Colin Watson =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 [cjwatson@ubuntu.com] > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git