Bug#647725: grub-pc: Make grub directory user configurable

Daniel Dehennin daniel.dehennin at baby-gnu.org
Sat Nov 5 16:59:31 UTC 2011


Package: grub-pc
Version: 1.99-12
Severity: wishlist

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.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-rc5+hati.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]  1.5.41     
ii  grub-common            1.99-12    
ii  grub-pc-bin            1.99-12    
ii  grub2-common           1.99-12    
ii  ucf                    3.0025+nmu2

grub-pc recommends no packages.

grub-pc suggests no packages.

-- Configuration Files:
/etc/default/grub changed:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="video=radeonfb:1600x1200-32 at 85 quiet"
GRUB_CMDLINE_LINUX=""
GRUB_GFXMODE=1600x1200
GRUB_DISABLE_LINUX_UUID=false
GRUB_DISABLE_LINUX_RECOVERY="true"

/etc/kernel/postinst.d/zz-update-grub [Errno 2] Aucun fichier ou dossier de ce type: u'/etc/kernel/postinst.d/zz-update-grub'
/etc/kernel/postrm.d/zz-update-grub [Errno 2] Aucun fichier ou dossier de ce type: u'/etc/kernel/postrm.d/zz-update-grub'

-- debconf information:
  grub2/kfreebsd_cmdline:
* grub2/device_map_regenerated:
* grub-pc/linux_cmdline:
* grub2/linux_cmdline:
  grub-pc/install_devices_empty: false
  grub-pc/install_devices_failed: false
* grub-pc/chainload_from_menu.lst: false
  grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/disk/by-id/ata-ST3320620AS_9QF5ZCHE
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/disk_description:
  grub2/kfreebsd_cmdline_default: quiet
  grub-pc/partition_description:
  grub-pc/install_devices_disks_changed:
* grub2/linux_cmdline_default: video=radeonfb:1600x1200-32 at 85 quiet
  grub-pc/mixed_legacy_and_grub2: true

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: update_grub_use_user_configurable_variables.patch
Type: text/x-diff
Size: 1094 bytes
Desc: update-grub is user configurable with /etc/default/grub
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111105/04a9407d/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub_mkconfig_use_GRUB_BOOTDIR_variable.patch
Type: text/x-diff
Size: 3475 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111105/04a9407d/attachment-0005.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub_install_use_GRUB_BOOTDIR_variable.patch
Type: text/x-diff
Size: 13655 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111105/04a9407d/attachment-0006.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_GRUB_BOOTDIR_variable_when_generating_grub_config.patch
Type: text/x-diff
Size: 3104 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111105/04a9407d/attachment-0007.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20111105/04a9407d/attachment-0001.pgp>


More information about the Pkg-grub-devel mailing list