summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Janczyk2009-04-03 19:57:11 +0200
committerMichael Janczyk2009-04-03 19:57:11 +0200
commitd9d2ded910b2c94bbc0301f6cc1d127fbe653f23 (patch)
treecceae36155b9f7f7eaa9037444a594cb4688e677
parentSmall nasty bug with brtcl stp off/0 ... (diff)
downloadcore-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.tar.gz
core-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.tar.xz
core-d9d2ded910b2c94bbc0301f6cc1d127fbe653f23.zip
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
-rw-r--r--Makefile2
-rw-r--r--boot-env/OpenSLX/BootEnvironment/PXE.pm27
-rw-r--r--boot-env/pxe/Readme.pxe65
-rw-r--r--boot-env/pxe/initramfs-shutdownbin0 -> 665088 bytes
-rw-r--r--boot-env/pxe/kernel-shutdownbin0 -> 688752 bytes
-rwxr-xr-xboot-env/pxe/mboot.c32bin43364 -> 44900 bytes
-rw-r--r--boot-env/pxe/menu-bottom.example39
-rw-r--r--boot-env/pxe/menu-include.example57
-rw-r--r--boot-env/pxe/pxechain.combin0 -> 998 bytes
-rwxr-xr-xboot-env/pxe/vesamenu.c32bin140580 -> 145680 bytes
-rw-r--r--lib/OpenSLX/Basics.pm1
11 files changed, 162 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index ac4af318..8bb69903 100644
--- a/Makefile
+++ b/Makefile
@@ -195,7 +195,7 @@ plain-install:
tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/; \
cp -pP tools/busybox{,.x86_64,.i586} \
$(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox/; \
- cp -p boot-env/pxe/menu-include.example \
+ cp -p boot-env/pxe/menu-*.example \
$(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/boot-env/pxe/; \
cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs/; \
tar --exclude=.svn -cp -C initramfs tpm | \
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
--- /dev/null
+++ b/boot-env/pxe/initramfs-shutdown
Binary files differ
diff --git a/boot-env/pxe/kernel-shutdown b/boot-env/pxe/kernel-shutdown
new file mode 100644
index 00000000..ddb180dd
--- /dev/null
+++ b/boot-env/pxe/kernel-shutdown
Binary files differ
diff --git a/boot-env/pxe/mboot.c32 b/boot-env/pxe/mboot.c32
index e866f6d7..f1b4f6ee 100755
--- a/boot-env/pxe/mboot.c32
+++ b/boot-env/pxe/mboot.c32
Binary files 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
--- /dev/null
+++ b/boot-env/pxe/pxechain.com
Binary files differ
diff --git a/boot-env/pxe/vesamenu.c32 b/boot-env/pxe/vesamenu.c32
index 942b0ca8..43dc3b22 100755
--- a/boot-env/pxe/vesamenu.c32
+++ b/boot-env/pxe/vesamenu.c32
Binary files differ
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm
index 8f0bddb2..e5bb4e4d 100644
--- a/lib/OpenSLX/Basics.pm
+++ b/lib/OpenSLX/Basics.pm
@@ -108,7 +108,6 @@ I<slxsettings>-script, so please look there if you'd like to know more.
'pxe-timeout' => '100',
'pxe-title' => 'Welcome to OpenSLX',
'pxe-totaltimeout' => '600',
- 'tftp-server-ip' => undef,
);
chomp($openslxConfig{'locale-charmap'});