[arch-releng] too many different ways to install grub.

Dieter Plaetinck dieter at plaetinck.be
Fri Mar 13 14:39:04 EDT 2009

I'm getting confused here on what is the best approach to install grub
programatically.  It's time to do some cleaning up :)


1) the grub-install script. gnu ships it and it looks quite good. You
can specify your root directory and on which blockdevice to install
grub. Isn't this all you need, even for softraid/lvm/.. setups?

2) use the shell directly. This is how it's been done in /arch/setup
script until recently (we changed the way of working then to work
around a problem with ext4. it looks like (on my system at least)
this is not needed anymore btw).
Is there a specific reason why this method has been in use for so long?
does it give more possibilities that we may need?

3) the install-grub script.  It is shipped with our grub package but it
looks like this script is written by an Arch developer. (see abs and
it's source) It shares a lot of code with the old /arch/setup
script (which makes we wonder why the same code is in 2 places? the
installer script does/did not call install-grub).
To make things more confusing, the quickinst recommends using this
It seems like it wraps around method 2 and provides some additional
"block device to mount location" mapping. I don't understand why we
would need that logic (we always _know_ where /boot is mounted afaik),
let alone why it's there if the same logic is in the installer script.

Right now, aif -p interactive uses method 2.  But I would like to
switch to 1 because it's cleaner and doesn't suffer NIH.  We can still
support special cases like softraid etc because we only need to pass a
different blockdevice for that, right? In my limited testing
grub-install seems to work fine.
Maybe we can even drop the install-grub script?


PS: see maybe also http://bugs.archlinux.org/task/13277

More information about the arch-releng mailing list