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: Fabian Greffrath
Subject: Re: Bug#461442: detection of other OSes in update-grub
Date: Tue, 22 Jan 2008 14:14:53 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

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:  address@hidden





reply via email to

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