summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2011-08-11 00:57:40 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2011-08-11 00:57:40 +0200
commitcb38bc65af525b9b15105ccc318fb8a8a3e53f3b (patch)
tree22b3cf8e6edc972adb4f09506b6fea02c255c329
parentd2031b63aea370127db155fdc8f86c7f45196b41 (diff)
Upgrade to Arch's grub2-1.99-4 patched to recognize our initrd.
-rw-r--r--libre/grub2/PKGBUILD67
-rw-r--r--libre/grub2/archlinux_grub2_mkconfig_fixes.patch119
-rw-r--r--libre/grub2/grub.default16
-rw-r--r--libre/grub2/grub2.install47
-rw-r--r--libre/grub2/grub2_bzr_export.sh103
-rw-r--r--libre/grub2/parabola-mkconfig.patch74
6 files changed, 250 insertions, 176 deletions
diff --git a/libre/grub2/PKGBUILD b/libre/grub2/PKGBUILD
index 7c1c0177a..c914ff086 100644
--- a/libre/grub2/PKGBUILD
+++ b/libre/grub2/PKGBUILD
@@ -1,24 +1,28 @@
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Keshav P R <skodabenz at rocketmail dot com>
-# _grub2_rev=3072
+# The src pkg includes grub2_bzr_export.sh to create newer grub-extras snapshots. Modify the paths in it accordingly.
-_grub2_lua_ver=19
+# _grub2_rev=3238
+
+_grub2_lua_ver=20
_grub2_gpxe_ver=12
-_grub2_ntldr_ver=13
-_grub2_915_ver=6
+_grub2_ntldr_ver=17
+_grub2_915_ver=7
pkgname=('grub2-common' 'grub2-bios' 'grub2-efi-i386')
pkgbase="grub2"
-pkgver='1.99~rc1'
-pkgrel=4.1
+pkgver='1.99'
+pkgrel=4
url="http://www.gnu.org/software/grub/"
arch=('i686' 'x86_64')
license=('GPL3')
-makedepends=('bdf-unifont' 'python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper' 'flex')
+epoch=1
+makedepends=('bdf-unifont' 'python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper')
options=(strip purge docs zipman !emptydirs)
-source=("ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz"
+# "http://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
+source=("ftp://ftp.gnu.org/gnu/grub/grub-1.99.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
@@ -27,7 +31,7 @@ source=("ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz"
'grub.default'
'grub.cfg'
'20_memtest86+'
- '05_archtheme'
+ 'grub2_bzr_export.sh'
'parabola-mkconfig.patch')
noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
@@ -35,6 +39,17 @@ noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
"grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz")
+sha1sums=('a5ae9558f30ce7757a76aa130088b053a87e2fb6'
+ '9f2dbf7a3faab24ca92266400aa513fecd3895c8'
+ 'b04994c005910b4bf123f034b30109d5c8d6fd86'
+ 'e0c1a97770cc23226cf4535c029ef50b17f67974'
+ '8bcaed545956bb33581e1b97ac96a2c3717ec793'
+ 'b7e5510c7b171e9c4dbddb42bbf54ce5ee86e2de'
+ '83bcaca902391f956ea415a0c712cea56d85d0c2'
+ '8948d89537c12a4202df7c001e65a77030bbe5a3'
+ '82a27eca5277218cf57c6c5767e0b17a72f62229'
+ 'beb31419045db70fee7401aa6448c220a491e2a3'
+ 'cf148a6afe6067db48975cfd08fe5fb6c2d2bf24')
build() {
# set architecture dependent variables
@@ -56,7 +71,7 @@ build_grub2-common_and_bios() {
## Apply Archlinux specific fixes to enable grub2-mkconfig detect Arch kernels and initramfs
cd ${srcdir}/grub2_bios-${pkgver}
patch -Np1 -i ${srcdir}/archlinux_grub2_mkconfig_fixes.patch
- patch -Np1 -i ${srcdir}/parabola-mkconfig.patch
+ patch -Np1 -i ${srcdir}/parabola-mkconfig.patch
# add the grub-extra sources
export GRUB_CONTRIB=${srcdir}/grub2_bios-${pkgver}/grub2-extras/
@@ -90,8 +105,7 @@ build_grub2-common_and_bios() {
--bindir=/bin --sbindir=/sbin \
--mandir=/usr/share/man --infodir=/usr/share/info \
--sysconfdir=/etc --enable-nls \
- --program-transform-name=s,grub,grub, \
- --disable-werror
+ --program-transform-name=s,grub,grub,
CFLAGS="" make
}
@@ -121,22 +135,18 @@ build_grub2-efi() {
--prefix=/usr --bindir=/bin \
--sbindir=/sbin --mandir=/usr/share/man \
--infodir=/usr/share/info --sysconfdir=/etc \
- --enable-nls --program-transform-name=s,grub,grub, \
- --disable-werror
+ --enable-nls --program-transform-name=s,grub,grub,
CFLAGS="" make
}
package_grub2-common() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Files common for all platforms"
install="grub2.install"
- depends=('xz' 'freetype2' 'device-mapper')
+ depends=('xz' 'freetype2' 'device-mapper' 'gettext' 'texinfo')
conflicts=('grub')
backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
cd ${srcdir}/grub2_bios-${pkgver}
- make DESTDIR=${pkgdir} install
-
- ## install grub2-extras ntldr-img's grubinst as /sbin/grubinst
- install -Dm755 ${srcdir}/grub2_bios-${pkgver}/grub-core/grubinst ${pkgdir}/sbin/grubinst
+ make DESTDIR=${pkgdir} install
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_bios-install
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_efi_x86_64-install
@@ -155,7 +165,6 @@ package_grub2-common() {
${pkgdir}/sbin/grub_efi_i386-install
## install extra /etc/grub.d/ files
- install -Dm755 ${srcdir}/05_archtheme ${pkgdir}/etc/grub.d/05_archtheme
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
## install /etc/default/grub (used by grub-mkconfig)
@@ -170,7 +179,7 @@ package_grub2-common() {
package_grub2-bios() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Built for PC BIOS"
- depends=(grub2-common=${pkgver})
+ depends=(grub2-common=${epoch}:${pkgver})
replaces=('grub2')
provides=('grub2')
@@ -185,8 +194,8 @@ package_grub2-bios() {
package_grub2-efi-i386() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - i386 UEFI version"
- depends=("grub2-common=${pkgver}" 'dosfstools')
- optdepends=('efibootmgr')
+ depends=("grub2-common=${epoch}:${pkgver}" 'dosfstools' 'efibootmgr')
+ optdepends=('mtools')
cd ${srcdir}/grub2_efi-${pkgver}
make DESTDIR=${pkgdir} install
@@ -195,15 +204,3 @@ package_grub2-efi-i386() {
rm -rf ${pkgdir}/{boot,bin,sbin,etc,usr/share}
rm ${pkgdir}/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
}
-
-md5sums=('fd602ffaada5ba7939d0ea47091841a5'
- '21b709f119e0bef1c51978d757e885dc'
- '9e0944f3e63586dc4242fd8b7977e3c4'
- '0a124ffc9835100ba0e7de7a0ac1c389'
- '0016761d429e6a77b90d09ed6ee8a47d'
- '93f0f96911451e86014e04f96e13462f'
- '50123c37cf145a98aba4ffb0fc4efba1'
- '7cb90ebb04b856ded6ae171c3658fba2'
- '5a07e04c4ecb8ed145d54fec3043e0d5'
- 'e143ae2e453b7c3ced309667df30da55'
- 'bc369fcd7576beba804cad91f2b79f8f')
diff --git a/libre/grub2/archlinux_grub2_mkconfig_fixes.patch b/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
index 62acd2ee8..11805e309 100644
--- a/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
+++ b/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
@@ -1,21 +1,7 @@
-diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index b041a38..6f31dce 100644
---- a/util/grub-mkconfig.in
-+++ b/util/grub-mkconfig.in
-@@ -252,6 +252,8 @@ export GRUB_DEFAULT \
- GRUB_THEME \
- GRUB_GFXPAYLOAD_LINUX \
- GRUB_DISABLE_OS_PROBER \
-+ GRUB_COLOR_NORMAL \
-+ GRUB_COLOR_HIGHLIGHT \
- GRUB_INIT_TUNE \
- GRUB_SAVEDEFAULT \
- GRUB_BADRAM
-diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
-index 420b3f3..79fd4fb 100644
---- a/util/grub.d/00_header.in
-+++ b/util/grub.d/00_header.in
-@@ -100,6 +100,14 @@ cat <<EOF
+diff -Nur a/util/grub.d/00_header.in b/util/grub.d/00_header.in
+--- a/util/grub.d/00_header.in 2011-04-06 13:14:27.000000000 +0200
++++ b/util/grub.d/00_header.in 2011-08-01 15:19:57.919100452 +0200
+@@ -100,6 +100,14 @@
EOF
@@ -30,64 +16,75 @@ index 420b3f3..79fd4fb 100644
serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index a09c3e6..cf12ea9 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -31,8 +31,8 @@ CLASS="--class gnu-linux --class gnu --class os"
+diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+--- a/util/grub.d/10_linux.in 2011-05-14 22:36:49.000000000 +0200
++++ b/util/grub.d/10_linux.in 2011-08-01 15:56:53.324779083 +0200
+@@ -31,8 +31,8 @@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
-- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}"
+- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
+ OS="${GRUB_DISTRIBUTOR}"
-+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | tr -d ' ') ${CLASS}"
++ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | tr -d ' ') ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
-@@ -48,7 +48,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue"
- || uses_abstraction "${GRUB_DEVICE}" lvm; then
- LINUX_ROOT_DEVICE=${GRUB_DEVICE}
- else
-- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
-+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
- fi
+@@ -65,7 +65,9 @@
+ version="$2"
+ recovery="$3"
+ args="$4"
+- if ${recovery} ; then
++ if [ -n "$5" ] ; then
++ title="$(gettext_quoted "%s, with Linux %s") $5"
++ elif ${recovery} ; then
+ title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
+ else
+ title="$(gettext_quoted "%s, with Linux %s")"
+@@ -132,7 +134,7 @@
- linux_entry ()
-@@ -111,7 +111,7 @@ EOF
- EOF
- }
-
--list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
-+list=`for i in /boot/vmlinuz* /boot/vmlinux* /vmlinuz* /vmlinux* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
- prepare_boot_cache=
-@@ -123,14 +123,12 @@ while [ "x$list" != "x" ] ; do
- dirname=`dirname $linux`
- rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
-- alt_version=`echo $version | sed -e "s,\.old$,,g"`
-+ base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"`
-+ alt_version="${base_init}-fallback"
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-
- initrd=
-- for i in "initrd.img-${version}" "initrd-${version}.img" \
-- "initrd-${version}" "initramfs-${version}.img" \
-- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
-- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
-+ for i in "${base_init}.img"; do
+ case x`uname -m` in
+ xi?86 | xx86_64)
+- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
++ list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; do
+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ done` ;;
+ *)
+@@ -160,7 +162,8 @@
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+- "initramfs-genkernel-${alt_version}"; do
++ "initramfs-genkernel-${alt_version}" \
++ "${basename/vmlinuz/kernel}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
-@@ -155,6 +153,9 @@ while [ "x$list" != "x" ] ; do
+@@ -190,6 +193,15 @@
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-+ initrd="${alt_version}.img"
-+ linux_entry "${OS}" "${version} Fallback" false \
-+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++ for i in "initramfs-${version}-fallback.img" \
++ "${basename/vmlinuz/kernel}-fallback.img"; do
++ if test -e "${dirname}/${i}"; then
++ initrd="$i"
++ linux_entry "${OS}" "${version}" true \
++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" Fallback
++ break
++ fi
++ done
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
+diff -Nur a/util/grub-mkconfig.in b/util/grub-mkconfig.in
+--- a/util/grub-mkconfig.in 2011-04-06 17:45:53.000000000 +0200
++++ b/util/grub-mkconfig.in 2011-08-01 15:20:49.256867648 +0200
+@@ -252,6 +252,8 @@
+ GRUB_THEME \
+ GRUB_GFXPAYLOAD_LINUX \
+ GRUB_DISABLE_OS_PROBER \
++ GRUB_COLOR_NORMAL \
++ GRUB_COLOR_HIGHLIGHT \
+ GRUB_INIT_TUNE \
+ GRUB_SAVEDEFAULT \
+ GRUB_BADRAM
diff --git a/libre/grub2/grub.default b/libre/grub2/grub.default
index 8302bdb3f..dec2d36d1 100644
--- a/libre/grub2/grub.default
+++ b/libre/grub2/grub.default
@@ -3,31 +3,37 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
-GRUB_DISTRIBUTOR="Arch Linux"
+GRUB_DISTRIBUTOR="Parabola GNU/Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
+# Preload both GPT and MBR modules so that they are not missed
+GRUB_PRELOAD_MODULES="part_gpt part_msdos"
+
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
+# Uncomment to use basic console
+GRUB_TERMINAL_INPUT=console
+
# Uncomment to disable graphical terminal
-#GRUB_TERMINAL=console
+#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
-#GRUB_GFXMODE=1024x768x24
+GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
-#GRUB_GFXPAYLOAD_LINUX=keep
+GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
-#GRUB_DISABLE_RECOVERY="true"
+GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
diff --git a/libre/grub2/grub2.install b/libre/grub2/grub2.install
index 898dc9246..9baf14776 100644
--- a/libre/grub2/grub2.install
+++ b/libre/grub2/grub2.install
@@ -1,30 +1,29 @@
-post_install() {
-
- if [ -f /boot/grub/grub.cfg.pacsave ]; then
- echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
- install -Dm644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
- fi
-
- echo -n "Generating grub.cfg.example config file... "
- grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
- echo "done."
-
-cat << EOF
- An example config file is created at /boot/grub/grub.cfg.example
-
- For more information and additional config settings please see http://wiki.archlinux.org/index.php/GRUB2
-
-EOF
+infodir=usr/share/info
+filelist=(grub.info grub-dev.info)
+post_install() {
+ if [ -f /boot/grub/grub.cfg.pacsave ]; then
+ echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
+ install -Dm644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
+ fi
+
+ echo -n "Generating grub.cfg.example config file... "
+ grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
+ echo "done."
+
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
}
-
post_upgrade() {
-cat << EOF
- An example config file is created at /boot/grub/grub.cfg.example
-
- For more information and additional config settings please see http://wiki.archlinux.org/index.php/GRUB2
-
-EOF
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
}
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/libre/grub2/grub2_bzr_export.sh b/libre/grub2/grub2_bzr_export.sh
new file mode 100644
index 000000000..7c42d0c28
--- /dev/null
+++ b/libre/grub2/grub2_bzr_export.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+## For actual repos
+
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/lua lua
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/gpxe gpxe
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/ntldr-img ntldr-img
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/915resolution 915resolution
+
+## For launchpad mirror
+
+# bzr branch lp:~skodabenz/grub/grub2-extras-lua lua
+# bzr branch lp:~skodabenz/grub/grub2-extras-gpxe gpxe
+# bzr branch lp:~skodabenz/grub/grub2-extras-ntldr-img ntldr-img
+# bzr branch lp:~skodabenz/grub/grub2-extras-915resolution 915resolution
+
+## grub-extras zfs is integrated into grub2 bzr main repo and is no longer needed separately.
+
+wd=${PWD}/
+output_dir=${wd}/
+
+grub2_bzr_dir=${wd}/grub2_BZR/
+grub2_bzr_exp_dir=${wd}/grub2_experimental_BZR/
+grub2_extras_dir=${wd}/grub2_extras_BZR/
+
+main_snapshot() {
+
+ cd ${grub2_bzr_dir}/
+ echo
+
+ revnum=$(bzr revno ${grub2_bzr_dir})
+ bzr export --root=grub2 --format=tar ${output_dir}/grub2_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+
+ xz -9 ${output_dir}/grub2_r${revnum}.tar
+ echo
+
+}
+
+exp_snapshot() {
+
+ cd ${grub2_bzr_exp_dir}/
+ echo
+
+ revnum=$(bzr revno ${grub2_bzr_exp_dir})
+ bzr export --root=grub2_exp --format=tar ${output_dir}/grub2_exp_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+
+ xz -9 ${output_dir}/grub2_exp_r${revnum}.tar
+ echo
+
+}
+
+extras_snapshot() {
+
+ cd ${grub2_extras_dir}/${grub2_extras_name}/
+ echo
+
+ revnum=$(bzr revno ${grub2_extras_dir}/${grub2_extras_name})
+ bzr export --root=${grub2_extras_name} --format=tar ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+ echo
+
+ xz -9 ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
+ echo
+
+}
+
+echo
+
+set -x -e
+
+# main_snapshot
+
+# exp_snapshot
+
+grub2_extras_name="lua"
+extras_snapshot
+
+grub2_extras_name="gpxe"
+extras_snapshot
+
+grub2_extras_name="ntldr-img"
+extras_snapshot
+
+grub2_extras_name="915resolution"
+extras_snapshot
+
+set +x +e
+
+echo
+
+unset wd
+unset output_dir
+unset grub2_bzr_dir
+unset grub2_extras_dir
+unset grub2_extras_name
diff --git a/libre/grub2/parabola-mkconfig.patch b/libre/grub2/parabola-mkconfig.patch
index d9aae8501..b2a72e118 100644
--- a/libre/grub2/parabola-mkconfig.patch
+++ b/libre/grub2/parabola-mkconfig.patch
@@ -1,51 +1,23 @@
-diff -ru grub-1.99~rc1-orig/util/grub.d/10_linux.in grub-1.99~rc1/util/grub.d/10_linux.in
---- grub-1.99~rc1-orig/util/grub.d/10_linux.in 2011-08-08 17:03:17.177418423 +0200
-+++ grub-1.99~rc1/util/grub.d/10_linux.in 2011-08-08 19:36:17.307138530 +0200
-@@ -57,12 +57,22 @@
- version="$2"
- recovery="$3"
- args="$4"
-- if ${recovery} ; then
-- title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
-+ if echo "$version" | fgrep . ; then
-+ if ${recovery} ; then
-+ title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
-+ else
-+ title="$(gettext_quoted "%s, with Linux %s")"
-+ fi
-+ printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
- else
-- title="$(gettext_quoted "%s, with Linux %s")"
-+ # Parabola GNU/Linux-libre doesn't put kernel version in its file name.
-+ if ${recovery} ; then
-+ title="$(gettext_quoted "%s (recovery mode)")"
-+ else
-+ title="%s"
-+ fi
-+ printf "menuentry '${title}' ${CLASS} {\n" "${os}"
- fi
-- printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
- if ! ${recovery} ; then
- save_default_entry | sed -e "s/^/\t/"
- fi
-@@ -123,7 +133,7 @@
- dirname=`dirname $linux`
- rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
-- base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"`
-+ base_init=`echo $basename | sed -e "s,vmlinuz,initramfs,g"`
- alt_version="${base_init}-fallback"
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-
-diff -ru grub-1.99~rc1-orig/util/grub-mkconfig_lib.in grub-1.99~rc1/util/grub-mkconfig_lib.in
---- grub-1.99~rc1-orig/util/grub-mkconfig_lib.in 2011-08-08 17:03:17.177418423 +0200
-+++ grub-1.99~rc1/util/grub-mkconfig_lib.in 2011-08-08 17:04:48.064082390 +0200
-@@ -130,7 +130,7 @@
-
- grub_file_is_not_garbage ()
- {
-- if test -f "$1" ; then
-+ if test -f "$1" -a ! -L "$1" ; then
- case "$1" in
- *.dpkg-*) return 1 ;; # debian dpkg
- README*) return 1 ;; # documentation
+diff -ru grub-1.99.orig/util/grub.d/10_linux.in grub-1.99/util/grub.d/10_linux.in
+--- grub-1.99.orig/util/grub.d/10_linux.in 2011-08-10 23:56:57.323380821 +0200
++++ grub-1.99/util/grub.d/10_linux.in 2011-08-11 00:12:46.840005321 +0200
+@@ -163,7 +163,8 @@
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+ "initramfs-genkernel-${alt_version}" \
+- "${basename/vmlinuz/kernel}.img"; do
++ "${basename/vmlinuz/kernel}.img" \
++ "${basename/vmlinuz/initramfs}.img"; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
+@@ -194,7 +195,8 @@
+ linux_entry "${OS}" "${version}" false \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ for i in "initramfs-${version}-fallback.img" \
+- "${basename/vmlinuz/kernel}-fallback.img"; do
++ "${basename/vmlinuz/kernel}-fallback.img" \
++ "${basename/vmlinuz/initramfs}-fallback.img"; do
+ if test -e "${dirname}/${i}"; then
+ initrd="$i"
+ linux_entry "${OS}" "${version}" true \