On Tue, Dec 22, 2009 at 01:18:42PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Grégoire Sutre wrote: > > Hi, > > > > grub-install copies GRUB images into ${rootdir}/boot/grub (where > > ${rootdir} is empty by default and can be changed with --root-directory). > > > > To install GRUB files on a partition that contains a /boot file, one > > must specify a non-empty --root-directory, and grub files are then > > copied into /DIR/boot/grub. Or one could mount the partition on a > > mount point of the form DIR/boot and specify --root-directory=DIR to > > force installation into the /grub directory of the partition. Both > > solutions are not completely satisfactory. Is there a better one? > > > > The problem arises e.g. with NetBSD which uses /boot for its own > > bootloader. The script util/grub-install.in contains lines to take > > care of that situation (lines 160-172), but these lines rely on a > > variable ${host_os} that is not set. This might be deprecated code > > from GRUB Legacy's grub-install, where ${host_os} is set by a > > configure substitution. > > > > An alternative solution would be to have grub-install install in > > ${rootdir}/grub, with ${rootdir} equal to /boot by default. The > > default behavior (with no --root-directory) would be the same. > The main problem is with scripts already using --root-directory and > relying on existing behaviour. I propose add a new option > --grub-directory=DIR > which defaults to ROOTDIR/boot/grub > What do you think about this?
If we do this, I'd just replace the old option completely. But a standalone --grub-directory is a bit more complex. It seems to me that the current scheme is laid out this way because we didn't have grub-mkrelpath / make_path_relative_to_its_root() when designing it. A proper solution would be to accept --grub-directory, then extract the relative prefix from it. -- Robert Millan "Be the change you want to see in the world" -- Gandhi _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel