All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: boot directory prefix in grub-install (even with --root-directory)
Date: Thu, 24 Dec 2009 23:27:29 +0100	[thread overview]
Message-ID: <20091224222729.GV12122@thorin> (raw)
In-Reply-To: <4B30B922.2040304@gmail.com>

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



  parent reply	other threads:[~2009-12-24 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 11:53 boot directory prefix in grub-install (even with --root-directory) Grégoire Sutre
2009-12-22 12:18 ` Vladimir 'φ-coder/phcoder' Serbinenko
2009-12-22 12:30   ` Grégoire Sutre
2009-12-24 22:27   ` Robert Millan [this message]
2009-12-24 22:24 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091224222729.GV12122@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.