#647725 grub-pc: Make grub directory user configurable

Package:
grub-pc
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (PC/BIOS version)
Submitter:
Daniel Dehennin
Date:
2011-11-05 19:27:03 UTC
Severity:
wishlist
#647725#5
Date:
2011-11-05 16:59:31 UTC
From:
To:
Dear Maintainer,

I provide some patches based on top of debian/patches from debian bzr
repository, adding them at the end of debian/patches/series just works.

The purpose of this patches is to allow storing multiple system grub
installations on one device and let the automatic configuration updating
tools works.

My use case is the following:

I use usb keys to boot several full luks encrypted systems, one key
per system for now and I want to store all the grub installations on
one device only.

I first try to install into several partitions but on #grub channel
Jordan_U tell me about using the configfile, here is a working example
of my new setup:

- ${usb_key}/grub: master grub with hand written configuration to load
  system specific configurations with "configfile" directives.
  This configuration is managed on one particular system which does
  the grub-setup calls on upgrade.
  I added a script '/etc/grub.d/15_my_systems'
  #+begin_src conf
    # [...]
    menuentry 'Svartalfheim' --class debian --class gnu-linux --class gnu --class os {
            insmod gzio
            insmod part_msdos
            insmod btrfs
            set root='(/dev/sdb,msdos1)'
            search --no-floppy --fs-uuid --set=root 3102b6ea-ee28-44d4-82ba-21ec98631f1e
            echo    'Chargement de la configuration de svartalfheim... '
            configfile /svartalfheim/grub/grub.cfg
    }
    menuentry 'Nidhogg' --class debian --class gnu-linux --class gnu --class os {
            insmod gzio
            insmod part_msdos
            insmod btrfs
            set root='(/dev/sdb,msdos1)'
            search --no-floppy --fs-uuid --set=root 3102b6ea-ee28-44d4-82ba-21ec98631f1e
            echo    'Chargement de la configuration de nidhogg... '
            configfile /nidhogg/grub/grub.cfg
    }
    # [...]
  #+end_src

- ${usb_key}/$(hostname -s)/grub: grub installation for each host.
  I use 'GRUB_SETUP=/bin/true' in '/etc/default/grub' to avoid MBR
  overwrite by grub-install, only the master host manage the MBR.
  I set 'GRUB_PREFIX=/boot/$(hostname -s)/grub' to update grub files by
  grub-install and grub configuration by update-grub.

Regards.

#647725#10
Date:
2011-11-05 19:03:06 UTC
From:
To:
Hello,

Only patch one on debian/update-grub is for debian, all others are going
to be submitted upstream.

Regards.