From: Ulrich Dangel Date: Sun, 25 Oct 2009 11:54:17 +0000 (+0100) Subject: Refactored addon handlng for grml-live. X-Git-Tag: v0.9.27~2 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=143ac81391b6d3323d787994a3c02dfd9a7e3a80 Refactored addon handlng for grml-live. Each entry resists now in an own file for simplified handling of addons. --- diff --git a/grml-live b/grml-live index 5f04f87..a718a41 100755 --- a/grml-live +++ b/grml-live @@ -28,6 +28,7 @@ PN="$(basename $0)" CMDLINE="$0 $@" ISO_DATE="$(date +%Y-%m-%d)" SOURCES_LIST_FILE='/etc/grml/fai/apt/sources.list' +ADDONS_LIST_FILE='/boot/isolinux/addons_list.cfg' # }}} # usage information {{{ @@ -696,6 +697,13 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f4 sed -i "s/%SQUASHFS_NAME%/$SQUASHFS_NAME/" "$BUILD_OUTPUT"/boot/isolinux/f5 + # generate addon list + rm "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}" + for name in $(ls "${BUILD_OUTPUT}"/boot/isolinux/addon_*.cfg) ; do + include_name=$(basename "$name") + echo "include $include_name" >> "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}" + done + if ! [ -r "${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg" ] || [ "$DISTRI_NAME" = "grml" ] ; then log "including grmlmain.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg" echo "include grmlmain.cfg" > "${BUILD_OUTPUT}/boot/isolinux/distri.cfg" diff --git a/templates/boot/isolinux/addon_10_grub2.cfg b/templates/boot/isolinux/addon_10_grub2.cfg new file mode 100644 index 0000000..ad0c1b1 --- /dev/null +++ b/templates/boot/isolinux/addon_10_grub2.cfg @@ -0,0 +1,9 @@ +label grub2 + menu label Run Bootloader Grub^2 + kernel /boot/addons/bsd4grml/ldbsd.com + append echo Loading GRUB...`machine exec grub /boot/grub/core.img + + text help + Start Bootloader Grub (version 2). + endtext + diff --git a/templates/boot/isolinux/addon_15_grub1.cfg b/templates/boot/isolinux/addon_15_grub1.cfg new file mode 100644 index 0000000..0d264f1 --- /dev/null +++ b/templates/boot/isolinux/addon_15_grub1.cfg @@ -0,0 +1,9 @@ +label grub1 + menu label Run Bootloader Grub-Legacy (version ^1) + kernel /boot/addons/bsd4grml/ldbsd.com + append echo Loading GRUB...`machine exec grub /boot/grub/%GRUB_LEGACY% + + text help + Start Bootloader Grub (version 1). + endtext + diff --git a/templates/boot/isolinux/addon_20_allinone.cfg b/templates/boot/isolinux/addon_20_allinone.cfg new file mode 100644 index 0000000..842fa5d --- /dev/null +++ b/templates/boot/isolinux/addon_20_allinone.cfg @@ -0,0 +1,12 @@ +label allinone + menu label Run ^All-in-One-Image + kernel /boot/addons/memdisk + append initrd=/boot/addons/allinone.img + + text help + Start All-in-One-Image, being a special + version of Grub with an easy to use + interface for booting from local disks, + booting via PXE (with gPXE support),... + endtext + diff --git a/templates/boot/isolinux/addon_25_gxpe.cfg b/templates/boot/isolinux/addon_25_gxpe.cfg new file mode 100644 index 0000000..80b8250 --- /dev/null +++ b/templates/boot/isolinux/addon_25_gxpe.cfg @@ -0,0 +1,9 @@ +label gpxe + menu label Run GP^XE + kernel /boot/addons/gpxe.lkrn + + text help + Start Etherboot/gPXE for booting via + network (PXE). + endtext + diff --git a/templates/boot/isolinux/addon_30_dos.cfg b/templates/boot/isolinux/addon_30_dos.cfg new file mode 100644 index 0000000..290caf5 --- /dev/null +++ b/templates/boot/isolinux/addon_30_dos.cfg @@ -0,0 +1,9 @@ +label dos + menu label Run ^FreeDOS + kernel /boot/addons/memdisk + append initrd=/boot/addons/balder10.imz + + text help + Boot FreeDOS. + endtext + diff --git a/templates/boot/isolinux/addon_35_bsd.cfg b/templates/boot/isolinux/addon_35_bsd.cfg new file mode 100644 index 0000000..529dafa --- /dev/null +++ b/templates/boot/isolinux/addon_35_bsd.cfg @@ -0,0 +1,9 @@ +label bsd + menu label Run MirOS bsd^4grml + kernel /boot/addons/bsd4grml/ldbsd.com + + text help + Boot a minimalistic BSD operating + system, known as MirOS bsd4grml. + endtext + diff --git a/templates/boot/isolinux/addon_40_memtest.cfg b/templates/boot/isolinux/addon_40_memtest.cfg new file mode 100644 index 0000000..bd2d51f --- /dev/null +++ b/templates/boot/isolinux/addon_40_memtest.cfg @@ -0,0 +1,9 @@ +label memtest + menu label Run ^Memtest86+ + kernel /boot/addons/memtest + append BOOT_IMAGE=memtest + + text help + Start memory test using memtest86+. + endtext + diff --git a/templates/boot/isolinux/addon_45_hdt.cfg b/templates/boot/isolinux/addon_45_hdt.cfg new file mode 100644 index 0000000..58fde89 --- /dev/null +++ b/templates/boot/isolinux/addon_45_hdt.cfg @@ -0,0 +1,9 @@ +label hdt + menu label Run Hardware Detection ^Tool + kernel /boot/addons/hdt.c32 + append pciids=/boot/addons/pci.ids + + text help + Start a simple Hardware Detection + Tool. + endtext diff --git a/templates/boot/isolinux/addons.cfg b/templates/boot/isolinux/addons.cfg index e5bfe45..869a4e9 100644 --- a/templates/boot/isolinux/addons.cfg +++ b/templates/boot/isolinux/addons.cfg @@ -6,81 +6,14 @@ menu label ^Back to main menu... menu exit menu separator -label grub2 - menu label Run Bootloader Grub^2 - kernel /boot/addons/bsd4grml/ldbsd.com - append echo Loading GRUB...`machine exec grub /boot/grub/core.img +include addons_list.cfg - text help - Start Bootloader Grub (version 2). - endtext -label grub1 - menu label Run Bootloader Grub-Legacy (version ^1) - kernel /boot/addons/bsd4grml/ldbsd.com - append echo Loading GRUB...`machine exec grub /boot/grub/%GRUB_LEGACY% - text help - Start Bootloader Grub (version 1). - endtext -label allinone - menu label Run ^All-in-One-Image - kernel /boot/addons/memdisk - append initrd=/boot/addons/allinone.img - text help - Start All-in-One-Image, being a special - version of Grub with an easy to use - interface for booting from local disks, - booting via PXE (with gPXE support),... - endtext -label gpxe - menu label Run GP^XE - kernel /boot/addons/gpxe.lkrn - text help - Start Etherboot/gPXE for booting via - network (PXE). - endtext - -label dos - menu label Run ^FreeDOS - kernel /boot/addons/memdisk - append initrd=/boot/addons/balder10.imz - - text help - Boot FreeDOS. - endtext - -label bsd - menu label Run MirOS bsd^4grml - kernel /boot/addons/bsd4grml/ldbsd.com - - text help - Boot a minimalistic BSD operating - system, known as MirOS bsd4grml. - endtext - -label memtest - menu label Run ^Memtest86+ - kernel /boot/addons/memtest - append BOOT_IMAGE=memtest - - text help - Start memory test using memtest86+. - endtext - -label hdt - menu label Run Hardware Detection ^Tool - kernel /boot/addons/hdt.c32 - append pciids=/boot/addons/pci.ids - - text help - Start a simple Hardware Detection - Tool. - endtext label exit menu hide diff --git a/templates/boot/isolinux/addons_list.cfg b/templates/boot/isolinux/addons_list.cfg new file mode 100644 index 0000000..f546b5d --- /dev/null +++ b/templates/boot/isolinux/addons_list.cfg @@ -0,0 +1 @@ +# will be generated by grml-live diff --git a/templates/boot/isolinux/isolinux.cfg b/templates/boot/isolinux/isolinux.cfg index 393cafe..e5284c1 100644 --- a/templates/boot/isolinux/isolinux.cfg +++ b/templates/boot/isolinux/isolinux.cfg @@ -6,6 +6,8 @@ ################################################################################ # File Overview: # - addons.cfg -> configuration file for /boot/addons/ (only used if NO_ADDONS not set) +# - addons_list.cfg -> list of entries for addon menu +# - addon_* -> definition for entries in the addon menu # - boot-beep.msg -> bootsplash config for console version sending beep sound # - boot.msg -> bootsplash config for console version (no graphical boot menu) # - console.cfg -> console version configuration of isolinux (no graphical boot menu)