Commit 4945e85e authored by Anton Midyukov's avatar Anton Midyukov

grub: Added submenu for kernel flavour change

parent af00ee04
default='linux'
menuentry 'Install @relname@' --hotkey 'i' --id 'linux' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'VNC install @relname@ (edit to set server IP address)' --id 'vncconnect' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP lang=$lang
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncconnect=IP lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'VNC install @relname@ (edit to set password and connect here)' --id 'vncpasswd' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot automatic=method:cdrom ramdisk_size=@altinst_size@ showopts @bootargs@ headless no_alt_virt_keyboard vncpassword=VNCPWD lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'LiveCD (no hard disk needed)' --id 'live' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts lowmem vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'LiveCD with sessions support' --id 'session' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@live_size@ stagename=live showopts live_rw vga=@bootvga@ @bootargs@ lang=$lang
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Rescue LiveCD' --id 'rescue' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Rescue with sessions support' --id 'rescue_session' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom,label:ALT* ramdisk_size=@rescue_size@ stagename=rescue splash=0 showopts @rescue_bootargs@ live_rw
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
menuentry 'Rescue with remote SSH access (DHCP)' --id 'rescue_remote' {
linux@linux_suffix@ @boot_path@/vmlinuz changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
initrd@linux_suffix@ @boot_path@/full.cz
linux@linux_suffix@ @boot_path@/vmlinuz$KFLAVOUR changedisk fastboot live automatic=method:cdrom ramdisk_size=@rescue_size@ splash=0 showopts stagename=rescue @rescue_bootargs@ max_loop=16 ip=dhcp port=22 rootpw=AUTO hash=@rescue_hash@
initrd@linux_suffix@ @boot_path@/full$KFLAVOUR.cz
}
submenu "Change Kernel Flavour (press F5)" --hotkey 'f5' {
insmod regexp
regexp -s 1:kflavours -s 2:kflavourstr '(.*) (.*)' "@KFLAVOUR@"
menuentry "${kflavourstr}" {
KFLAVOUR=
export KFLAVOUR
configfile ${prefix}/grub.cfg
}
for kflavourstr in ${kflavours}; do
menuentry "${kflavourstr}" {
KFLAVOUR="-$1"
export KFLAVOUR
configfile ${prefix}/grub.cfg
}
done
menuentry "Return to the Main menu" {
configfile ${prefix}/grub.cfg
}
}
......@@ -23,6 +23,10 @@ ifdef LOCALE
GRUB_CFG := $(GRUB_CFG) lang
endif
ifneq ($(words $(KFLAVOURS)),1)
GRUB_CFG := $(GRUB_CFG) kernel
endif
DSTDIR := $(BUILDDIR)/stage1/files/boot/grub/.in
DSTCFGS := $(DSTDIR)/*.cfg
......@@ -87,6 +91,9 @@ bootargs: clean
sed -i "s, lang=.lang,,g" $(DSTCFGS); \
fi; \
sed -i "/lang=@LOCALE@/d" $(DSTCFGS)
@if [ $$(echo $(KFLAVOURS) | wc -w) -gt 1 ]; then \
sed -i "s,@KFLAVOUR@,$(KFLAVOURS),g" $(DSTCFGS); \
fi
clean: copy
@if [ "$(GRUB_UI)" = gfxboot ]; then \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment