Well, here’s the promised script to regenerate the main PXE menu based on the menu entries created by register-suse and register-vmware.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| #!/bin/bash
TFTP_DIR=/srv/tftpboot/pxelinux.cfg
mkdir -p $TFTP_DIR &>/dev/null
# Iterate through the pxelinux.cfg directory and recreate the index menues.
for dir in $( find $TFTP_DIR -mindepth 1 -maxdepth 1 -type d ); do
echo "Generating summary menu for: $dir"
count=1
cat > $dir.menu << EOF
MENU TITLE Linux Installationservices
MENU BACKGROUND addons/background.png
MENU COLOR screen 37;40 #80ffffff #00000000
MENU COLOR border 0 #ffffffff #ee000000 std
MENU COLOR title 0 #ffffffff #ee000000 std
MENU COLOR unsel 0 #ffffffff #ee000000 std
MENU COLOR sel 0 #ffffffff #85000000 std
MENU COLOR scrollbar 30;44 #40000000 #00000000
MENU COLOR tabmsg 0 #ee000000 #ffffffff std
MENU COLOR cmdmark 0 #ff00ff00 #00000000 std
MENU COLOR cmdline 0 #ee000000 #ffffffff std
MENU COLOR timeout_msg 0 #ee000000 #ffffffff std
MENU COLOR timeout 0 #ee000000 #ffffffff std
MENU COLOR disabled 0 #ffffffff #ee000000 std
MENU COLOR pwdheader 0 #ff000000 #99ffffff rev
MENU COLOR pwdborder 0 #ff000000 #99ffffff rev
MENU COLOR pwdentry 0 #ff000000 #99ffffff rev
MENU COLOR hotkey 0 #ff00ff00 #ee000000 std
MENU COLOR hotsel 0 #ffffffff #85000000 std
EOF
for file in $( find $dir -mindepth 1 -name "*.menu" | sort -r ); do
FILE_LABEL="$( grep ^#LABEL $file | cut -d -f2- )"
FILE_OSARCH="$( grep ^#OSARCH $file | cut -d -f2- )"
cat >> $dir.menu << EOF
LABEL $count
MENU LABEL $FILE_LABEL ($FILE_OSARCH)
KERNEL addons/vesamenu.c32
APPEND pxelinux.cfg/${dir##*/}/${file##*/}
EOF
count=$(( $count + 1 ))
done
done
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
| Tue Jul 24, 17:18:35 [0] > ll -R /srv/tftpboot/
/srv/tftpboot/:
total 28K
drwxr-xr-x 2 root root 4.0K Jun 20 2011 addons/
drwxr-xr-x 7 root root 4.0K Jun 24 2011 boot/
drwxr-xr-x 6 root root 4.0K Jul 20 13:14 pxelinux.cfg/
-rw-r--r-- 1 root root 15K Oct 7 2009 pxelinux.0
/srv/tftpboot/addons:
total 280K
-rw-r--r-- 1 root root 16K Dec 28 2009 background.png
-rw-r--r-- 1 root root 23K Dec 28 2009 background-sles.png
-rw-r--r-- 1 root root 24K Dec 28 2009 background-suse.png
-rw-r--r-- 1 root root 20K Dec 28 2009 background-vmware.png
-rw-r--r-- 1 root root 48K Oct 7 2009 mboot.c32
-rw-r--r-- 1 root root 142K Oct 7 2009 vesamenu.c32
/srv/tftpboot/boot:
total 20K
drwxr-xr-x 3 root root 4.0K Jun 24 2011 esx/
drwxr-xr-x 2 root root 4.0K Oct 14 2009 firmware/
drwxr-xr-x 5 root root 4.0K Dec 14 2011 opensuse/
drwxr-xr-x 10 root root 4.0K Mar 9 17:28 sles/
drwxr-xr-x 3 root root 4.0K Oct 7 2009 tests/
/srv/tftpboot/boot/esx:
total 4.0K
drwxr-xr-x 2 root root 4.0K Jun 24 2011 4.1-348481/
/srv/tftpboot/boot/esx/4.1-348481:
total 81M
-r--r--r-- 1 root root 79M Jun 24 2011 initrd.img
-r--r--r-- 1 root root 1.5M Jun 24 2011 vmlinuz
/srv/tftpboot/boot/firmware:
total 4.3M
-rw-r--r-- 1 root root 1.5M Oct 14 2009 fdboot.img
-rw-r--r-- 1 root root 20K Oct 14 2009 memdisk
-rw-r--r-- 1 root root 1.5M Oct 14 2009 qmh2462_1.76.img
-rw-r--r-- 1 root root 1.5M Oct 14 2009 qmh2462_1.81.img
/srv/tftpboot/boot/opensuse:
total 12K
drwxr-xr-x 4 root root 4.0K Jun 20 2011 11.3/
drwxr-xr-x 4 root root 4.0K Jun 20 2011 11.4/
drwxr-xr-x 4 root root 4.0K Dec 14 2011 12.1/
/srv/tftpboot/boot/opensuse/11.3:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 20 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 20 2011 x86/
/srv/tftpboot/boot/opensuse/11.3/x64:
total 32M
-r--r--r-- 1 root root 28M Jun 20 2011 initrd
-r--r--r-- 1 root root 3.8M Jun 20 2011 linux
/srv/tftpboot/boot/opensuse/11.3/x86:
total 32M
-r--r--r-- 1 root root 28M Jun 20 2011 initrd
-r--r--r-- 1 root root 3.7M Jun 20 2011 linux
/srv/tftpboot/boot/opensuse/11.4:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 20 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 20 2011 x86/
/srv/tftpboot/boot/opensuse/11.4/x64:
total 37M
-r--r--r-- 1 root root 33M Jun 20 2011 initrd
-r--r--r-- 1 root root 4.1M Jun 20 2011 linux
/srv/tftpboot/boot/opensuse/11.4/x86:
total 37M
-r--r--r-- 1 root root 33M Jun 20 2011 initrd
-r--r--r-- 1 root root 3.9M Jun 20 2011 linux
/srv/tftpboot/boot/opensuse/12.1:
total 8.0K
drwxr-xr-x 2 root root 4.0K Dec 14 2011 x64/
drwxr-xr-x 2 root root 4.0K Dec 14 2011 x86/
/srv/tftpboot/boot/opensuse/12.1/x64:
total 43M
-r--r--r-- 1 root root 39M Dec 14 2011 initrd
-r--r--r-- 1 root root 4.5M Dec 14 2011 linux
/srv/tftpboot/boot/opensuse/12.1/x86:
total 43M
-r--r--r-- 1 root root 38M Dec 14 2011 initrd
-r--r--r-- 1 root root 4.4M Dec 14 2011 linux
/srv/tftpboot/boot/sles:
total 32K
drwxr-xr-x 4 root root 4.0K Jun 24 2011 10.2/
drwxr-xr-x 4 root root 4.0K Sep 28 2011 10.3/
drwxr-xr-x 4 root root 4.0K Jun 17 2011 10.4/
drwxr-xr-x 4 root root 4.0K Jun 17 2011 11/
drwxr-xr-x 4 root root 4.0K Jun 17 2011 11.1/
drwxr-xr-x 4 root root 4.0K Jun 17 2011 11.1-vmware/
drwxr-xr-x 3 root root 4.0K Mar 9 17:28 11.2/
drwxr-xr-x 4 root root 4.0K Jul 24 17:04 11.2-vmware/
/srv/tftpboot/boot/sles/10.2:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 24 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 24 2011 x86/
/srv/tftpboot/boot/sles/10.2/x64:
total 11M
-r--r--r-- 1 root root 9.0M Jun 24 2011 initrd
-r--r--r-- 1 root root 1.4M Jun 24 2011 linux
/srv/tftpboot/boot/sles/10.2/x86:
total 11M
-r--r--r-- 1 root root 8.9M Jun 24 2011 initrd
-r--r--r-- 1 root root 1.3M Jun 24 2011 linux
/srv/tftpboot/boot/sles/10.3:
total 8.0K
drwxr-xr-x 2 root root 4.0K Sep 28 2011 x64/
drwxr-xr-x 2 root root 4.0K Sep 28 2011 x86/
/srv/tftpboot/boot/sles/10.3/x64:
total 12M
-r--r--r-- 1 root root 11M Sep 28 2011 initrd
-r--r--r-- 1 root root 1.4M Sep 28 2011 linux
/srv/tftpboot/boot/sles/10.3/x86:
total 12M
-r--r--r-- 1 root root 11M Sep 28 2011 initrd
-r--r--r-- 1 root root 1.3M Sep 28 2011 linux
/srv/tftpboot/boot/sles/10.4:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x86/
/srv/tftpboot/boot/sles/10.4/x64:
total 13M
-r--r--r-- 1 root root 12M Jun 17 2011 initrd
-r--r--r-- 1 root root 1.4M Jun 17 2011 linux
/srv/tftpboot/boot/sles/10.4/x86:
total 13M
-r--r--r-- 1 root root 12M Jun 17 2011 initrd
-r--r--r-- 1 root root 1.3M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x86/
/srv/tftpboot/boot/sles/11/x64:
total 24M
-r--r--r-- 1 root root 21M Jun 17 2011 initrd
-r--r--r-- 1 root root 2.5M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11/x86:
total 23M
-r--r--r-- 1 root root 21M Jun 17 2011 initrd
-r--r--r-- 1 root root 2.4M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11.1:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x86/
/srv/tftpboot/boot/sles/11.1/x64:
total 27M
-r--r--r-- 1 root root 23M Jun 17 2011 initrd
-r--r--r-- 1 root root 3.1M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11.1/x86:
total 26M
-r--r--r-- 1 root root 23M Jun 17 2011 initrd
-r--r--r-- 1 root root 3.1M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11.1-vmware:
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x64/
drwxr-xr-x 2 root root 4.0K Jun 17 2011 x86/
/srv/tftpboot/boot/sles/11.1-vmware/x64:
total 27M
-r--r--r-- 1 root root 23M Jun 17 2011 initrd
-r--r--r-- 1 root root 3.1M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11.1-vmware/x86:
total 26M
-r--r--r-- 1 root root 23M Jun 17 2011 initrd
-r--r--r-- 1 root root 3.1M Jun 17 2011 linux
/srv/tftpboot/boot/sles/11.2:
total 4.0k
drwxr-xr-x 2 root root 4.0K Mar 9 17:29 x64/
/srv/tftpboot/boot/sles/11.2/x64:
total 36M
-r--r--r-- 1 root root 33M Mar 9 17:29 initrd
-r--r--r-- 1 root root 3.7M Mar 9 17:29 linux
/srv/tftpboot/boot/sles/11.2-vmware:
total 8.0K
drwxr-xr-x 2 root root 4.0K Mar 9 16:52 x64/
drwxr-xr-x 2 root root 4.0K Jul 24 17:05 x86/
/srv/tftpboot/boot/sles/11.2-vmware/x64:
total 36M
-r--r--r-- 1 root root 33M Jul 20 12:46 initrd
-r--r--r-- 1 root root 3.7M Jul 20 12:46 linux
/srv/tftpboot/boot/sles/11.2-vmware/x86:
total 35M
-r--r--r-- 1 root root 32M Jul 24 17:17 initrd
-r--r--r-- 1 root root 3.6M Jul 24 17:17 linux
/srv/tftpboot/boot/tests:
total 4.0K
drwxr-xr-x 2 root root 4.0K Oct 7 2009 memtest/
/srv/tftpboot/boot/tests/memtest:
total 164K
-rw-r--r-- 1 root root 157K Oct 7 2009 memtest86+-4.00
/srv/tftpboot/pxelinux.cfg:
total 48K
-rw-r--r-- 1 root root 2.0K Jun 20 2011 default
drwxr-xr-x 2 root root 4.0K Jun 24 2011 esx/
-rw-r--r-- 1 root root 1.3K Jul 24 17:18 esx.menu
drwxr-xr-x 2 root root 4.0K Jun 20 2011 esxi/
-rw-r--r-- 1 root root 1.1K Jul 24 17:18 esxi.menu
-rw-r--r-- 1 root root 423 Oct 20 2009 firmware.menu
drwxr-xr-x 2 root root 4.0K Dec 14 2011 opensuse/
-rw-r--r-- 1 root root 1.8K Jul 24 17:18 opensuse.menu
-rw-r--r-- 1 root root 2.6K Jun 4 2010 rescue.menu
drwxr-xr-x 2 root root 4.0K Jul 24 17:05 sles/
-rw-r--r-- 1 root root 2.7K Jul 24 17:18 sles.menu
-rw-r--r-- 1 root root 329 Oct 20 2009 tests.menu
/srv/tftpboot/pxelinux.cfg/esx:
total 8.0K
-rw-r--r-- 1 root root 1.9K Jun 24 2011 esx-4.1-260247.menu
-rw-r--r-- 1 root root 1.9K Jun 24 2011 esx-4.1-348481.menu
/srv/tftpboot/pxelinux.cfg/esxi:
total 4.0K
-rw-r--r-- 1 root root 1.7K Jun 20 2011 esxi41.menu
/srv/tftpboot/pxelinux.cfg/opensuse:
total 24K
-rw-r--r-- 1 root root 1.8K Jun 20 2011 opensuse-11.3-x64.menu
-rw-r--r-- 1 root root 1.8K Jun 20 2011 opensuse-11.3-x86.menu
-rw-r--r-- 1 root root 1.8K Jun 20 2011 opensuse-11.4-x64.menu
-rw-r--r-- 1 root root 1.8K Jun 20 2011 opensuse-11.4-x86.menu
-rw-r--r-- 1 root root 1.8K Dec 14 2011 opensuse-12.1-x64.menu
-rw-r--r-- 1 root root 1.8K Dec 14 2011 opensuse-12.1-x86.menu
/srv/tftpboot/pxelinux.cfg/sles:
total 60K
-rw-r--r-- 1 root root 1.8K Jul 24 16:58 sles-10.2-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:57 sles-10.2-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:57 sles-10.3-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:57 sles-10.3-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:57 sles-10.4-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:57 sles-10.4-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:58 sles-11-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:58 sles-11-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:59 sles-11.1-vmware-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:59 sles-11.1-vmware-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 16:59 sles-11.1-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 17:00 sles-11.1-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 17:00 sles-11.2-vmware-x64.menu
-rw-r--r-- 1 root root 1.8K Jul 24 17:17 sles-11.2-vmware-x86.menu
-rw-r--r-- 1 root root 1.8K Jul 24 17:00 sles-11.2-x64.menu
|