Browse code

Add memtest, local boot

Dean Troyer authored on 2011/09/28 12:19:32
Showing 1 changed files
... ...
@@ -8,9 +8,19 @@
8 8
 
9 9
 UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
10 10
 
11
-DEST_DIR=${1:-/tmp/tftpboot}
11
+MEMTEST_VER=4.10
12
+MEMTEST_BIN=memtest86+-${MEMTEST_VER}.bin
13
+MEMTEST_URL=http://www.memtest.org/download/${MEMTEST_VER}/
14
+
15
+DEST_DIR=${1:-/tmp}/tftpboot
12 16
 OPWD=`pwd`
13 17
 
18
+mkdir -p $DEST_DIR/pxelinux.cfg
19
+cd $DEST_DIR
20
+for i in memdisk menu.c32 pxelinux.0; do
21
+	cp -p /usr/lib/syslinux/$i $DEST_DIR
22
+done
23
+
14 24
 DEFAULT=$DEST_DIR/pxelinux.cfg/default
15 25
 cat >$DEFAULT <<EOF
16 26
 default menu.c32
... ...
@@ -28,11 +38,6 @@ PXE Boot Menu
28 28
 
29 29
 EOF
30 30
 
31
-mkdir -p $DEST_DIR/pxelinux.cfg
32
-cd $DEST_DIR
33
-cp -p /usr/lib/syslinux/memdisk $DEST_DIR
34
-cp -p /usr/lib/syslinux/pxelinux.0 $DEST_DIR
35
-
36 31
 # Get Ubuntu netboot
37 32
 mkdir -p $DEST_DIR/ubuntu
38 33
 cd $DEST_DIR/ubuntu
... ...
@@ -49,6 +54,22 @@ cat >>$MENU <<EOF
49 49
 ubuntu - Ubuntu Natty
50 50
 EOF
51 51
 
52
+# Get Memtest
53
+cd $DEST_DIR
54
+if [ ! -r $MEMTEST_BIN ]; then
55
+    wget -N --quiet ${MEMTEST_URL}/${MEMTEST_BIN}.gz
56
+    gunzip $MEMTEST_BIN
57
+fi
58
+cat >>$DEFAULT <<EOF
59
+
60
+LABEL memtest
61
+    MENU LABEL Memtest86+
62
+    KERNEL $MEMTEST_BIN
63
+EOF
64
+cat >>$MENU <<EOF
65
+memtest - Memtest86+
66
+EOF
67
+
52 68
 # Get FreeDOS
53 69
 mkdir -p $DEST_DIR/freedos
54 70
 cd $DEST_DIR/freedos
... ...
@@ -64,3 +85,16 @@ EOF
64 64
 cat >>$MENU <<EOF
65 65
 freedos - FreeDOS
66 66
 EOF
67
+
68
+# Local disk boot
69
+cat >>$DEFAULT <<EOF
70
+
71
+LABEL local
72
+    MENU LABEL Local disk
73
+    MENU DEFAULT
74
+    LOCALBOOT 0
75
+EOF
76
+cat >>$MENU <<EOF
77
+local - Local disk boot
78
+EOF
79
+