Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MWE0L-0000ak-0Y for mharc-grub-devel@gnu.org; Wed, 29 Jul 2009 14:35:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWE0I-0000Ze-TK for grub-devel@gnu.org; Wed, 29 Jul 2009 14:35:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWE0E-0000Xg-BI for grub-devel@gnu.org; Wed, 29 Jul 2009 14:35:54 -0400 Received: from [199.232.76.173] (port=44607 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWE0E-0000XX-13 for grub-devel@gnu.org; Wed, 29 Jul 2009 14:35:50 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:53379) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWE0D-0000Pu-NG for grub-devel@gnu.org; Wed, 29 Jul 2009 14:35:49 -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 1MWE0C-0000C7-Fp for grub-devel@gnu.org; Wed, 29 Jul 2009 18:35:48 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MWE0B-0003uG-00; Wed, 29 Jul 2009 19:35:47 +0100 Date: Wed, 29 Jul 2009 19:35:47 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090729183547.GP11691@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: 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: Wed, 29 Jul 2009 18:35:55 -0000 $ sudo grub-probe -d /dev/sda1 -t drive (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 GRUB device names to grub-probe? Thanks, -- Colin Watson [cjwatson@ubuntu.com]