From f5737814c9344d9c9d1ac7df9d2854745a8f800d Mon Sep 17 00:00:00 2001 From: Michael Young Date: Tue, 10 Jan 2012 17:09:26 +0000 Subject: [PATCH] pygrub: example grub2 configuration file (fedora-16-with-xen.grub2) Sample grub2 configuration file (some duplication removed) from Fedora 16 with a xen hypervisor installed Signed-off-by: Michael Young Acked-by: Ian Campbell Committed-by: Ian Jackson xen-unstable changeset: 24003:c681dd5aecf3 Backport-requested-by: Pasi Karkkainen Committed-by: Ian Jackson --- .../pygrub/examples/fedora-16-with-xen.grub2 | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 tools/pygrub/examples/fedora-16-with-xen.grub2 diff --git a/tools/pygrub/examples/fedora-16-with-xen.grub2 b/tools/pygrub/examples/fedora-16-with-xen.grub2 new file mode 100644 index 0000000000..7069dd5271 --- /dev/null +++ b/tools/pygrub/examples/fedora-16-with-xen.grub2 @@ -0,0 +1,112 @@ +# +# DO NOT EDIT THIS FILE +# +# It is automatically generated by grub2-mkconfig using templates +# from /etc/grub.d and settings from /etc/default/grub +# + +### BEGIN /etc/grub.d/00_header ### +if [ -s $prefix/grubenv ]; then + load_env +fi +set default="${saved_entry}" +if [ "${prev_saved_entry}" ]; then + set saved_entry="${prev_saved_entry}" + save_env saved_entry + set prev_saved_entry= + save_env prev_saved_entry + set boot_once=true +fi + +function savedefault { + if [ -z "${boot_once}" ]; then + saved_entry="${chosen}" + save_env saved_entry + fi +} + +function load_video { + insmod vbe + insmod vga + insmod video_bochs + insmod video_cirrus +} + +set timeout=5 +### END /etc/grub.d/00_header ### + +### BEGIN /etc/grub.d/10_linux ### +menuentry 'Fedora Linux, with Linux 3.1.0-0.rc9.git0.0.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os { + load_video + set gfxpayload=keep + insmod gzio + insmod part_gpt + insmod ext2 + set root='(hd0,gpt2)' + search --no-floppy --fs-uuid --set=root f14ea58a-c2b3-4348-8091-3ab733a2f49e + echo 'Loading Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 ...' + linux /vmlinuz-3.1.0-0.rc9.git0.0.fc16.x86_64 root=/dev/mapper/VolGroup-lv_root ro rd.md=0 rd.dm=0 rd.lvm.lv=VolGroup/lv_swap quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=VolGroup/lv_root rd.luks=0 KEYTABLE=uk LANG=en_US.UTF-8 + echo 'Loading initial ramdisk ...' + initrd /initramfs-3.1.0-0.rc9.git0.0.fc16.x86_64.img +} +menuentry 'Fedora Linux, with Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os { + load_video + set gfxpayload=keep + insmod gzio + insmod part_gpt + insmod ext2 + set root='(hd0,gpt2)' + search --no-floppy --fs-uuid --set=root f14ea58a-c2b3-4348-8091-3ab733a2f49e + echo 'Loading Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 ...' + linux /vmlinuz-3.1.0-0.rc9.git0.0.fc16.x86_64 root=/dev/mapper/VolGroup-lv_root ro single rd.md=0 rd.dm=0 rd.lvm.lv=VolGroup/lv_swap quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=VolGroup/lv_root rd.luks=0 KEYTABLE=uk LANG=en_US.UTF-8 + echo 'Loading initial ramdisk ...' + initrd /initramfs-3.1.0-0.rc9.git0.0.fc16.x86_64.img +} +### END /etc/grub.d/10_linux ### + +### BEGIN /etc/grub.d/20_linux_xen ### +submenu "Xen 4.1" { +menuentry 'Fedora Linux, with Xen 4.1 and Linux 3.1.0-0.rc9.git0.0.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os --class xen { + insmod part_gpt + insmod ext2 + set root='(hd0,gpt2)' + search --no-floppy --fs-uuid --set=root f14ea58a-c2b3-4348-8091-3ab733a2f49e + echo 'Loading Xen 4.1 ...' + multiboot /xen-4.1.gz placeholder + echo 'Loading Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 ...' + module /vmlinuz-3.1.0-0.rc9.git0.0.fc16.x86_64 placeholder root=/dev/mapper/VolGroup-lv_root ro rd.md=0 rd.dm=0 rd.lvm.lv=VolGroup/lv_swap quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=VolGroup/lv_root rd.luks=0 KEYTABLE=uk LANG=en_US.UTF-8 + echo 'Loading initial ramdisk ...' + module /initramfs-3.1.0-0.rc9.git0.0.fc16.x86_64.img +} +menuentry 'Fedora Linux, with Xen 4.1 and Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os --class xen { + insmod part_gpt + insmod ext2 + set root='(hd0,gpt2)' + search --no-floppy --fs-uuid --set=root f14ea58a-c2b3-4348-8091-3ab733a2f49e + echo 'Loading Xen 4.1 ...' + multiboot /xen-4.1.gz placeholder + echo 'Loading Linux 3.1.0-0.rc9.git0.0.fc16.x86_64 ...' + module /vmlinuz-3.1.0-0.rc9.git0.0.fc16.x86_64 placeholder root=/dev/mapper/VolGroup-lv_root ro single rd.md=0 rd.dm=0 rd.lvm.lv=VolGroup/lv_swap quiet SYSFONT=latarcyrheb-sun16 rhgb rd.lvm.lv=VolGroup/lv_root rd.luks=0 KEYTABLE=uk LANG=en_US.UTF-8 + echo 'Loading initial ramdisk ...' + module /initramfs-3.1.0-0.rc9.git0.0.fc16.x86_64.img +} +} +### END /etc/grub.d/20_linux_xen ### + +### BEGIN /etc/grub.d/30_os-prober ### +### END /etc/grub.d/30_os-prober ### + +### BEGIN /etc/grub.d/40_custom ### +# This file provides an easy way to add custom menu entries. Simply type the +# menu entries you want to add after this comment. Be careful not to change +# the 'exec tail' line above. +### END /etc/grub.d/40_custom ### + +### BEGIN /etc/grub.d/41_custom ### +if [ -f $prefix/custom.cfg ]; then + source $prefix/custom.cfg; +fi +### END /etc/grub.d/41_custom ### + +### BEGIN /etc/grub.d/90_persistent ### +### END /etc/grub.d/90_persistent ### -- 2.39.5