From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JHIxi-0003LV-VL for mharc-grub-devel@gnu.org; Tue, 22 Jan 2008 08:14:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHIxg-0003Hq-ML for grub-devel@gnu.org; Tue, 22 Jan 2008 08:14:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHIxd-0003CS-O4 for grub-devel@gnu.org; Tue, 22 Jan 2008 08:14:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHIxd-0003CK-L7 for grub-devel@gnu.org; Tue, 22 Jan 2008 08:14:41 -0500 Received: from mx1.rz.ruhr-uni-bochum.de ([134.147.32.86]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JHIxd-0004BZ-AZ for grub-devel@gnu.org; Tue, 22 Jan 2008 08:14:41 -0500 X-Queued: (qmail 3408 invoked by uid 281); 22 Jan 2008 13:14:38 -0000 X-Qmailscanner: from 134.147.252.214 by mx1.rz.ruhr-uni-bochum.de (envelope-from , uid 80) with qmail-scanner-2.01 (sophie: 3.05/2.52/4.24. Clear:RC:1(134.147.252.214):. Processed in 0.041188 secs); 22 Jan 2008 13:14:38 -0000 Received: from router.leat.ruhr-uni-bochum.de (134.147.252.214) by mx1.rz.ruhr-uni-bochum.de with SMTP; 22 Jan 2008 13:14:38 -0000 Received: from [134.147.55.45] (frodo.leat.ruhr-uni-bochum.de [134.147.55.45]) by router.leat.ruhr-uni-bochum.de (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id m0MDIi1l010903; Tue, 22 Jan 2008 14:18:44 +0100 Message-ID: <4795EC4D.5020207@leat.rub.de> Date: Tue, 22 Jan 2008 14:14:53 +0100 From: Fabian Greffrath User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Robert Millan References: <4790C888.6040007@leat.rub.de> <87sl0v6iod.fsf@ossystems.com.br> <20080119114939.GB10722@thorin> <479450A9.90601@leat.rub.de> <20080121112448.GD7378@thorin> <47948422.8000208@leat.rub.de> <20080121121828.GA9244@thorin> <4795B435.20102@leat.rub.de> <20080122124642.GC2017@thorin> In-Reply-To: <20080122124642.GC2017@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 Cc: grub-devel@gnu.org, Otavio Salvador , 461442@bugs.debian.org Subject: Re: Bug#461442: detection of other OSes in update-grub 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: Tue, 22 Jan 2008 13:14:44 -0000 Robert Millan schrieb: > Sure, we can fix grub-probe. This was already needed for something else > (but I forgot what ;-)). > Nevertheless it will be very very convenient to have this in grub-probe. > Can you propose a CLI by which grub-probe would be told to process devices > rather than mount points (in grub-devel)? The hard part here is not the code, > but coming up with a consistent interface (the code is rather trivial, since > the conversion operation is completely isolated). Sure, CCing grub-devel. We should stay with the '-t drive' option to print the GRUB drive. If no further option is given, the next item on the command line is expected to be a path - just like before. Then, another option, e.g. '-o', should be introduced to specify the origin of the said item if it is different from "path", e.g.: $ grub-probe Usage: grub-probe [OPTION]... [ORIGIN] Probe device information for a given path or, if the -o option is given, for a given GRUB drive or system device. -m, --device-map=FILE use FILE as the device map [default=/boot/grub/device.map] -t, --target=(fs|drive|device|partmap|abstraction) print filesystem module, GRUB drive, system device, partition map module or abstraction module [default=fs] -o, --origin=(path|drive|device) expect to read from path, GRUB drive or system device [default=path] -h, --help display this message and exit -V, --version print version information and exit -v, --verbose print verbose messages This way it will be possible to even convert back and forth between GRUB drives and system devices. The conversion that is needed to translate os-prober output to GRUB menu input will read: GRUB_DEVICE="`grub-probe -t drive -o device ${PARTITION}`". Hope you like this proposal (of course, "origin" is subject to change; it's just the first word that came to my mind that might be fitting)! Cheers, Fabian -- Dipl.-Phys. Fabian Greffrath Ruhr-Universität Bochum Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT) Universitätsstr. 150, IB 3/134 D-44780 Bochum Telefon: +49 (0)234 / 32-26334 Fax: +49 (0)234 / 32-14227 E-Mail: greffrath@leat.ruhr-uni-bochum.de