Merge branch 'modular-grub' of https://github.com/schierlm/grml-live
authorMichael Prokop <mika@grml.org>
Thu, 27 Mar 2014 08:15:12 +0000 (09:15 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 27 Mar 2014 08:15:12 +0000 (09:15 +0100)
README.md
etc/grml/fai/config/scripts/GRMLBASE/45-grub-images
grml-live

index cb18433..8d86c00 100644 (file)
--- a/README.md
+++ b/README.md
@@ -15,3 +15,10 @@ additional software and your very own configuration files.
 
 Further information is available from http://grml.org/grml-live/
 
+In case you want to run grml-live directly from the checkout (after
+making sure all dependencies are installed), you should set
+`GRML_FAI_CONFIG` so that it does not use the config files of an
+installed `grml-live` package:
+
+    # export GRML_FAI_CONFIG=$(pwd)/etc/grml/fai
+    # ./grml-live -s sid -a amd64 -c GRMLBASE,GRML_FULL,AMD64
index 6dfbf58..5541da6 100755 (executable)
@@ -16,13 +16,11 @@ TMP_CONFIG="${target}/tmp/grub_config_efi"
 rm -f "$BOOTX64" "$EFI_IMG" "$TMP_CONFIG"
 
 cat > "$TMP_CONFIG" <<EOF
-search --set -f /conf/bootid.txt root
-if [ -e /boot/grub/grub.cfg ]; then
- set prefix=(\$root)/boot/grub
- configfile /boot/grub/grub.cfg
-else
- echo "E: Could not find root device!"
-fi
+search.file /conf/bootid.txt root
+set prefix=(\$root)/boot/grub
+insmod normal
+normal
+echo "E: Could not find root device!"
 EOF
 
 BOOTX64="${BOOTX64##${target}}"
@@ -44,30 +42,14 @@ if ifclass AMD64 ; then
   fi
 fi
 
-# until grub 1.99-27.1 it's called raid, starting with
-# grub version 2.00-14 the raid.mod module no longer exists
-if [ -r "${target}"/usr/lib/grub/i386-pc/raid.mod ] ; then
-  echo "Using raid module as file raid.mod is present"
-  ADDITIONAL_MODULES[raid]="raid"
-elif [ -r "${target}"/usr/lib/grub/i386-pc/diskfilter.mod ] ; then
-  echo "Using diskfilter and related modules as file diskfilter.mod is present"
-  ADDITIONAL_MODULES[raid]="diskfilter mdraid09 mdraid09_be mdraid1x raid5rec raid6rec"
-else
-  echo "Warning: no according raid module in grub directory found."
-fi
-
 BOOTX64="${BOOTX64##${target}}"
 EFI_IMG="${EFI_IMG##${target}}"
 TMP_CONFIG="${TMP_CONFIG##${target}}"
 
 for arch in ${ARCHS[@]} ; do
 $ROOTCMD grub-mkimage -O $arch -o /boot/$arch.img --prefix=/boot/grub/ --config="$TMP_CONFIG" \
-  bitmap boot btrfs cat chain cmp configfile cpio echo elf ext2    \
-  fat gfxmenu gfxterm gzio help iso9660 jpeg linux loopback lvm    \
-  memdisk minicmd multiboot normal part_gpt part_msdos play png    \
-  probe regexp reiserfs search search_fs_file search_fs_uuid       \
-  search_label squash4 terminal test video videoinfo xfs           \
-  ${ADDITIONAL_MODULES[raid]} ${ADDITIONAL_MODULES[$arch]}
+  echo iso9660 part_msdos search_fs_file test \
+  ${ADDITIONAL_MODULES[$arch]}
 done
 
 if [ -f "${target}/boot/i386-pc.img" ] ; then
index b470d41..b629c12 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -966,6 +966,10 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
        cp -a "${CHROOT_OUTPUT}"/boot/grub/core.img "${BUILD_OUTPUT}"/boot/grub/
        cp -a "${CHROOT_OUTPUT}"/boot/grub/grub.img "${BUILD_OUTPUT}"/boot/grub/
 
+       # copy modules for UEFI grub
+       mkdir -p "${BUILD_OUTPUT}"/boot/grub/x86_64-efi/
+       cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/x86_64-efi/*.{mod,lst} "${BUILD_OUTPUT}"/boot/grub/x86_64-efi/
+
        if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then
           log    "Error: ${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting."
           eerror "Error: ${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting." ; eend 1