From d9d2ded910b2c94bbc0301f6cc1d127fbe653f23 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 3 Apr 2009 17:57:11 +0000 Subject: added version 3.73 of pxelinux to trunk added pxechain which allows to chainload pxelinux.0 from different tftp server, so ip prefixes are no longer needed (dirk read about this feature) removed tftp-server-ip from slxsettings again ;) added small kernel and small initrd which only executes 'echo sub >/proc/sysrq-trigger' introducing menu-include / menu-botton (s. Readme.pxe) it's for testing now... if it's to complicated it can be simplyfied or removed again git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2800 95ad53e4-c205-0410-b2fa-d234c58c8868 --- boot-env/OpenSLX/BootEnvironment/PXE.pm | 27 ++++++------- boot-env/pxe/Readme.pxe | 65 ++++++++++++++++++++++++++++++++ boot-env/pxe/initramfs-shutdown | Bin 0 -> 665088 bytes boot-env/pxe/kernel-shutdown | Bin 0 -> 688752 bytes boot-env/pxe/mboot.c32 | Bin 43364 -> 44900 bytes boot-env/pxe/menu-bottom.example | 39 +++++++++++++++++++ boot-env/pxe/menu-include.example | 57 ++++++++++++++++++++++------ boot-env/pxe/pxechain.com | Bin 0 -> 998 bytes boot-env/pxe/vesamenu.c32 | Bin 140580 -> 145680 bytes 9 files changed, 161 insertions(+), 27 deletions(-) create mode 100644 boot-env/pxe/Readme.pxe create mode 100644 boot-env/pxe/initramfs-shutdown create mode 100644 boot-env/pxe/kernel-shutdown create mode 100644 boot-env/pxe/menu-bottom.example create mode 100644 boot-env/pxe/pxechain.com (limited to 'boot-env') diff --git a/boot-env/OpenSLX/BootEnvironment/PXE.pm b/boot-env/OpenSLX/BootEnvironment/PXE.pm index c8ecd67a..160f7193 100644 --- a/boot-env/OpenSLX/BootEnvironment/PXE.pm +++ b/boot-env/OpenSLX/BootEnvironment/PXE.pm @@ -121,6 +121,13 @@ sub writeBootloaderMenuFor # now add the slx-labels (inline or appended) and write the config file if (!($pxeConfig =~ s{\@\@\@SLX_LABELS\@\@\@}{$slxLabels})) { $pxeConfig .= $slxLabels; + # fetch PXE-bottom iclude, if exists (overwrite existing definitions) + my $pxeBottomFile + = "$openslxConfig{'config-path'}/boot-env/pxe/menu-bottom"; + if (-e $pxeBottomFile) { + $pxeConfig .= "\n# configuration from include $pxeBottomFile\n"; + $pxeConfig .= slurpFile($pxeBottomFile); + } } # PXE uses 'cp850' (codepage 850) but our string is in utf-8, we have @@ -134,19 +141,12 @@ sub writeBootloaderMenuFor sub _getTemplate { my $self = shift; - + return $self->{'pxe-template'} if $self->{'pxe-template'}; my $basePath = $openslxConfig{'base-path'}; my $configPath = $openslxConfig{'config-path'}; - my $tftpServer = $openslxConfig{'tftp-server-ip'}; my $pxeTheme = $openslxConfig{'pxe-theme'}; - if (defined $tftpServer) { - $tftpServer .= "::"; - } - else { - $tftpServer = ""; - } my ($sec, $min, $hour, $day, $mon, $year) = (localtime); $mon++; @@ -157,9 +157,7 @@ sub _getTemplate # generate PXE-Menu my $pxeTemplate = "# generated by slxconfig-demuxer (on $callDate at $callTime)\n"; - # append tftp setver prefix if necessary - $pxeTemplate .= "\nDEFAULT $tftpServer"; - $pxeTemplate .= "vesamenu.c32\n"; + $pxeTemplate .= "\nDEFAULT vesamenu.c32\n"; # include static defaults $pxeTemplate .= "\n# static configuration (override with include file)\n"; $pxeTemplate .= "NOESCAPE 0\n"; @@ -195,10 +193,6 @@ sub _getTemplate } if (defined $pic) { my $pxeBackground = "$pxeThemePath/$pic"; - my $picPrefix = $tftpServer; - # append tftp setver prefix to $pic - $picPrefix .= $pic; - $pxeTemplate =~ s,$pic,$picPrefix,g; if (-e $pxeBackground && !$self->{'dry-run'}) { slxsystem(qq[cp "$pxeBackground" $self->{'target-path'}/]); } @@ -237,7 +231,8 @@ sub _prepareBootloaderConfigFolder rmtree($pxeConfigPath); mkpath($pxeConfigPath); - for my $file ('pxelinux.0', 'vesamenu.c32') { + for my $file ('pxelinux.0', 'pxechain.com', 'vesamenu.c32', + 'mboot.c32', 'kernel-shutdown', 'initramfs-shutdown') { if (!-e "$pxePath/$file") { slxsystem( qq[cp -p "$basePath/share/boot-env/pxe/$file" $pxePath/] diff --git a/boot-env/pxe/Readme.pxe b/boot-env/pxe/Readme.pxe new file mode 100644 index 00000000..a4b967ab --- /dev/null +++ b/boot-env/pxe/Readme.pxe @@ -0,0 +1,65 @@ +Example how the PXElinux information is gathered: + +############################## PXElinux-menu file ############################## +##### first static information is written, can't be changed ##### +##### override with include-menu (except DEFAULT vesamenu.c32) ##### +# # +# DEFAULT vesamenu.c32 # +# NOESCAPE 0 # +# PROMPT 0 # +# # +##### then theme specific information is written (if theme specified) ##### +##### ##### +# # +# MENU BACKGROUND openslx.png # +# MENU WIDTH 78 # +# . # +# . # +# menu color unsel 37;40 #fff0f0f0 #ff8093a1 std # +# . # +# . # +# . # +# # +##### now slxsettings configuration is being read ##### +##### ##### +# # +# TIMEOUT 100 # +# TOTALTIMEOUT 600 # +# MENU MASTER PASSWD secret # +# MENU TITLE Welcome to OpenSLX # +# # +##### after this /etc/opt/openslx/boot-env/pxe/menu-include is included ##### +##### if it is existing, overriding above statements ##### +# # +# MENU PASSPROMPT Gesicherter Bereich, bitte Passwort eingeben: # +# MENU AUTOBOOT Auswahl startet in # Sekunden # +# . # +# . # +# . # +# # +##### at this point the system labels are being included ##### +##### ##### +# # +# LABEL openslx-suse-11.0-default::nfs # +# MENU LABEL ^SUSE 11.0 System / NFS # +# KERNEL suse-11.0-default/vmlinuz-2.6.25.20-0.1-pae # +# APPEND quiet vga=791 initrd=suse-11.0-default/initramfs-1 file # +# IPAPPEND 3 # +# TEXT HELP # +# OpenSUSE 11.0 System # +# ENDTEXT # +# . # +# . # +# . # +# # +##### at the end /etc/opt/openslx/boot-env/pxe/menu-bottom is being incl. ##### +##### if existing, please specify only systems and further menus ##### +# # +# MENU SEPARATOR # +# LABEL test # +# MENU LABEL ^Testmenu # +# MENU PASSWD test # +# KERNEL pxechain.com # +# APPEND 192.168.1.1::pxelinux.0 # +# # +########################## End of PXElinux-menu file ########################### diff --git a/boot-env/pxe/initramfs-shutdown b/boot-env/pxe/initramfs-shutdown new file mode 100644 index 00000000..3e4376bd Binary files /dev/null and b/boot-env/pxe/initramfs-shutdown differ diff --git a/boot-env/pxe/kernel-shutdown b/boot-env/pxe/kernel-shutdown new file mode 100644 index 00000000..ddb180dd Binary files /dev/null and b/boot-env/pxe/kernel-shutdown differ diff --git a/boot-env/pxe/mboot.c32 b/boot-env/pxe/mboot.c32 index e866f6d7..f1b4f6ee 100755 Binary files a/boot-env/pxe/mboot.c32 and b/boot-env/pxe/mboot.c32 differ diff --git a/boot-env/pxe/menu-bottom.example b/boot-env/pxe/menu-bottom.example new file mode 100644 index 00000000..6e580a03 --- /dev/null +++ b/boot-env/pxe/menu-bottom.example @@ -0,0 +1,39 @@ +# this include file will be loaded at the bottom of the menu after the system +# labels, please define only further menus and systems +# for theme configuration use theme.conf in your theme directory +# general settings can be set via slxsettings +# please copy to menu-bottom if needed + +## example: shutdown label in menu +#LABEL shutdown +# MENU LABEL ^Shutdown PC +# KERNEL kernel-shutdown +# APPEND initrd=initramfs-shutdown quiet + +## help label not selectable +#LABEL help +# MENU LABEL Press 'F1' for help +# MENU DISABLE + +## example: add an additional menu on the same tftp server +#LABEL test +# MENU LABEL ^Testmeu +# KERNEL vesamenu.c32 +# APPEND testmenu + +## example: add an additional menu on a different tftp server, with passwd +#LABEL test2 +# MENU LABEL ^Testmeu +# MENU PASSWD test +# KERNEL pxechain.com +# APPEND 192.168.101.102::pxelinux.0 + +## example blank line / menu separator +#MENU SEPARATOR + +## example localboot with passwd +#LABEL local +# MENU LABEL Boot from local ^Harddisk +# MENU PASSWD local +# localboot 0 + diff --git a/boot-env/pxe/menu-include.example b/boot-env/pxe/menu-include.example index 5ae8db5c..9f36df23 100644 --- a/boot-env/pxe/menu-include.example +++ b/boot-env/pxe/menu-include.example @@ -1,23 +1,58 @@ -# this include file will be loaded at the end and will overwrite existing defs +# this include file will be loaded at the end of theme and slxsettings +# configuration but right before the system labels +# it will overwrite existing defs # for theme configuration use theme.conf in your theme directory # general settings can be set via slxsettings # please copy to menu-include if needed ## example german help: -# MENU PASSPROMPT Gesicherter Bereich, bitte Passwort eingeben: -# MENU AUTOBOOT Auswahl startet in # Sekunden +#MENU PASSPROMPT Gesicherter Bereich, bitte Passwort eingeben: +#MENU AUTOBOOT Auswahl startet in # Sekunden + +## example: shutdown on timeout +#ONTIMEOUT shutdown +#LABEL shutdown +# MENU HIDE +# KERNEL kernel-shutdown +# APPEND initrd=initramfs-shutdown quiet + +## example: shutdown label in menu +#LABEL shutdown2 +# MENU LABEL ^Shutdown PC +# KERNEL kernel-shutdown +# APPEND initrd=initramfs-shutdown quiet + +## help/... text on F1 keypress +#F1 help_01.txt +## optionally with info +#LABEL help +# MENU LABEL Press 'F1' for help +# MENU DISABLE + +## example: add an additional menu on the same tftp server +#LABEL test +# MENU LABEL ^Testmeu +# KERNEL vesamenu.c32 +# APPEND testmenu + +## example: add an additional menu on a different tftp server, with passwd +#LABEL test2 +# MENU LABEL ^Testmeu +# MENU PASSWD test +# KERNEL pxechain.com +# APPEND 192.168.101.102::pxelinux.0 ## example non-selectable line -# LABEL - -# MENU LABEL ________________________________________________________ -# MENU DISABLE +#LABEL - +# MENU LABEL ________________________________________________________ +# MENU DISABLE ## example blank line / menu separator -# MENU SEPARATOR +#MENU SEPARATOR ## example localboot with passwd -# LABEL local -# MENU LABEL Boot from local ^Harddisk -# MENU PASSWD local -# localboot 0 +#LABEL local +# MENU LABEL Boot from local ^Harddisk +# MENU PASSWD local +# localboot 0 diff --git a/boot-env/pxe/pxechain.com b/boot-env/pxe/pxechain.com new file mode 100644 index 00000000..8c4e0c5b Binary files /dev/null and b/boot-env/pxe/pxechain.com differ diff --git a/boot-env/pxe/vesamenu.c32 b/boot-env/pxe/vesamenu.c32 index 942b0ca8..43dc3b22 100755 Binary files a/boot-env/pxe/vesamenu.c32 and b/boot-env/pxe/vesamenu.c32 differ -- cgit v1.2.3-55-g7522