grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#461442: detection of other OSes in update-grub


From: Robert Millan
Subject: Re: Bug#461442: detection of other OSes in update-grub
Date: Tue, 22 Jan 2008 17:56:53 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Jan 22, 2008 at 02:14:53PM +0100, Fabian Greffrath wrote:
> 
> 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)!

This implies that we'll have to support 6 different kinds of conversions
between path, drive and device, some of which might even be impossible.

Besides, perhaps it'd be cleaner to split this conversion to a separate
tool, so that grub-probe only operates on devices, and the other tool
converts paths to devices (but NOT necessarily devices to paths!).

What does everyone think about this?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]