[node-patches] Change in ovirt-node[master]: create grub/grub2 in iso efi config
jboggs at redhat.com
jboggs at redhat.com
Fri Jul 12 12:20:43 UTC 2013
Joey Boggs has uploaded a new change for review.
Change subject: create grub/grub2 in iso efi config
......................................................................
create grub/grub2 in iso efi config
Signed-off-by: Joey Boggs <jboggs at redhat.com>
Change-Id: Icb7806ce00b4123272374009a00775299379c3da
---
A recipe/common-efi.ks
M recipe/common-nochroot.ks
2 files changed, 82 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/65/16765/1
diff --git a/recipe/common-efi.ks b/recipe/common-efi.ks
new file mode 100644
index 0000000..c7c02d6
--- /dev/null
+++ b/recipe/common-efi.ks
@@ -0,0 +1,81 @@
+# create grub/grub2 efi boot configuation
+
+if [ ! -e $INSTALL_ROOT/sbin/grub2-install ]; then
+ cat > $LIVE_ROOT/EFI/BOOT/BOOTX64.conf <<EOF
+default=0
+splashimage=/EFI/BOOT/splash.xpm.gz
+timeout 30
+hiddenmenu
+title Install or Upgrade ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0
+ initrd /isolinux/initrd0.img
+title Install or Upgrade (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 nomodeset
+ initrd /isolinux/initrd0.img
+title Install or Upgrade with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 console=ttyS0,115200n8
+ initrd /isolinux/initrd0.img
+title Reinstall ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall
+ initrd /isolinux/initrd0.img
+title Reinstall (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall nomodesset
+ initrd /isolinux/initrd0.img
+title Reinstall with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall console=ttyS0,115200n8
+ initrd /isolinux/initrd0.img
+title Uninstall
+ kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 uninstall
+ initrd /isolinux/initrd0.img
+EOF
+else
+ cat > $LIVE_ROOT/EFI/BOOT/BOOTX64.conf <<EOF
+set default="0"
+
+function load_video {
+ insmod efi_gop
+ insmod efi_uga
+ insmod video_bochs
+ insmod video_cirrus
+ insmod all_video
+}
+
+load_video
+set gfxpayload=keep
+insmod gzio
+insmod part_gpt
+insmod ext2
+
+set timeout=30
+
+menuentry 'Install or Upgrade ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Install or Upgrade (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 nomodeset
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Install or Upgrade with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 console=ttyS0,115200n8
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Reinstall ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Reinstall (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall nomodesset
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Reinstall with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall console=ttyS0,115200n8
+ initrdefi /isolinux/initrd0.img
+}
+menuentry 'Uninstall' --class fedora --class gnu-linux --class gnu --class os {
+ linuxefi /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 uninstall
+ initrdefi /isolinux/initrd0.img
+}
+EOF
+fi
+cp $LIVE_ROOT/EFI/BOOT/BOOTX64.conf $LIVE_ROOT/EFI/BOOT/grub.cfg
diff --git a/recipe/common-nochroot.ks b/recipe/common-nochroot.ks
index 493ba44..9ce434c 100644
--- a/recipe/common-nochroot.ks
+++ b/recipe/common-nochroot.ks
@@ -89,31 +89,4 @@
NAME=$(grep CDLABEL $LIVE_ROOT/isolinux/isolinux.cfg |head -n1|sed -r 's/^.*CDLABEL\=([a-zA-Z0-9_\.-]+) .*$/\1/g')
-#setup efi boot menu
-cat > $LIVE_ROOT/EFI/BOOT/BOOTX64.conf <<EOF
-default=0
-splashimage=/EFI/BOOT/splash.xpm.gz
-timeout 30
-hiddenmenu
-title Install or Upgrade ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0
- initrd /isolinux/initrd0.img
-title Install or Upgrade (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 nomodeset
- initrd /isolinux/initrd0.img
-title Install or Upgrade with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 console=ttyS0,115200n8
- initrd /isolinux/initrd0.img
-title Reinstall ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall
- initrd /isolinux/initrd0.img
-title Reinstall (Basic Video) ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall nomodesset
- initrd /isolinux/initrd0.img
-title Reinstall with serial console ${PRODUCT_SHORT}-$VERSION-$RELEASE
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall console=ttyS0,115200n8
- initrd /isolinux/initrd0.img
-title Uninstall
- kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=128M elevator=deadline install rhgb quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 uninstall
- initrd /isolinux/initrd0.img
-EOF
+%include common-efi.ks
--
To view, visit http://gerrit.ovirt.org/16765
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb7806ce00b4123272374009a00775299379c3da
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list