From 4aa340abc46abd6f8bb1660c45222a525502f9aa Mon Sep 17 00:00:00 2001 From: Adam Glasgall Date: Sun, 8 Jun 2014 15:53:23 -0400 Subject: [PATCH] initial commit of scripts to build pvgrub image --- Makefile | 11 +++++++++++ boot/grub-internal/grub-internal.cfg | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Makefile create mode 100644 boot/grub-internal/grub-internal.cfg diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..27faef1 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +all: + grub-mkstandalone --grub-mkimage=./grub-mkimage -o grub.xen -O x86_64-xen \ + -d /usr/lib/grub/x86_64-xen -c boot/grub-internal/grub-internal.cfg \ + boot/grub-internal/grub-internal.cfg + +install: all + mkdir -p $(DESTDIR)/usr/lib/grub/ + cp grub.xen $(DESTDIR)/usr/lib/grub/ + +clean: + rm -f grub.xen diff --git a/boot/grub-internal/grub-internal.cfg b/boot/grub-internal/grub-internal.cfg new file mode 100644 index 0000000..8d67fe3 --- /dev/null +++ b/boot/grub-internal/grub-internal.cfg @@ -0,0 +1,32 @@ +insmod part_msdos +insmod part_gpt +insmod normal +insmod search_fs_file +insmod fshelp +insmod archelp +insmod ext2 +insmod fat +insmod xfs +insmod reiserfs +insmod udf +insmod iso9660 +insmod btrfs +insmod squash4 +insmod xzio +insmod gzio +insmod configfile + +# first look for a separate /boot +search.file /grub/grub.cfg root +if [ "$root" != "memdisk" ]; then + # we found it + normal /grub/grub.cfg +else + # try /boot/grub on the root + search.file /boot/grub/grub.cfg root + if [ "$root" != "memdisk" ]; then + normal /boot/grub/grub.cfg + fi +fi +# we didn't find anything. give up and let grub show a prompt. +normal -- 1.7.9.5