Merge lp:~xnox/debian-cd/cd-boot-images-amd64 into lp:~ubuntu-cdimage/debian-cd/ubun3
- cd-boot-images-amd64
- Merge into ubun3
Proposed by
Dimitri John Ledkov
Status: | Merged |
---|---|
Merged at revision: | 2076 |
Proposed branch: | lp:~xnox/debian-cd/cd-boot-images-amd64 |
Merge into: | lp:~ubuntu-cdimage/debian-cd/ubun3 |
Diff against target: |
840 lines (+105/-703) 2 files modified
tools/boot/groovy/boot-amd64 (+73/-703) tools/boot/groovy/common.sh (+32/-0) |
To merge this branch: | bzr merge lp:~xnox/debian-cd/cd-boot-images-amd64 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek | Approve | ||
Ubuntu CD Image Team | Pending | ||
VCS imports | Pending | ||
Review via email: mp+386094@code.launchpad.net |
Commit message
groovy: switch boot-amd64 to cd-boot-
Description of the change
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote : | # |
Revision history for this message
Dimitri John Ledkov (xnox) wrote : | # |
Please review this
Revision history for this message
Dimitri John Ledkov (xnox) wrote : | # |
cd-boot-
Revision history for this message
Steve Langasek (vorlon) : | # |
review:
Needs Information
Revision history for this message
Steve Langasek (vorlon) wrote : | # |
Discussed elsewhere that these options are documented in the .info for xorissofs instead of in the manpage or the help output (sigh)
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'tools/boot/groovy/boot-amd64' | |||
2 | --- tools/boot/groovy/boot-amd64 2020-05-21 21:59:34 +0000 | |||
3 | +++ tools/boot/groovy/boot-amd64 2020-06-19 13:49:32 +0000 | |||
4 | @@ -12,682 +12,87 @@ | |||
5 | 12 | 12 | ||
6 | 13 | N=$1 | 13 | N=$1 |
7 | 14 | CDDIR=$2 | 14 | CDDIR=$2 |
8 | 15 | BOOTDIR= | ||
9 | 16 | if [ "$DI_WWW_HOME" = "default" ];then | ||
10 | 17 | DI_WWW_HOME="http://debian-amd64.alioth.debian.org/debian-installer/daily" | ||
11 | 18 | fi | ||
12 | 19 | if [ ! "$DI_DIST" ]; then | ||
13 | 20 | export DI_DIST="$DI_CODENAME" | ||
14 | 21 | fi | ||
15 | 22 | if [ -z "$DI_PATH" ]; then | ||
16 | 23 | DI_PATH="$($BASEDIR/tools/find-newest-installer)" | ||
17 | 24 | fi | ||
18 | 25 | |||
19 | 26 | default_preseed | ||
20 | 27 | default_language | ||
21 | 28 | |||
22 | 29 | cd $CDDIR/.. | 15 | cd $CDDIR/.. |
23 | 30 | 16 | ||
24 | 31 | # | ||
25 | 32 | # This script is called with $1 (now $N) as the CD to | ||
26 | 33 | # make bootable. N may be in the form "n" or "n_NONUS" | ||
27 | 34 | # There may be more than 4 disks...support extras. | ||
28 | 35 | |||
29 | 36 | # Strip NONUS part of disk number | ||
30 | 37 | # NN will be 1...N so it can be used as an index | ||
31 | 38 | # | ||
32 | 39 | NN=`echo $N | sed -e 's/_NONUS//'` | ||
33 | 40 | |||
34 | 41 | if [ "$CDIMAGE_ADDON" ]; then | ||
35 | 42 | # second disk, at least in spirit | ||
36 | 43 | NN=2 | ||
37 | 44 | fi | ||
38 | 45 | |||
39 | 46 | > $N.mkisofs_opts | 17 | > $N.mkisofs_opts |
40 | 47 | 18 | ||
47 | 48 | case "$MKISOFS" in | 19 | # pick default kernel |
48 | 49 | *xorriso*) | 20 | FLAVOUR=generic |
49 | 50 | echo -n "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin " >> $N.mkisofs_opts | 21 | if [ "$PROJECT" = "ubuntustudio" ]; then |
50 | 51 | # uncomment to add a small FAT partition on the media | 22 | FLAVOUR=lowlatency |
51 | 52 | # /sbin/mkfs.msdos -n Bla -C test.fat 8192 | 23 | fi |
52 | 53 | # echo -n "-append_partition 2 0x01 test.fat " >> $N.mkisofs_opts | 24 | |
53 | 25 | # rename kernel+initrd | ||
54 | 26 | mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz | ||
55 | 27 | mv $CDDIR/casper/filesystem.initrd-$FLAVOUR $CDDIR/casper/initrd | ||
56 | 28 | HWE= | ||
57 | 29 | if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then | ||
58 | 30 | HWE="true" | ||
59 | 31 | mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinuz | ||
60 | 32 | mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd | ||
61 | 33 | fi | ||
62 | 34 | |||
63 | 35 | # download, extract and include cd-boot-images | ||
64 | 36 | mkdir cd-boot-images | ||
65 | 37 | $BASEDIR/tools/apt-selection download cd-boot-images-amd64 | ||
66 | 38 | dpkg --fsys-tarfile cd-boot-images-amd64*_all.deb | tar xf - -C cd-boot-images | ||
67 | 39 | echo -n "-J -joliet-long -l -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/i386-pc/boot_hybrid.img --efi-boot boot/grub/efi.img -efi-boot-part --efi-boot-image -partition_offset 16 cd-boot-images/usr/share/cd-boot-images-amd64/tree" >> $N.mkisofs_opts | ||
68 | 40 | |||
69 | 41 | default_kernel_params | ||
70 | 42 | |||
71 | 43 | # generate grub.cfg | ||
72 | 44 | mkdir -p $CDDIR/boot/grub/ | ||
73 | 45 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
74 | 46 | set timeout=30 | ||
75 | 47 | |||
76 | 48 | loadfont unicode | ||
77 | 49 | |||
78 | 50 | set menu_color_normal=white/black | ||
79 | 51 | set menu_color_highlight=black/light-gray | ||
80 | 52 | |||
81 | 53 | menuentry "$HUMANPROJECT" { | ||
82 | 54 | set gfxpayload=keep | ||
83 | 55 | linux /casper/vmlinuz $KERNEL_PARAMS | ||
84 | 56 | initrd /casper/initrd | ||
85 | 57 | } | ||
86 | 58 | EOF | ||
87 | 59 | |||
88 | 60 | # All but server get safe-graphics mode | ||
89 | 61 | if [ "$PROJECT" != "ubuntu-server" ]; then | ||
90 | 62 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
91 | 63 | menuentry "$HUMANPROJECT (safe graphics)" { | ||
92 | 64 | set gfxpayload=keep | ||
93 | 65 | linux /casper/vmlinuz nomodeset $KERNEL_PARAMS | ||
94 | 66 | initrd /casper/initrd | ||
95 | 67 | } | ||
96 | 68 | EOF | ||
97 | 69 | fi | ||
98 | 70 | |||
99 | 71 | # ubiquity based projects get OEM mode | ||
100 | 72 | case $KERNEL_PARAMS in | ||
101 | 73 | *maybe-ubiquity*) | ||
102 | 74 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
103 | 75 | menuentry "OEM install (for manufacturers)" { | ||
104 | 76 | set gfxpayload=keep | ||
105 | 77 | linux /casper/vmlinuz ${KERNEL_PARAMS/maybe-ubiquity/only-ubiquity oem-config/enable=true} | ||
106 | 78 | initrd /casper/initrd | ||
107 | 79 | } | ||
108 | 80 | EOF | ||
109 | 54 | ;; | 81 | ;; |
110 | 55 | esac | 82 | esac |
111 | 56 | 83 | ||
526 | 57 | # List of boot image for each CD | 84 | # Currently only server is built with HWE, hence no safe-graphics/OEM |
527 | 58 | KTYPE[1]="" #isolinux multiboot in fact | 85 | if [ "$HWE" ]; then |
114 | 59 | KTYPE[2]="" | ||
115 | 60 | # XXX add net-image back when it's fixed | ||
116 | 61 | KTYPE[3]="" | ||
117 | 62 | KTYPE[4]="" | ||
118 | 63 | KTYPE[5]="" | ||
119 | 64 | KTYPE[6]="" | ||
120 | 65 | KTYPE[7]="" | ||
121 | 66 | KTYPE[8]="" | ||
122 | 67 | KTYPE[9]="" | ||
123 | 68 | KTYPE[10]="" | ||
124 | 69 | |||
125 | 70 | THISTYPE=${KTYPE[$NN]} | ||
126 | 71 | |||
127 | 72 | PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/" | ||
128 | 73 | PREFIX_GA="" | ||
129 | 74 | PREFIX_HWE="" | ||
130 | 75 | KERNEL_PREFIXES="PREFIX_GA" | ||
131 | 76 | if [ "$BACKPORT_KERNEL" ]; then | ||
132 | 77 | PREFIX_HWE="hwe-" | ||
133 | 78 | if [ "$PROJECT" = ubuntu-server ]; then | ||
134 | 79 | KERNEL_PREFIXES="$KERNEL_PREFIXES PREFIX_HWE" | ||
135 | 80 | fi | ||
136 | 81 | fi | ||
137 | 82 | |||
138 | 83 | DISK_IMAGES="" | ||
139 | 84 | BOOT_IMAGES="" | ||
140 | 85 | TAR_IMAGES="" | ||
141 | 86 | for kp in $KERNEL_PREFIXES; do | ||
142 | 87 | BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/initrd.gz ${!kp}cdrom/vmlinuz ${!kp}cdrom/debian-cd_info.tar.gz" | ||
143 | 88 | TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz" | ||
144 | 89 | done | ||
145 | 90 | |||
146 | 91 | case $PROJECT in | ||
147 | 92 | ubuntustudio) | ||
148 | 93 | if [ "$CDIMAGE_LIVE" ]; then | ||
149 | 94 | FLAVOUR=lowlatency | ||
150 | 95 | else | ||
151 | 96 | FLAVOUR=generic | ||
152 | 97 | fi | ||
153 | 98 | ;; | ||
154 | 99 | *) | ||
155 | 100 | FLAVOUR=generic | ||
156 | 101 | ;; | ||
157 | 102 | esac | ||
158 | 103 | |||
159 | 104 | # Download boot images | ||
160 | 105 | for image in MANIFEST.udebs $BOOT_IMAGES $DISK_IMAGES $TAR_IMAGES; do | ||
161 | 106 | if [ ! -e "$image" ]; then | ||
162 | 107 | dir=$(dirname $image) | ||
163 | 108 | mkdir -p $dir | ||
164 | 109 | if [ ! "$DI_WWW_HOME" ];then | ||
165 | 110 | cp "$DI_PATH/current/legacy-images/$image" "$image" | ||
166 | 111 | else | ||
167 | 112 | wget "$DI_WWW_HOME/$image" -O "$image" | ||
168 | 113 | fi | ||
169 | 114 | fi | ||
170 | 115 | done | ||
171 | 116 | |||
172 | 117 | if [ "$NN" = "1" ]; then | ||
173 | 118 | list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR | ||
174 | 119 | |||
175 | 120 | echo "Using ISOLINUX boot-disks image on CD$N" | ||
176 | 121 | mkdir -p $CDDIR/../syslinux boot$N/isolinux | ||
177 | 122 | SYSLINUXDEB="$($BASEDIR/tools/apt-selection cache show syslinux-common | \ | ||
178 | 123 | grep ^Filename | awk '{print $2}')" | ||
179 | 124 | (dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \ | ||
180 | 125 | tar xf - -C $CDDIR/../syslinux ./usr/lib) | ||
181 | 126 | ISOLINUXDEB="$($BASEDIR/tools/apt-selection cache show isolinux | \ | ||
182 | 127 | grep ^Filename | awk '{print $2}')" | ||
183 | 128 | (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \ | ||
184 | 129 | tar xf - -C $CDDIR/../syslinux ./usr/lib) | ||
185 | 130 | cp -f $CDDIR/../syslinux/usr/lib/ISOLINUX/isolinux.bin boot$N/isolinux/ | ||
186 | 131 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/vesamenu.c32 boot$N/isolinux/ | ||
187 | 132 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/ | ||
188 | 133 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/ | ||
189 | 134 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/ | ||
190 | 135 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/gfxboot.c32 boot$N/isolinux/ | ||
191 | 136 | cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/chain.c32 boot$N/isolinux/ | ||
192 | 137 | |||
193 | 138 | GFXBOOT= | ||
194 | 139 | if THEMEDEB="$($BASEDIR/tools/apt-selection cache show gfxboot-theme-ubuntu)"; then | ||
195 | 140 | THEMEDEB="$(echo "$THEMEDEB" | grep ^Filename | awk '{print $2}')" | ||
196 | 141 | dpkg --fsys-tarfile "$MIRROR/$THEMEDEB" | tar xf - -C . ./usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz | ||
197 | 142 | tar zxf usr/share/gfxboot-theme-ubuntu/bootlogo.tar.gz -C boot$N/isolinux | ||
198 | 143 | GFXBOOT=1 | ||
199 | 144 | fi | ||
200 | 145 | |||
201 | 146 | rm -rf usr | ||
202 | 147 | if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then | ||
203 | 148 | for kp in $KERNEL_PREFIXES; do | ||
204 | 149 | cp -lf "${!kp}cdrom/vmlinuz" "$CDDIR/install/${!kp}vmlinuz" | ||
205 | 150 | cp -lf "${!kp}cdrom/initrd.gz" "$CDDIR/install/${!kp}initrd.gz" | ||
206 | 151 | done | ||
207 | 152 | fi | ||
208 | 153 | if [ "$CDIMAGE_LIVE" = 1 ]; then | ||
209 | 154 | CASPER_KERNEL=/casper/vmlinuz | ||
210 | 155 | CASPER_INITRD=/casper/initrd | ||
211 | 156 | for kernel in $CDDIR/casper/filesystem.kernel-*; do | ||
212 | 157 | flavour=${kernel##*filesystem.kernel-} | ||
213 | 158 | flavour2="-${flavour}" | ||
214 | 159 | [ "$flavour" = "${FLAVOUR}" ] && flavour2="" | ||
215 | 160 | mv $CDDIR/casper/filesystem.kernel-$flavour $CDDIR$CASPER_KERNEL${flavour2} | ||
216 | 161 | mv $CDDIR/casper/filesystem.initrd-$flavour $CDDIR$CASPER_INITRD${flavour2} | ||
217 | 162 | done | ||
218 | 163 | fi | ||
219 | 164 | echo -n "-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " >> $N.mkisofs_opts | ||
220 | 165 | case "$MKISOFS" in | ||
221 | 166 | *xorriso*) | ||
222 | 167 | echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus " >> $N.mkisofs_opts | ||
223 | 168 | ;; | ||
224 | 169 | *) | ||
225 | 170 | echo -n "-eltorito-alt-boot -efi-boot boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts | ||
226 | 171 | ;; | ||
227 | 172 | esac | ||
228 | 173 | else | ||
229 | 174 | if [ -n "$THISTYPE" ]; then | ||
230 | 175 | echo "Using $THISTYPE boot-disks image on CD$N" | ||
231 | 176 | mkdir -p boot$N/boot | ||
232 | 177 | cp $THISTYPE/boot.img boot$N/boot/ | ||
233 | 178 | echo -n "-cache-inodes -J -l -b boot/boot.img " >> $N.mkisofs_opts | ||
234 | 179 | else | ||
235 | 180 | mkdir boot$N | ||
236 | 181 | echo -n "-cache-inodes -J -l " >> $N.mkisofs_opts | ||
237 | 182 | fi | ||
238 | 183 | fi | ||
239 | 184 | |||
240 | 185 | case "$MKISOFS" in | ||
241 | 186 | *xorriso*) | ||
242 | 187 | ;; | ||
243 | 188 | *) | ||
244 | 189 | "$BASEDIR/tools/sorting_weights" "$N" boot$N/isolinux/isolinux.bin boot$N/isolinux/boot.cat | ||
245 | 190 | echo -n "-sort $(pwd)/$N.weights " >> $N.mkisofs_opts | ||
246 | 191 | ;; | ||
247 | 192 | esac | ||
248 | 193 | |||
249 | 194 | # Only disk one gets the extra files installed | ||
250 | 195 | # | ||
251 | 196 | if [ "$NN" = "1" ]; then | ||
252 | 197 | |||
253 | 198 | |||
254 | 199 | HIDDEN_TIMEOUT= | ||
255 | 200 | if [ "$CDIMAGE_LIVE" = 1 ] && [ "$CDIMAGE_DVD" != 1 ]; then | ||
256 | 201 | case $PROJECT in | ||
257 | 202 | mythbuntu) | ||
258 | 203 | HIDDEN_TIMEOUT=1 | ||
259 | 204 | ;; | ||
260 | 205 | lubuntu) | ||
261 | 206 | # Lubuntu appears to be an exception, being a live image but not | ||
262 | 207 | # using hidden timeout. | ||
263 | 208 | ;; | ||
264 | 209 | *) | ||
265 | 210 | HIDDEN_TIMEOUT=2 | ||
266 | 211 | ;; | ||
267 | 212 | esac | ||
268 | 213 | if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-access.pcx" ]; then | ||
269 | 214 | ACCESSPCX="$PROJECT-access.pcx" | ||
270 | 215 | else | ||
271 | 216 | ACCESSPCX=access-new.pcx | ||
272 | 217 | fi | ||
273 | 218 | if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-blank.pcx" ]; then | ||
274 | 219 | BLANKPCX="$PROJECT-blank.pcx" | ||
275 | 220 | else | ||
276 | 221 | BLANKPCX=blank.pcx | ||
277 | 222 | fi | ||
278 | 223 | fi | ||
279 | 224 | |||
280 | 225 | # populate the install directory as well | ||
281 | 226 | for disk in $DISK_IMAGES; do | ||
282 | 227 | dir=$(dirname $disk) | ||
283 | 228 | mkdir -p $CDDIR/install/$dir | ||
284 | 229 | cp -lf $disk $CDDIR/install/$dir | ||
285 | 230 | done | ||
286 | 231 | |||
287 | 232 | if [ "$CDIMAGE_INSTALL" = 1 ]; then | ||
288 | 233 | for tar in $TAR_IMAGES; do | ||
289 | 234 | dir=$(dirname $tar) | ||
290 | 235 | mkdir -p $CDDIR/install/$dir | ||
291 | 236 | tar -C $CDDIR/install/$dir -xzpf $tar | ||
292 | 237 | done | ||
293 | 238 | fi | ||
294 | 239 | |||
295 | 240 | # ISOLINUX setup | ||
296 | 241 | |||
297 | 242 | if [ "$CDIMAGE_INSTALL" = 1 ]; then | ||
298 | 243 | # Include Smart Boot Manager image for people where isolinux fails | ||
299 | 244 | gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin | ||
300 | 245 | # Keep the original file timestamp | ||
301 | 246 | touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin | ||
302 | 247 | cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/ | ||
303 | 248 | fi | ||
304 | 249 | # Extract memtest86+ from the archive | ||
305 | 250 | MEMTEST86DEB="$($BASEDIR/tools/apt-selection cache show memtest86+ | \ | ||
306 | 251 | grep ^Filename | awk '{print $2}')" | ||
307 | 252 | dpkg --fsys-tarfile "$MIRROR/$MEMTEST86DEB" | \ | ||
308 | 253 | tar xf - -C $CDDIR/install/ ./boot/memtest86+.bin | ||
309 | 254 | mv $CDDIR/install/boot/memtest86+.bin $CDDIR/install/mt86plus | ||
310 | 255 | rm -rf $CDDIR/install/boot | ||
311 | 256 | # Isolinux help files come from d-i. | ||
312 | 257 | cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx) | ||
313 | 258 | # Override splash screen. | ||
314 | 259 | if [ "$SPLASHRLE" ] && [ -e "$SPLASHRLE" ]; then | ||
315 | 260 | cp -p "$SPLASHRLE" boot$N/isolinux/splash.rle | ||
316 | 261 | fi | ||
317 | 262 | if [ "$GFXSPLASH" ] && [ -e "$GFXSPLASH" ]; then | ||
318 | 263 | cp -p "$GFXSPLASH" boot$N/isolinux/splash.pcx | ||
319 | 264 | fi | ||
320 | 265 | if [ "$SPLASHPNG" ] && [ -e "$SPLASHPNG" ]; then | ||
321 | 266 | cp -p "$SPLASHPNG" boot$N/isolinux/splash.png | ||
322 | 267 | fi | ||
323 | 268 | if [ "$HIDDEN_TIMEOUT" ] && [ "$ACCESSPCX" ]; then | ||
324 | 269 | cp -p "$BASEDIR/data/$DI_CODENAME/$ACCESSPCX" boot$N/isolinux/access.pcx | ||
325 | 270 | fi | ||
326 | 271 | if [ "$HIDDEN_TIMEOUT" = 2 ]; then | ||
327 | 272 | cp -p "$BASEDIR/data/$DI_CODENAME/$BLANKPCX" boot$N/isolinux/blank.pcx | ||
328 | 273 | fi | ||
329 | 274 | if [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then | ||
330 | 275 | # No language menu. | ||
331 | 276 | echo en >boot$N/isolinux/lang | ||
332 | 277 | elif [ "$PROJECT" = ubuntukylin ]; then | ||
333 | 278 | echo zh_CN >boot$N/isolinux/lang | ||
334 | 279 | fi | ||
335 | 280 | # Remove elilo configuration; only for Macs. | ||
336 | 281 | rm -f boot$N/isolinux/elilo* | ||
337 | 282 | rm -f boot$N/isolinux/*.msg* | ||
338 | 283 | if [ "$CDIMAGE_INSTALL" = 1 ]; then | ||
339 | 284 | rm -f boot$N/isolinux/*.txt.live | ||
340 | 285 | rm -f boot$N/isolinux/*.hlp.live | ||
341 | 286 | else | ||
342 | 287 | for x in boot$N/isolinux/*.txt.live; do | ||
343 | 288 | [ -f "$x" ] || continue | ||
344 | 289 | mv "$x" "${x%.live}" | ||
345 | 290 | done | ||
346 | 291 | for x in boot$N/isolinux/*.hlp.live; do | ||
347 | 292 | [ -f "$x" ] || continue | ||
348 | 293 | mv "$x" "${x%.live}" | ||
349 | 294 | done | ||
350 | 295 | fi | ||
351 | 296 | # Nuke the GTK menu items for now. | ||
352 | 297 | rm -f boot$N/isolinux/*gtk.cfg | ||
353 | 298 | rm -f boot$N/isolinux/*.txt.withgtk | ||
354 | 299 | # We only support single-architecture images. | ||
355 | 300 | sed -i 's|%install%|install|' boot$N/isolinux/*.cfg | ||
356 | 301 | # Move GRUB files to the right place. | ||
357 | 302 | mkdir -p $CDDIR/EFI/BOOT | ||
358 | 303 | mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/BOOTx64.EFI $CDDIR/EFI/BOOT/BOOTx64.EFI | ||
359 | 304 | mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/grubx64.efi $CDDIR/EFI/BOOT/grubx64.efi | ||
360 | 305 | mcopy -i boot$N/isolinux/grub/efi.img ::EFI/BOOT/mmx64.efi $CDDIR/EFI/BOOT/mmx64.efi | ||
361 | 306 | mkdir -p $CDDIR/boot/grub | ||
362 | 307 | mv boot$N/isolinux/grub/* $CDDIR/boot/grub/ | ||
363 | 308 | rmdir boot$N/isolinux/grub | ||
364 | 309 | sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg | ||
365 | 310 | |||
366 | 311 | if [ "$BACKPORT_KERNEL" ]; then | ||
367 | 312 | cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF | ||
368 | 313 | submenu 'Boot and Install with the HWE kernel' { | ||
369 | 314 | EOF | ||
370 | 315 | : > boot$N/isolinux/hwe-gfxboot.cfg | ||
371 | 316 | fi | ||
372 | 317 | |||
373 | 318 | # Menu timeout, in seconds. | ||
374 | 319 | # gfxboots will need it in deciseconds (it is converted as needed) | ||
375 | 320 | menu_timeout=30 | ||
376 | 321 | |||
377 | 322 | # When using hidden timeout; use a shorter timeout while the user | ||
378 | 323 | # only sees the accessibility logo at the bottom of the screen. | ||
379 | 324 | if [ "$HIDDEN_TIMEOUT" ]; then | ||
380 | 325 | menu_timeout=5 | ||
381 | 326 | fi | ||
382 | 327 | |||
383 | 328 | # Set timeout for the GRUB menu | ||
384 | 329 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
385 | 330 | set timeout=$menu_timeout | ||
386 | 331 | EOF | ||
387 | 332 | |||
388 | 333 | # Set gfxboot timeouts (for hidden-timeout or for the language picker) | ||
389 | 334 | sed -i "s/^timeout .*/timeout $(($menu_timeout * 10))/" \ | ||
390 | 335 | boot$N/isolinux/isolinux.cfg boot$N/isolinux/prompt.cfg | ||
391 | 336 | |||
392 | 337 | # Set up-to-date build dates. Kludgy because d-i sets its own version as | ||
393 | 338 | # the build date. | ||
394 | 339 | DI_VERSION="$(perl -lne 'if (/built on ([0-9a-z]*)/) { print $1 }' \ | ||
395 | 340 | "boot$N/isolinux/f1.txt")" | ||
396 | 341 | if [ "$DI_VERSION" ]; then | ||
397 | 342 | : "${CDIMAGE_DATE:=$(date +%Y%m%d)}" | ||
398 | 343 | sed -i "s/$DI_VERSION/$CDIMAGE_DATE/g" \ | ||
399 | 344 | "boot$N"/isolinux/*.txt "boot$N"/isolinux/*.hlp | ||
400 | 345 | fi | ||
401 | 346 | |||
402 | 347 | # Isolinux config file. | ||
403 | 348 | if [ "$CDIMAGE_LIVE" = 1 ]; then | ||
404 | 349 | DEFAULT_LABEL=live | ||
405 | 350 | else | ||
406 | 351 | DEFAULT_LABEL=install | ||
407 | 352 | fi | ||
408 | 353 | cat > boot$N/isolinux/txt.cfg <<EOF | ||
409 | 354 | default $DEFAULT_LABEL | ||
410 | 355 | EOF | ||
411 | 356 | > boot$N/isolinux/adtxt.cfg | ||
412 | 357 | if [ "$GFXBOOT" ]; then | ||
413 | 358 | cat >> boot$N/isolinux/isolinux.cfg <<EOF | ||
414 | 359 | ui gfxboot bootlogo | ||
415 | 360 | EOF | ||
416 | 361 | fi | ||
417 | 362 | if [ "$PROJECT" = ubuntu ] || [ "$PROJECT" = ubuntu-server ] || \ | ||
418 | 363 | [ "$PROJECT" = ubuntu-mid ] || [ "$PROJECT" = ubuntu-netbook ] || \ | ||
419 | 364 | [ "$PROJECT" = mythbuntu ] || [ "$PROJECT" = ubuntukylin ] || \ | ||
420 | 365 | [ "$PROJECT" = ubuntu-desktop-next ]; then | ||
421 | 366 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
422 | 367 | foreground=0xFFFFFF | ||
423 | 368 | background=0x958490 | ||
424 | 369 | screen-colour=0x270A1E | ||
425 | 370 | EOF | ||
426 | 371 | fi | ||
427 | 372 | if [ "$PROJECT" = ubuntu-gnome ]; then | ||
428 | 373 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
429 | 374 | screen-colour=0x2D3335 | ||
430 | 375 | EOF | ||
431 | 376 | fi | ||
432 | 377 | if [ "$PROJECT" = ubuntu-budgie ]; then | ||
433 | 378 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
434 | 379 | foreground=0xffffff | ||
435 | 380 | background=0xd3dae3 | ||
436 | 381 | screen-colour=0x383c4a | ||
437 | 382 | EOF | ||
438 | 383 | fi | ||
439 | 384 | if [ "$PROJECT" = ubuntu-mate ]; then | ||
440 | 385 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
441 | 386 | foreground=0xffffff | ||
442 | 387 | background=0x87a556 | ||
443 | 388 | screen-colour=0x3c3b37 | ||
444 | 389 | EOF | ||
445 | 390 | fi | ||
446 | 391 | if [ "$HIDDEN_TIMEOUT" ]; then | ||
447 | 392 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
448 | 393 | hidden-timeout=$HIDDEN_TIMEOUT | ||
449 | 394 | EOF | ||
450 | 395 | fi | ||
451 | 396 | # access-options default: v1 v2 v3 brltty m1 m2 | ||
452 | 397 | # d-i only supports v1 and brltty right now. | ||
453 | 398 | if [ "$CDIMAGE_LIVE" != 1 ]; then | ||
454 | 399 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
455 | 400 | access-options=v1 brltty | ||
456 | 401 | access-options-v1=access=v1 FRONTEND_BACKGROUND=dark | ||
457 | 402 | EOF | ||
458 | 403 | elif [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then | ||
459 | 404 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
460 | 405 | access-options=v1 v2 brltty m1 | ||
461 | 406 | EOF | ||
462 | 407 | elif [ "$PROJECT" = xubuntu ]; then | ||
463 | 408 | # v1 and m1 don't have the necessary sed calls for Xubuntu yet. | ||
464 | 409 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
465 | 410 | access-options=v2 v3 brltty m2 | ||
466 | 411 | EOF | ||
467 | 412 | fi | ||
468 | 413 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
469 | 414 | label normal=Normal | ||
470 | 415 | append normal= | ||
471 | 416 | EOF | ||
472 | 417 | if [ "$CDIMAGE_LIVE" = 1 ]; then | ||
473 | 418 | QUIET=quiet | ||
474 | 419 | SPLASH=splash | ||
475 | 420 | case "$PROJECT" in | ||
476 | 421 | kubuntu|kubuntu-plasma5) | ||
477 | 422 | livelabel="^Start $HUMANPROJECT" | ||
478 | 423 | liveparams=' maybe-ubiquity' | ||
479 | 424 | NOTRYONLYDO=true | ||
480 | 425 | ;; | ||
481 | 426 | lubuntu) | ||
482 | 427 | livelabel="^Start $HUMANPROJECT" | ||
483 | 428 | liveparams= | ||
484 | 429 | NOTRYONLYDO=true | ||
485 | 430 | ;; | ||
486 | 431 | ubuntu-server) | ||
487 | 432 | livelabel="^Install $HUMANPROJECT" | ||
488 | 433 | liveparams= | ||
489 | 434 | SPLASH= | ||
490 | 435 | NOTRYONLYDO=true | ||
491 | 436 | ;; | ||
492 | 437 | ubuntu-mid) | ||
493 | 438 | livelabel="^Try $HUMANPROJECT without installing" | ||
494 | 439 | liveparams= | ||
495 | 440 | NOTRYONLYDO=true | ||
496 | 441 | ;; | ||
497 | 442 | ubuntu) | ||
498 | 443 | livelabel="^Try $HUMANPROJECT without installing" | ||
499 | 444 | liveparams= | ||
500 | 445 | livelabelgrub="^$HUMANPROJECT" | ||
501 | 446 | liveparamsgrub=' maybe-ubiquity' | ||
502 | 447 | NOTRYONLYDOINGRUB=true | ||
503 | 448 | ;; | ||
504 | 449 | *) | ||
505 | 450 | livelabel="^Try $HUMANPROJECT without installing" | ||
506 | 451 | liveparams= | ||
507 | 452 | esac | ||
508 | 453 | |||
509 | 454 | if [ -z "$livelabelgrub" ]; then | ||
510 | 455 | livelabelgrub="$livelabel" | ||
511 | 456 | liveparamsgrub="$liveparams" | ||
512 | 457 | fi | ||
513 | 458 | |||
514 | 459 | |||
515 | 460 | LAYERFS_PATH_OPT=$(add_layerfs_path_opt) | ||
516 | 461 | |||
517 | 462 | for variant in "" " (safe graphics)^ nomodeset"; do | ||
518 | 463 | suffix="${variant%^*}" | ||
519 | 464 | extra_kopt="${variant#*^}" | ||
520 | 465 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
521 | 466 | label live$(echo "${extra_kopt}"|tr ' ' '-') | ||
522 | 467 | menu label ${livelabel}${suffix} | ||
523 | 468 | kernel $CASPER_KERNEL | ||
524 | 469 | append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt --- | ||
525 | 470 | EOF | ||
528 | 471 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | 86 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF |
748 | 472 | menuentry "${livelabelgrub#^}${suffix}" { | 87 | menuentry "$HUMANPROJECT with the HWE kernel" { |
749 | 473 | set gfxpayload=keep | 88 | set gfxpayload=keep |
750 | 474 | linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt --- | 89 | linux /casper/hwe-vmlinuz $KERNEL_PARAMS |
751 | 475 | initrd $CASPER_INITRD | 90 | initrd /casper/hwe-initrd |
752 | 476 | } | 91 | } |
753 | 477 | EOF | 92 | EOF |
754 | 478 | done | 93 | fi |
755 | 479 | cat >> $CDDIR/boot/grub/loopback.cfg <<EOF | 94 | |
756 | 480 | menuentry "${livelabelgrub#^}" { | 95 | # UEFI Entries |
538 | 481 | set gfxpayload=keep | ||
539 | 482 | linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH --- | ||
540 | 483 | initrd $CASPER_INITRD | ||
541 | 484 | } | ||
542 | 485 | EOF | ||
543 | 486 | if [ "$NOTRYONLYDO" != "true" ]; then | ||
544 | 487 | for variant in "" " (safe graphics)^ nomodeset"; do | ||
545 | 488 | suffix="${variant%^*}" | ||
546 | 489 | extra_kopt="${variant#*^}" | ||
547 | 490 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
548 | 491 | label live-install$(echo "${extra_kopt}"|tr ' ' '-') | ||
549 | 492 | menu label ^Install $HUMANPROJECT${suffix} | ||
550 | 493 | kernel $CASPER_KERNEL | ||
551 | 494 | append $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt --- | ||
552 | 495 | EOF | ||
553 | 496 | if [ "$NOTRYONLYDOINGRUB" != "true" ]; then | ||
554 | 497 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
555 | 498 | menuentry "Install $HUMANPROJECT${suffix}" { | ||
556 | 499 | set gfxpayload=keep | ||
557 | 500 | linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt --- | ||
558 | 501 | initrd $CASPER_INITRD | ||
559 | 502 | } | ||
560 | 503 | EOF | ||
561 | 504 | fi | ||
562 | 505 | done | ||
563 | 506 | if [ "$NOTRYONLYDOINGRUB" != "true" ]; then | ||
564 | 507 | cat >> $CDDIR/boot/grub/loopback.cfg <<EOF | ||
565 | 508 | menuentry "Install $HUMANPROJECT" { | ||
566 | 509 | linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH --- | ||
567 | 510 | initrd $CASPER_INITRD | ||
568 | 511 | } | ||
569 | 512 | EOF | ||
570 | 513 | fi | ||
571 | 514 | fi | ||
572 | 515 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
573 | 516 | label driverupdates=Use driver update disc | ||
574 | 517 | append driverupdates=debian-installer/driver-update=true | ||
575 | 518 | applies driverupdates=live live-install live-nomodeset live-install-nomodeset | ||
576 | 519 | EOF | ||
577 | 520 | fi | ||
578 | 521 | if [ "$CDIMAGE_INSTALL" = 1 ]; then | ||
579 | 522 | if [ "$CDIMAGE_LIVE" != 1 ]; then | ||
580 | 523 | for kp in $KERNEL_PREFIXES; do | ||
581 | 524 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
582 | 525 | label ${!kp}install | ||
583 | 526 | menu label ^Install $HUMANPROJECT${!kp:+ with the HWE kernel} | ||
584 | 527 | kernel /install/${!kp}vmlinuz | ||
585 | 528 | append $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} vga=788 initrd=/install/${!kp}initrd.gz quiet --- | ||
586 | 529 | EOF | ||
587 | 530 | cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF | ||
588 | 531 | menuentry "Install $HUMANPROJECT" { | ||
589 | 532 | set gfxpayload=keep | ||
590 | 533 | linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet --- | ||
591 | 534 | initrd /install/${!kp}initrd.gz | ||
592 | 535 | } | ||
593 | 536 | EOF | ||
594 | 537 | done | ||
595 | 538 | else | ||
596 | 539 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
597 | 540 | label install | ||
598 | 541 | menu label ^Install $HUMANPROJECT in text mode | ||
599 | 542 | kernel /install/vmlinuz | ||
600 | 543 | append $KERNEL_PARAMS $DEFAULT_PRESEED vga=788 initrd=/install/initrd.gz quiet --- | ||
601 | 544 | EOF | ||
602 | 545 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | ||
603 | 546 | menuentry "Install $HUMANPROJECT in text mode" { | ||
604 | 547 | set gfxpayload=keep | ||
605 | 548 | linux /install/vmlinuz $KERNEL_PARAMS $DEFAULT_PRESEED quiet --- | ||
606 | 549 | initrd /install/initrd.gz | ||
607 | 550 | } | ||
608 | 551 | EOF | ||
609 | 552 | fi | ||
610 | 553 | cat >> boot$N/isolinux/adtxt.cfg <<EOF | ||
611 | 554 | label expert | ||
612 | 555 | menu hide | ||
613 | 556 | kernel /install/vmlinuz | ||
614 | 557 | append $KERNEL_PARAMS $DEFAULT_PRESEED priority=low vga=788 initrd=/install/initrd.gz --- | ||
615 | 558 | EOF | ||
616 | 559 | if [ "$PROJECT" = edubuntu ]; then | ||
617 | 560 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
618 | 561 | label workstation=Install a workstation | ||
619 | 562 | replace workstation=file=/cdrom/preseed/workstation.seed | ||
620 | 563 | applies workstation=install | ||
621 | 564 | EOF | ||
622 | 565 | fi | ||
623 | 566 | if [ "$CDIMAGE_DVD" = 1 ] && [ "$PROJECT" != edubuntu ] && [ "$PROJECT" != ubuntu-server ]; then | ||
624 | 567 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
625 | 568 | label server=Install a server | ||
626 | 569 | replace server=file=/cdrom/preseed/ubuntu-server.seed | ||
627 | 570 | applies server=install | ||
628 | 571 | EOF | ||
629 | 572 | fi | ||
630 | 573 | fi | ||
631 | 574 | # No OEM mode on ubuntu-server live | ||
632 | 575 | if ! ([ "$PROJECT" = ubuntu-server ] && [ "$CDIMAGE_LIVE" = 1 ]); then | ||
633 | 576 | # The GRUB versions of this only correspond to single isolinux labels, | ||
634 | 577 | # because we don't yet have the necessary technology in our GRUB menu stack | ||
635 | 578 | # to have a two-dimensional set of boot options, as is implemented for | ||
636 | 579 | # isolinux using the gfxboot "applies" keyword. | ||
637 | 580 | for kp in $KERNEL_PREFIXES; do | ||
638 | 581 | cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF | ||
639 | 582 | label ${!kp}oem=OEM install (for manufacturers) | ||
640 | 583 | append ${!kp}oem=oem-config/enable=true | ||
641 | 584 | EOF | ||
642 | 585 | if [ "$CDIMAGE_LIVE" = 1 ]; then | ||
643 | 586 | cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF | ||
644 | 587 | applies ${!kp}oem=live live-install install live-nomodeset live-install-nomodeset | ||
645 | 588 | EOF | ||
646 | 589 | cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF | ||
647 | 590 | menuentry "OEM install (for manufacturers)" { | ||
648 | 591 | set gfxpayload=keep | ||
649 | 592 | linux $CASPER_KERNEL $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}}$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true --- | ||
650 | 593 | initrd $CASPER_INITRD | ||
651 | 594 | } | ||
652 | 595 | EOF | ||
653 | 596 | else | ||
654 | 597 | cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF | ||
655 | 598 | applies ${!kp}oem=${!kp}install | ||
656 | 599 | EOF | ||
657 | 600 | cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF | ||
658 | 601 | menuentry "OEM install (for manufacturers)" { | ||
659 | 602 | set gfxpayload=keep | ||
660 | 603 | linux /install/${!kp}vmlinuz $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet oem-config/enable=true --- | ||
661 | 604 | initrd /install/${!kp}initrd.gz | ||
662 | 605 | } | ||
663 | 606 | EOF | ||
664 | 607 | fi | ||
665 | 608 | done | ||
666 | 609 | fi # No OEM mode on ubuntu-server live | ||
667 | 610 | if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then | ||
668 | 611 | if [ "$PROJECT" != ubuntu-server ]; then | ||
669 | 612 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
670 | 613 | label cli=Install a command-line system | ||
671 | 614 | replace cli=file=/cdrom/preseed/cli.seed | ||
672 | 615 | applies cli=install | ||
673 | 616 | EOF | ||
674 | 617 | else | ||
675 | 618 | for kp in $KERNEL_PREFIXES; do | ||
676 | 619 | cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF | ||
677 | 620 | label ${!kp}minimal=Install a minimal system | ||
678 | 621 | replace ${!kp}minimal=file=/cdrom/preseed/${!kp}ubuntu-server-minimal.seed | ||
679 | 622 | applies ${!kp}minimal=${!kp}install | ||
680 | 623 | label ${!kp}minimalvm=Install a minimal virtual machine | ||
681 | 624 | replace ${!kp}minimalvm=file=/cdrom/preseed/${!kp}ubuntu-server-minimalvm.seed | ||
682 | 625 | applies ${!kp}minimalvm=${!kp}install | ||
683 | 626 | EOF | ||
684 | 627 | done | ||
685 | 628 | fi | ||
686 | 629 | fi | ||
687 | 630 | if [ "$CDIMAGE_INSTALL" = 1 ] && ([ "$PROJECT" = ubuntu ] || [ "$PROJECT" = xubuntu ] || [ "$PROJECT" = edubuntu ] || [ "$PROJECT" = ubuntu-mate ]); then | ||
688 | 631 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
689 | 632 | label ltsp=Install an LTSP server | ||
690 | 633 | replace ltsp=file=/cdrom/preseed/ltsp.seed | ||
691 | 634 | applies ltsp=install | ||
692 | 635 | EOF | ||
693 | 636 | fi | ||
694 | 637 | if [ "$CDIMAGE_INSTALL" = 1 ] && [ "$PROJECT" = mythbuntu ]; then | ||
695 | 638 | cat >> boot$N/isolinux/gfxboot.cfg <<EOF | ||
696 | 639 | label ltsp=Install a Diskless Image Server | ||
697 | 640 | replace ltsp=file=/cdrom/preseed/ltsp.seed | ||
698 | 641 | applies ltsp=install | ||
699 | 642 | EOF | ||
700 | 643 | fi | ||
701 | 644 | if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then | ||
702 | 645 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
703 | 646 | label check | ||
704 | 647 | menu label ^Check disc for defects | ||
705 | 648 | kernel /install/vmlinuz | ||
706 | 649 | append $KERNEL_PARAMS $FRONTEND_BACKGROUND MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet --- | ||
707 | 650 | EOF | ||
708 | 651 | for kp in $KERNEL_PREFIXES; do | ||
709 | 652 | cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF | ||
710 | 653 | menuentry "Check disc for defects" { | ||
711 | 654 | set gfxpayload=keep | ||
712 | 655 | linux /install/${!kp}vmlinuz $KERNEL_PARAMS MENU=/bin/cdrom-checker-menu quiet --- | ||
713 | 656 | initrd /install/${!kp}initrd.gz | ||
714 | 657 | } | ||
715 | 658 | EOF | ||
716 | 659 | done | ||
717 | 660 | fi | ||
718 | 661 | if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then | ||
719 | 662 | cat >> boot$N/isolinux/adtxt.cfg <<EOF | ||
720 | 663 | label rescue | ||
721 | 664 | menu label ^Rescue a broken system | ||
722 | 665 | kernel /install/vmlinuz | ||
723 | 666 | append $KERNEL_PARAMS $FRONTEND_BACKGROUND rescue/enable=true vga=788 initrd=/install/initrd.gz --- | ||
724 | 667 | EOF | ||
725 | 668 | for kp in $KERNEL_PREFIXES; do | ||
726 | 669 | cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF | ||
727 | 670 | menuentry "Rescue a broken system" { | ||
728 | 671 | set gfxpayload=keep | ||
729 | 672 | linux /install/${!kp}vmlinuz $KERNEL_PARAMS rescue/enable=true --- | ||
730 | 673 | initrd /install/${!kp}initrd.gz | ||
731 | 674 | } | ||
732 | 675 | EOF | ||
733 | 676 | done | ||
734 | 677 | fi | ||
735 | 678 | cat >> boot$N/isolinux/txt.cfg <<EOF | ||
736 | 679 | label memtest | ||
737 | 680 | menu label Test ^memory | ||
738 | 681 | kernel /install/mt86plus | ||
739 | 682 | label hd | ||
740 | 683 | menu label ^Boot from first hard disk | ||
741 | 684 | localboot 0x80 | ||
742 | 685 | EOF | ||
743 | 686 | cat >> $CDDIR/boot/grub/loopback.cfg <<EOF | ||
744 | 687 | menuentry "Test memory" { | ||
745 | 688 | linux16 /install/mt86plus | ||
746 | 689 | } | ||
747 | 690 | EOF | ||
757 | 691 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF | 96 | cat >> $CDDIR/boot/grub/grub.cfg <<EOF |
758 | 692 | grub_platform | 97 | grub_platform |
759 | 693 | if [ "\$grub_platform" = "efi" ]; then | 98 | if [ "\$grub_platform" = "efi" ]; then |
760 | @@ -699,40 +104,5 @@ | |||
761 | 699 | } | 104 | } |
762 | 700 | fi | 105 | fi |
763 | 701 | EOF | 106 | EOF |
764 | 702 | fi | ||
765 | 703 | |||
766 | 704 | if [ "$BACKPORT_KERNEL" ] && [ "$PROJECT" = ubuntu-server ]; then | ||
767 | 705 | cat >> $CDDIR/boot/grub/hwe-grub.cfg <<EOF | ||
768 | 706 | } | ||
769 | 707 | EOF | ||
770 | 708 | cat $CDDIR/boot/grub/hwe-grub.cfg >> $CDDIR/boot/grub/grub.cfg | ||
771 | 709 | cat boot$N/isolinux/hwe-gfxboot.cfg >> boot$N/isolinux/gfxboot.cfg | ||
772 | 710 | fi | ||
773 | 711 | rm -f $CDDIR/boot/grub/hwe-grub.cfg boot$N/isolinux/hwe-gfxboot.cfg | ||
774 | 712 | |||
775 | 713 | # write final lines to mkisofs_opts | ||
776 | 714 | if [ "$NN" = "1" ]; then | ||
777 | 715 | echo -n "boot$N " >> $N.mkisofs_opts | ||
778 | 716 | else | ||
779 | 717 | if [ -n "$THISTYPE" ]; then | ||
780 | 718 | echo -n "-c boot/boot.catalog boot$N " >> $N.mkisofs_opts | ||
781 | 719 | fi | ||
782 | 720 | fi | ||
783 | 721 | |||
784 | 722 | # Hack around the removal of support in gfxboot for reading from outside | ||
785 | 723 | # the bootlogo archive. This makes customisation harder and is not ideal. | ||
786 | 724 | tmpdir="$(mktemp -d)" | ||
787 | 725 | (cd "$tmpdir" && cpio -i) < boot$N/isolinux/bootlogo | ||
788 | 726 | cp -a boot$N/isolinux/*.fnt \ | ||
789 | 727 | boot$N/isolinux/*.hlp \ | ||
790 | 728 | boot$N/isolinux/*.jpg \ | ||
791 | 729 | boot$N/isolinux/*.pcx \ | ||
792 | 730 | boot$N/isolinux/*.tr \ | ||
793 | 731 | boot$N/isolinux/*.cfg \ | ||
794 | 732 | $(test -e boot$N/isolinux/lang && echo boot$N/isolinux/lang) \ | ||
795 | 733 | boot$N/isolinux/langlist \ | ||
796 | 734 | "$tmpdir/" | ||
797 | 735 | (cd "$tmpdir" && ls -1 | cpio --quiet -o) > boot$N/isolinux/bootlogo | ||
798 | 736 | rm -rf "$tmpdir" | ||
799 | 737 | 107 | ||
800 | 738 | # th,th, thats all | 108 | # th,th, thats all |
801 | 739 | 109 | ||
802 | === modified file 'tools/boot/groovy/common.sh' | |||
803 | --- tools/boot/groovy/common.sh 2020-05-21 21:59:34 +0000 | |||
804 | +++ tools/boot/groovy/common.sh 2020-06-19 13:49:32 +0000 | |||
805 | @@ -1,3 +1,35 @@ | |||
806 | 1 | # encode the right CD kernel parameteres, for every project | ||
807 | 2 | default_kernel_params() { | ||
808 | 3 | case $PROJECT in | ||
809 | 4 | ubuntu) | ||
810 | 5 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash --- " | ||
811 | 6 | ;; | ||
812 | 7 | ubuntukylin) | ||
813 | 8 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed locale=zh_CN keyboard-configuration/layoutcode?=cn maybe-ubiquity quiet splash --- " | ||
814 | 9 | ;; | ||
815 | 10 | kubuntu) | ||
816 | 11 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/kubuntu.seed maybe-ubiquity quiet splash --- " | ||
817 | 12 | ;; | ||
818 | 13 | lubuntu) | ||
819 | 14 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/lubuntu.seed quiet splash --- " | ||
820 | 15 | ;; | ||
821 | 16 | xubuntu) | ||
822 | 17 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/xubuntu.seed maybe-ubiquity quiet splash --- " | ||
823 | 18 | ;; | ||
824 | 19 | ubuntustudio) | ||
825 | 20 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntustudio.seed maybe-ubiquity quiet splash --- " | ||
826 | 21 | ;; | ||
827 | 22 | ubuntu-mate) | ||
828 | 23 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu-mate.seed maybe-ubiquity quiet splash --- " | ||
829 | 24 | ;; | ||
830 | 25 | ubuntu-budgie) | ||
831 | 26 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu-budgie.seed maybe-ubiquity quiet splash --- " | ||
832 | 27 | ;; | ||
833 | 28 | ubuntu-server) | ||
834 | 29 | KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }quiet ---" | ||
835 | 30 | ;; | ||
836 | 31 | esac | ||
837 | 32 | } | ||
838 | 1 | 33 | ||
839 | 2 | # This file provides some common code that is intented to be called | 34 | # This file provides some common code that is intented to be called |
840 | 3 | # by the various boot-<arch> scripts. | 35 | # by the various boot-<arch> scripts. |
Tested CD-ROM & USB boot, under:
* bare metal
* BIOS KVM
* UEFI KVM
Not Tested:
* Recent Macbook booting
I currently do not provide HFS+ partition table, with a "blessed" bootloader. I do not know if that is still required on recent Macbooks. If it fails to boot, we can add those, but as far as I know this was fixed and is no longer needed on Macbooks.