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

Aaron Griffin aaronmgriffin at gmail.com
Tue Mar 17 15:50:49 EDT 2009


On Fri, Mar 13, 2009 at 1:39 PM, Dieter Plaetinck <dieter at plaetinck.be> wrote:
> Hi.
> I'm getting confused here on what is the best approach to install grub
> programatically.  It's time to do some cleaning up :)
>
> Methods:
>
> 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).
> See
> http://projects.archlinux.org/?p=installer.git;a=commitdiff;h=4565577dbd2182dd49612f1e0b68288f5573bf7b
> 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
> script.
> 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?

This sounds good to me. I always wondered why we ship this script, too.

Can anyone see any benefit to it, or should it be removed? I vote
remove it (vanilla packages, ahem). Either way, let's go with option
one. Using the grub shell seems like too much work, especially
considering grub ships a script that simplifies it anyway.


More information about the arch-releng mailing list