From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NNw9k-0003qZ-5h for mharc-grub-devel@gnu.org; Thu, 24 Dec 2009 17:27:40 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNw9i-0003nm-Gl for grub-devel@gnu.org; Thu, 24 Dec 2009 17:27:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNw9d-0003d6-E0 for grub-devel@gnu.org; Thu, 24 Dec 2009 17:27:37 -0500 Received: from [199.232.76.173] (port=52855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNw9c-0003c3-H0 for grub-devel@gnu.org; Thu, 24 Dec 2009 17:27:32 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:58749 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNw9b-0007XL-RP for grub-devel@gnu.org; Thu, 24 Dec 2009 17:27:32 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NNw9a-0000Bb-Ew for grub-devel@gnu.org; Thu, 24 Dec 2009 23:27:30 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NNw9Z-0003Ol-Rx for grub-devel@gnu.org; Thu, 24 Dec 2009 23:27:29 +0100 Date: Thu, 24 Dec 2009 23:27:29 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20091224222729.GV12122@thorin> References: <4B30B34A.6030600@labri.fr> <4B30B922.2040304@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B30B922.2040304@gmail.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: boot directory prefix in grub-install (even with --root-directory) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 22:27:38 -0000 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