Bug#623577: please allow grub-pc/install_devices_empty warning to be disabled

Marc Haber mh+debian-bugs at zugschlus.de
Mon Apr 25 08:48:56 UTC 2011


On Fri, Apr 22, 2011 at 09:31:55PM +0100, Colin Watson wrote:
> On Thu, Apr 21, 2011 at 01:31:16PM +0200, Marc Haber wrote:
> > as part of an automatic installation process, I would like to install
> > grub-pc without installing it anywhere, and non-interactively. This
> > doesn't work as grub insists on displaying its
> > grub-pc/install_devices_empty warning at critical priority after
> > resetting the seen flag. It thus makes sure to disrupt the automatic
> > process.
> > 
> > Please implement a possibility to get grub-pc and its dependencies
> > installed non-interactively even without writing the actual grub to
> > any disk.
> 
> Can you tell me more about how you're doing your automatic install and
> what your goals are, so that I can think about how to design this?  Are
> you using d-i?

A rescue system is booted, debootstrap is used to bootstrap a minimal
system, a personalization script is copied into the target, and chroot
target personalize is invoked. This is, afaik, a similiar process to
the one d-i uses.

Earlier, grub-pc was part of the debootstrap process, which caused the
debconf stuff to pop up early in the installation process. I have in
the mean time moved the grub-pc installation to a later stage of the
installation, which causes the grub-pc .debs to be downloaded instead
being part of the debootstrap tarbal. This works non-interactively for
"real" installs, but in the case that the installation process is run
for testing without intending to actually boot the new system, the
debconf error pops up. It would be a bad idea to actually allow grub
to be installed in that case.

Maybe grub could detect that it is being installed from inside a
chroot and be a little less aggressive in bringing its errors to the
user. One would probably need a way to force grub installation anyway
in the case that one actually intends to boot the system that has just
been installed.

> I've been thinking about a change which might have the side-effect of
> helping you in an entirely different way, but it does depend on the
> details of what you're doing.  The common case is certainly that people
> install grub-pc (or another of the platform-specific packages) with the
> intent that it should be their primary boot loader.  However, there are
> two other significant cases I can think of: firstly, there are people
> with unusual arrangements for /boot who need to run grub-install and
> update-grub manually; and secondly, if you're building disk images and
> making them bootable using GRUB, then you need the binaries but don't
> necessarily want it to become your primary boot loader.

I have uses for both of these cases in different environments, yes.

> A solution for this could be to split each of the platform packages
> (grub-pc, grub-efi-amd64, etc.) into two: grub-<platform>-bin would ship
> the actual images, modules, and tools, but would not do any significant
> work in its maintainer scripts; while grub-<platform> would have the
> maintainer script complexity it has today, and installing it would
> generally imply that it should become the primary boot loader.  You
> could then perhaps solve your problem by simply installing grub-pc-bin
> rather than grub-pc.

This would make the installs to a test chroot fundamentally different
from "real" installs which includes the need to have special code
handlin the case of testing, which may result in bugs not being found
in the test stage.

I think that my needs would better catered for with a "I know that I
am only installing for testing, I know that I don't want to actually
automatically install grub to any part of the disk at this time, and I
don't want to be bothered about that this might be bad, I know that it
is not bad in this environment" switch.

If you want to discuss this further, you can always ping me on irc.
Thanks for your consideration and the lengthy answer explaining much
of the background, I really appreciate that.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190





More information about the Pkg-grub-devel mailing list