From: Adam Glasgall Date: Sun, 8 Jun 2014 19:53:23 +0000 (-0400) Subject: initial commit of scripts to build pvgrub image X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/pvgrub.git/commitdiff_plain/4aa340abc46abd6f8bb1660c45222a525502f9aa initial commit of scripts to build pvgrub image --- 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