1 |
grub-mkrescue produces an ISO that is bootable from EFI as well as from |
2 |
the BIOS, so isolinux isn't necessary to accomplish that. The benefits |
3 |
are that (1) we reduce the number of dependencies required to make the |
4 |
ISO, (2) the same GRUB set up works for EFI and BIOS systems, and (3) |
5 |
grub-mkrescue replaces a whole lot of code that we no longer need to |
6 |
maintain. |
7 |
|
8 |
This patch has the side effect of removing the F[2-7] help texts and the |
9 |
memtest86+ option, since those were done via isolinux. I feel okay |
10 |
removing those since isolinux was only used on BIOS systems and not on |
11 |
EFI, so none of those things were available to the vast majority of our |
12 |
users. |
13 |
|
14 |
It also has the side-effect of removing Fedora's signed UEFI shim |
15 |
(sys-boot/shim) which could be used to add a hash for the live CD's grub |
16 |
binary so that you could install under Secure Boot. That doesn't offer |
17 |
any protection, and the author of the code indicated to me that the |
18 |
value in offering this feature is that it allows installation on systems |
19 |
with broken firmware under which important hardware (like the NVMe |
20 |
drive) isn't exposed unless using Secure Boot. After quite a bit of |
21 |
searching the internet, I can't find any mentions of this being a |
22 |
problem. |
23 |
|
24 |
Signed-off-by: Matt Turner <mattst88@g.o> |
25 |
--- |
26 |
doc/catalyst-spec.5.txt | 5 +- |
27 |
examples/livecd-stage2_template.spec | 5 +- |
28 |
livecd/files/x86-F2.msg | 22 -------- |
29 |
livecd/files/x86-F3.msg | 22 -------- |
30 |
livecd/files/x86-F4.msg | 20 ------- |
31 |
livecd/files/x86-F5.msg | 22 -------- |
32 |
livecd/files/x86-F6.msg | 14 ----- |
33 |
livecd/files/x86-F7.msg | 22 -------- |
34 |
targets/support/bootloader-setup.sh | 83 +--------------------------- |
35 |
targets/support/create-iso.sh | 68 +---------------------- |
36 |
targets/support/functions.sh | 69 ----------------------- |
37 |
11 files changed, 5 insertions(+), 347 deletions(-) |
38 |
delete mode 100644 livecd/files/x86-F2.msg |
39 |
delete mode 100644 livecd/files/x86-F3.msg |
40 |
delete mode 100644 livecd/files/x86-F4.msg |
41 |
delete mode 100644 livecd/files/x86-F5.msg |
42 |
delete mode 100644 livecd/files/x86-F6.msg |
43 |
delete mode 100644 livecd/files/x86-F7.msg |
44 |
|
45 |
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt |
46 |
index 682f4621..31e69820 100644 |
47 |
--- a/doc/catalyst-spec.5.txt |
48 |
+++ b/doc/catalyst-spec.5.txt |
49 |
@@ -186,10 +186,7 @@ Bootloader |
50 |
This is required for livecd-stage2 on all arches except amd64 and x86 which can autogenerate one |
51 |
if USE=system-bootloader is set. |
52 |
The cdtar is essentially the bootloader for the CD. It also holds the |
53 |
-main configuration for the bootloader. On x86/amd64, it also can |
54 |
-include a small memory testing application, called memtest86+ |
55 |
-(example: |
56 |
-`/usr/share/catalyst/livecd/cdtar/isolinux-2.13-memtest86+-cdtar.tar.bz2`). |
57 |
+main configuration for the bootloader. |
58 |
|
59 |
Kernel and boot issues |
60 |
~~~~~~~~~~~~~~~~~~~~~~ |
61 |
diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec |
62 |
index 6cfd33d3..ac1cd3e4 100644 |
63 |
--- a/examples/livecd-stage2_template.spec |
64 |
+++ b/examples/livecd-stage2_template.spec |
65 |
@@ -87,10 +87,9 @@ livecd/fstype: |
66 |
livecd/fsops: |
67 |
|
68 |
# The cdtar is essentially the bootloader for the CD. It also holds the main |
69 |
-# configuration for the bootloader. On x86/amd64, it also can include a small |
70 |
-# memory testing application, called memtest86+. |
71 |
+# configuration for the bootloader. |
72 |
# example: |
73 |
-# livecd/cdtar: /usr/share/catalyst/livecd/cdtar/isolinux-2.13-memtest86+-cdtar.tar.bz2 |
74 |
+# livecd/cdtar: /usr/share/catalyst/livecd/cdtar/[...].cdtar.tar.bz2 |
75 |
livecd/cdtar: |
76 |
|
77 |
# This is the full path and filename to the ISO image that the livecd-stage2 |
78 |
diff --git a/livecd/files/x86-F2.msg b/livecd/files/x86-F2.msg |
79 |
deleted file mode 100644 |
80 |
index eb1638b8..00000000 |
81 |
--- a/livecd/files/x86-F2.msg |
82 |
+++ /dev/null |
83 |
@@ -1,22 +0,0 @@ |
84 |
-Gentoo Linux LiveCD boot options - [F1 to display available kernels] |
85 |
- |
86 |
-Please hit F1 to see the available kernels on this livecd. Please note that |
87 |
-the -nofb counterparts to each kernel disable the framebuffer |
88 |
-and splash images. Additionally, the memtest86 boot option is available |
89 |
-to test local RAM for errors. To use memtest86, just type 'memtest86'. |
90 |
- |
91 |
-This lists the possible command line options that can be used to tweak the boot |
92 |
-process of this CD. This lists the Gentoo-specific options, along with a few |
93 |
-options that are built-in to the kernel, but that have been proven very useful |
94 |
-to our users. Also, all options that start with "do" have a "no" inverse, that |
95 |
-does the opposite. For example, "doscsi" enables SCSI support in the initial |
96 |
-ramdisk boot, while "noscsi" disables it. |
97 |
- |
98 |
-To list the options, please press keys from F3 through F7. |
99 |
- |
100 |
-F3: Hardware (Page 1) |
101 |
-F4: Hardware (Page 2) |
102 |
-F5: Hardware (Page 3) |
103 |
-F6: Volume Management |
104 |
-F7: Misc. |
105 |
- |
106 |
diff --git a/livecd/files/x86-F3.msg b/livecd/files/x86-F3.msg |
107 |
deleted file mode 100644 |
108 |
index e0ec2bd8..00000000 |
109 |
--- a/livecd/files/x86-F3.msg |
110 |
+++ /dev/null |
111 |
@@ -1,22 +0,0 @@ |
112 |
-Hardware options (Page 1): |
113 |
-acpi=on This loads support for ACPI and also causes the acpid daemon to |
114 |
- be started by the CD on boot. This is only needed if your |
115 |
- system requires ACPI to function properly. This is not |
116 |
- required for Hyperthreading support. |
117 |
-acpi=off Completely disables ACPI. This is useful on some older systems |
118 |
- and is also a requirement for using APM. This will disable any |
119 |
- Hyperthreading support of your processor. |
120 |
-console=X This sets up serial console access for the CD. The first |
121 |
- option is the device, usually ttyS0 on x86, followed by any |
122 |
- connection options, which are comma separated. The default |
123 |
- options are 9600,8,n,1. |
124 |
-dmraid=X This allows for passing options to the device-mapper RAID |
125 |
- subsystem. Options should be encapsulated in quotes. |
126 |
-doapm This loads APM driver support. This requires you to also use |
127 |
- acpi=off. |
128 |
-dopcmcia This loads support for PCMCIA and Cardbus hardware and also |
129 |
- causes the pcmcia cardmgr to be started by the CD on boot. |
130 |
- This is only required when booting from PCMCIA/Cardbus devices. |
131 |
-doscsi This loads support for most SCSI controllers. This is also a |
132 |
- requirement for booting most USB devices, as they use the SCSI |
133 |
- subsystem of the kernel. |
134 |
diff --git a/livecd/files/x86-F4.msg b/livecd/files/x86-F4.msg |
135 |
deleted file mode 100644 |
136 |
index 77ded0e3..00000000 |
137 |
--- a/livecd/files/x86-F4.msg |
138 |
+++ /dev/null |
139 |
@@ -1,20 +0,0 @@ |
140 |
-Hardware options (Page 2): |
141 |
-hda=stroke This allows you to partition the whole hard disk even when your |
142 |
- BIOS is unable to handle large disks. This option is only used |
143 |
- on machines with an older BIOS. Replace hda with the device |
144 |
- that is requiring this option. |
145 |
-ide=nodma This forces the disabling of DMA in the kernel and is required |
146 |
- by some IDE chipsets and also by some CDROM drives. If your |
147 |
- system is having trouble reading from your IDE CDROM, try this |
148 |
- option. This also disables the default hdparm settings from |
149 |
- being executed. |
150 |
-noapic This disables the Advanced Programmable Interrupt Controller |
151 |
- that is present on newer motherboards. It has been known to |
152 |
- cause some problems on older hardware. |
153 |
-nodetect This disables all of the autodetection done by the CD, |
154 |
- including device autodetection and DHCP probing. This is |
155 |
- useful for doing debugging of a failing CD or driver. |
156 |
-nodhcp This disables DHCP probing on detected network cards. This is |
157 |
- useful on networks with only static addresses. |
158 |
-nodmraid Disables support for device-mapper RAID, such as that used for |
159 |
- on-board IDE/SATA RAID controllers. |
160 |
diff --git a/livecd/files/x86-F5.msg b/livecd/files/x86-F5.msg |
161 |
deleted file mode 100644 |
162 |
index adfb0197..00000000 |
163 |
--- a/livecd/files/x86-F5.msg |
164 |
+++ /dev/null |
165 |
@@ -1,22 +0,0 @@ |
166 |
-Hardware options (Page 3): |
167 |
-nofirewire This disables the loading of Firewire modules. This should |
168 |
- only be necessary if your Firewire hardware is causing |
169 |
- a problem with booting the CD. |
170 |
-nogpm This diables gpm console mouse support. |
171 |
-nohotplug This disables the loading of the hotplug and coldplug init |
172 |
- scripts at boot. This is useful for doing debugging of a |
173 |
- failing CD or driver. |
174 |
-nokeymap This disables the keymap selection used to select non-US |
175 |
- keyboard layouts. |
176 |
-nolapic This disables the local APIC on Uniprocessor kernels. |
177 |
-nosata This disables the loading of Serial ATA modules. This is used |
178 |
- if your system is having problems with the SATA subsystem. |
179 |
-nosmp This disables SMP, or Symmetric Multiprocessing, on SMP-enabled |
180 |
- kernels. This is useful for debugging SMP-related issues with |
181 |
- certain drivers and motherboards. |
182 |
-nosound This disables sound support and volume setting. This is useful |
183 |
- for systems where sound support causes problems. |
184 |
-nousb This disables the autoloading of USB modules. This is useful |
185 |
- for debugging USB issues. |
186 |
-slowusb This adds some extra pauses into the boot process for slow |
187 |
- USB CDROMs, like in the IBM BladeCenter. |
188 |
diff --git a/livecd/files/x86-F6.msg b/livecd/files/x86-F6.msg |
189 |
deleted file mode 100644 |
190 |
index b61ee9c9..00000000 |
191 |
--- a/livecd/files/x86-F6.msg |
192 |
+++ /dev/null |
193 |
@@ -1,14 +0,0 @@ |
194 |
-Volume/Device Management: |
195 |
-doevms This enables support for IBM's pluggable EVMS, or Enterprise |
196 |
- Volume Management System. This is not safe to use with lvm2. |
197 |
-dolvm This enables support for Linux's Logical Volume Management. |
198 |
- This is not safe to use with evms2. |
199 |
-Screen reader access: |
200 |
-speakup.synth=synth starts speakup using a given synthesizer. |
201 |
- supported synths are acntpc, acntsa, apollo, audptr, bns, |
202 |
- decext, dectlk, dtlk, keypc, ltlk, spkout and txprt. |
203 |
- Also, soft is supported for software speech and dummy is |
204 |
- supported for testing. |
205 |
-speakup.quiet=1 sets the synthesizer not to speak until a key is pressed. |
206 |
-speakup_SYNTH.port=n sets the port for internal synthesizers. |
207 |
-speakup_SYNTH.ser=n sets the serial port for external synthesizers. |
208 |
diff --git a/livecd/files/x86-F7.msg b/livecd/files/x86-F7.msg |
209 |
deleted file mode 100644 |
210 |
index 82306245..00000000 |
211 |
--- a/livecd/files/x86-F7.msg |
212 |
+++ /dev/null |
213 |
@@ -1,22 +0,0 @@ |
214 |
-Other options: |
215 |
-debug Enables debugging code. This might get messy, as it displays |
216 |
- a lot of data to the screen. |
217 |
-docache This caches the entire runtime portion of the CD into RAM, |
218 |
- which allows you to umount /mnt/cdrom and mount another CDROM. |
219 |
- This option requires that you have at least twice as much |
220 |
- available RAM as the size of the CD. |
221 |
-doload=X This causes the initial ramdisk to load any module listed, as |
222 |
- well as dependencies. Replace X with the module name. |
223 |
- Multiple modules can be specified by a comma-separated list. |
224 |
-noload=X This causes the initial ramdisk to skip the loading of a |
225 |
- specific module that may be causing a problem. Syntax matches |
226 |
- that of doload. |
227 |
-nox This causes an X-enabled LiveCD to not automatically start X, |
228 |
- but rather, to drop to the command line instead. |
229 |
-scandelay This causes the CD to pause for 10 seconds during certain |
230 |
- portions the boot process to allow for devices that are slow to |
231 |
- initialize to be ready for use. |
232 |
-scandelay=X This allows you to specify a given delay, in seconds, to be |
233 |
- added to certain portions of the boot process to allow for |
234 |
- devices that are slow to initialize to be ready for use. |
235 |
- Replace X with the number of seconds to pause. |
236 |
diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh |
237 |
index 71da0c40..0643a04c 100755 |
238 |
--- a/targets/support/bootloader-setup.sh |
239 |
+++ b/targets/support/bootloader-setup.sh |
240 |
@@ -4,15 +4,9 @@ source ${clst_shdir}/support/functions.sh |
241 |
|
242 |
# $1 is the destination root |
243 |
|
244 |
-# We handle boot loader a little special. Most arches require a cdtar with bootloader files |
245 |
-# but we can generate one for amd64/x86 now |
246 |
if [ -n "${clst_cdtar}" ] |
247 |
then |
248 |
extract_cdtar $1 |
249 |
-elif [ "${clst_hostarch}" = "x86" ] || [ "${clst_hostarch}" = "amd64" ] |
250 |
-then |
251 |
- #assume if there is no cdtar and we are on a supported arch that the user just wants us to handle this |
252 |
- create_bootloader $1 |
253 |
else |
254 |
#While this seems a little crazy, it's entirely possible the bootloader is just shoved in isoroot overlay |
255 |
echo "No cdtar and unable to auto generate boot loader files... good luck" |
256 |
@@ -97,82 +91,7 @@ case ${clst_hostarch} in |
257 |
echo "--recoverykernel=boot/${x}" >> ${icfg} |
258 |
done |
259 |
;; |
260 |
- x86|amd64) |
261 |
- if [ -e $1/isolinux/isolinux.bin ] |
262 |
- then |
263 |
- # the rest of this function sets up the config file for isolinux |
264 |
- icfg=$1/isolinux/isolinux.cfg |
265 |
- kmsg=$1/isolinux/kernels.msg |
266 |
- echo "default ${first}" > ${icfg} |
267 |
- echo "timeout 150" >> ${icfg} |
268 |
- echo "ontimeout localhost" >> ${icfg} |
269 |
- echo "prompt 1" >> ${icfg} |
270 |
- echo "display boot.msg" >> ${icfg} |
271 |
- echo "F1 kernels.msg" >> ${icfg} |
272 |
- for k in {2..7} |
273 |
- do |
274 |
- echo "F${k} F${k}.msg" >> ${icfg} |
275 |
- done |
276 |
- |
277 |
- echo "Available kernels:" > ${kmsg} |
278 |
- for i in {2..7} |
279 |
- do |
280 |
- cp ${clst_sharedir}/livecd/files/x86-F$i.msg \ |
281 |
- $1/isolinux/F$i.msg |
282 |
- done |
283 |
- |
284 |
- for x in ${clst_boot_kernel} |
285 |
- do |
286 |
- eval custom_kopts=\$${x}_kernelopts |
287 |
- echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" |
288 |
- echo >> ${icfg} |
289 |
- |
290 |
- eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel" |
291 |
- |
292 |
- if [ -n "${clst_kernel_softlevel}" ] |
293 |
- then |
294 |
- for y in ${clst_kernel_softlevel} |
295 |
- do |
296 |
- echo "label ${x}-${y}" >> ${icfg} |
297 |
- echo " kernel /boot/${x}" >> ${icfg} |
298 |
- echo " append ${default_append_line[@]} softlevel=${y} initrd=/boot/${x}.igz vga=791" >> ${icfg} |
299 |
- |
300 |
- echo >> ${icfg} |
301 |
- echo " ${x}" >> ${kmsg} |
302 |
- echo "label ${x}-${y}-nofb" >> ${icfg} |
303 |
- echo " kernel /boot/${x}" >> ${icfg} |
304 |
- echo " append ${default_append_line[@]} softlevel=${y} initrd=/boot/${x}.igz" >> ${icfg} |
305 |
- echo >> ${icfg} |
306 |
- echo " ${x}-nofb" >> ${kmsg} |
307 |
- done |
308 |
- else |
309 |
- echo "label ${x}" >> ${icfg} |
310 |
- echo " kernel /boot/${x}" >> ${icfg} |
311 |
- echo " append ${default_append_line[@]} initrd=/boot/${x}.igz vga=791" >> ${icfg} |
312 |
- echo >> ${icfg} |
313 |
- echo " ${x}" >> ${kmsg} |
314 |
- echo "label ${x}-nofb" >> ${icfg} |
315 |
- echo " kernel /boot/${x}" >> ${icfg} |
316 |
- echo " append ${default_append_line[@]} initrd=/boot/${x}.igz" >> ${icfg} |
317 |
- echo >> ${icfg} |
318 |
- echo " ${x}-nofb" >> ${kmsg} |
319 |
- fi |
320 |
- done |
321 |
- |
322 |
- if [ -f $1/isolinux/memtest86 ] |
323 |
- then |
324 |
- echo >> $icfg |
325 |
- echo " memtest86" >> $kmsg |
326 |
- echo "label memtest86" >> $icfg |
327 |
- echo " kernel memtest86" >> $icfg |
328 |
- fi |
329 |
- echo >> $icfg |
330 |
- echo "label localhost" >> $icfg |
331 |
- echo " localboot -1" >> $icfg |
332 |
- echo " MENU HIDE" >> $icfg |
333 |
- fi |
334 |
- ;& |
335 |
- ia64|ppc*|powerpc*|sparc*) |
336 |
+ amd64|ia64|ppc*|powerpc*|sparc*|x86) |
337 |
kern_subdir=/boot |
338 |
iacfg=$1/boot/grub/grub.cfg |
339 |
mkdir -p $1/boot/grub |
340 |
diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh |
341 |
index ccfbf4ef..ac97ef56 100755 |
342 |
--- a/targets/support/create-iso.sh |
343 |
+++ b/targets/support/create-iso.sh |
344 |
@@ -184,7 +184,7 @@ case ${clst_hostarch} in |
345 |
# o= output image (burnable to CD; readable by fdisk) |
346 |
/usr/bin/sgibootcd c=${cfg} o=${clst_iso} |
347 |
;; |
348 |
- ia64|ppc*|powerpc*|sparc*) |
349 |
+ amd64|ia64|ppc*|powerpc*|sparc*|x86) |
350 |
isoroot_checksum |
351 |
|
352 |
case ${clst_hostarch} in |
353 |
@@ -194,71 +194,5 @@ case ${clst_hostarch} in |
354 |
echo ">> Running grub-mkrescue to create iso image...." |
355 |
grub-mkrescue ${extra_opts} -o "${1}" "${clst_target_path}" |
356 |
;; |
357 |
- x86|amd64) |
358 |
- # detect if an EFI bootloader is desired |
359 |
- if [ -d "${clst_target_path}/boot/efi" ] || \ |
360 |
- [ -d "${clst_target_path}/boot/EFI" ] || \ |
361 |
- [ -e "${clst_target_path}/gentoo.efimg" ] |
362 |
- then |
363 |
- if [ -e "${clst_target_path}/gentoo.efimg" ] |
364 |
- then |
365 |
- echo "Found prepared EFI boot image at \ |
366 |
- ${clst_target_path}/gentoo.efimg" |
367 |
- else |
368 |
- echo "Preparing EFI boot image" |
369 |
- if [ -d "${clst_target_path}/boot/efi" ] && [ ! -d "${clst_target_path}/boot/EFI" ]; then |
370 |
- echo "Moving /boot/efi to /boot/EFI" |
371 |
- mv "${clst_target_path}/boot/efi" "${clst_target_path}/boot/EFI" |
372 |
- fi |
373 |
- # prepare gentoo.efimg from clst_target_path /boot/EFI dir |
374 |
- iaSizeTemp=$(du -sk --apparent-size "${clst_target_path}/boot/EFI" 2>/dev/null) |
375 |
- iaSizeB=$(echo ${iaSizeTemp} | cut '-d ' -f1) |
376 |
- iaSize=$((${iaSizeB}+64)) # add slack, tested near minimum for overhead |
377 |
- echo "Creating loopback file of size ${iaSize}kB" |
378 |
- dd if=/dev/zero of="${clst_target_path}/gentoo.efimg" bs=1k \ |
379 |
- count=${iaSize} |
380 |
- echo "Formatting loopback file with FAT16 FS" |
381 |
- mkfs.vfat -F 16 -n GENTOOLIVE "${clst_target_path}/gentoo.efimg" |
382 |
- |
383 |
- mkdir "${clst_target_path}/gentoo.efimg.mountPoint" |
384 |
- echo "Mounting FAT16 loopback file" |
385 |
- mount -t vfat -o loop "${clst_target_path}/gentoo.efimg" \ |
386 |
- "${clst_target_path}/gentoo.efimg.mountPoint" || die "Failed to mount EFI image file" |
387 |
- |
388 |
- echo "Populating EFI image file from ${clst_target_path}/boot/EFI" |
389 |
- cp -rv "${clst_target_path}"/boot/EFI/ \ |
390 |
- "${clst_target_path}/gentoo.efimg.mountPoint" || die "Failed to populate EFI image file" |
391 |
- |
392 |
- umount "${clst_target_path}/gentoo.efimg.mountPoint" |
393 |
- rmdir "${clst_target_path}/gentoo.efimg.mountPoint" |
394 |
- |
395 |
- echo "Copying /boot/EFI to /EFI for rufus compatability" |
396 |
- cp -rv "${clst_target_path}"/boot/EFI/ "${clst_target_path}" |
397 |
- fi |
398 |
- fi |
399 |
- |
400 |
- if [ -e "${clst_target_path}/isolinux/isolinux.bin" ]; then |
401 |
- echo '** Found ISOLINUX bootloader' |
402 |
- if [ -e "${clst_target_path}/gentoo.efimg" ]; then |
403 |
- # have BIOS isolinux, plus an EFI loader image |
404 |
- echo '** Found GRUB2 EFI bootloader' |
405 |
- echo 'Creating ISO using both ISOLINUX and EFI bootloader' |
406 |
- run_mkisofs -J -R -l -V "${clst_iso_volume_id}" -o "${1}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -eltorito-platform efi -b gentoo.efimg -no-emul-boot -z "${clst_target_path}"/ |
407 |
- isohybrid --uefi "${1}" |
408 |
- else |
409 |
- echo 'Creating ISO using ISOLINUX bootloader' |
410 |
- run_mkisofs -J -R -l -V "${clst_iso_volume_id}" -o "${1}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${clst_target_path}"/ |
411 |
- isohybrid "${1}" |
412 |
- fi |
413 |
- elif [ -e "${clst_target_path}/gentoo.efimg" ]; then |
414 |
- echo '** Found GRUB2 EFI bootloader' |
415 |
- echo 'Creating ISO using EFI bootloader' |
416 |
- run_mkisofs -J -R -l -V "${clst_iso_volume_id}" -o "${1}" -b gentoo.efimg -c boot.cat -no-emul-boot "${clst_target_path}"/ |
417 |
- else |
418 |
- echo '** Found no known bootloader' |
419 |
- echo 'Creating ISO with fingers crossed that you know what you are doing...' |
420 |
- run_mkisofs -J -R -l -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/ |
421 |
- fi |
422 |
- ;; |
423 |
esac |
424 |
exit $? |
425 |
diff --git a/targets/support/functions.sh b/targets/support/functions.sh |
426 |
index dd9e6b12..d1252369 100755 |
427 |
--- a/targets/support/functions.sh |
428 |
+++ b/targets/support/functions.sh |
429 |
@@ -43,75 +43,6 @@ extract_cdtar() { |
430 |
tar -I lbzip2 -xpf ${clst_cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}" |
431 |
} |
432 |
|
433 |
-create_bootloader() { |
434 |
- # For amd64 and x86 we attempt to copy boot loader files from the live system and configure it right |
435 |
- # this prevents (among other issues) needing to keep a cdtar up to date. All files are thrown into $clst_target_path |
436 |
- # Future improvement may make bootloaders optional, but for now there is only one option |
437 |
- if [ -x "/usr/bin/grub2-mkstandalone" ]; then |
438 |
- grubmkstndaln="/usr/bin/grub2-mkstandalone" |
439 |
- elif [ -x "/usr/bin/grub-mkstandalone" ]; then |
440 |
- grubmkstndaln="/usr/bin/grub-mkstandalone" |
441 |
- else |
442 |
- die "Unable to find grub-mkstandalone" |
443 |
- fi |
444 |
- |
445 |
- pushd "${1}" || die "Failed to enter livecd dir ${1}" |
446 |
- |
447 |
- # while $1/grub is unused here, it triggers grub config building in bootloader-setup.sh |
448 |
- mkdir -p boot/EFI/BOOT isolinux |
449 |
- #create boot.msg for isolinux |
450 |
- echo "Gentoo Linux Installation LiveCD http://www.gentoo.org/" > isolinux/boot.msg |
451 |
- echo "Enter to boot; F1 for kernels F2 for options." >> isolinux/boot.msg |
452 |
- echo "Press any key in the next 15 seconds or we'll try to boot from disk." >> isolinux/boot.msg |
453 |
- #install isolinux files |
454 |
- if [ -f /usr/share/syslinux/isolinux.bin ]; then |
455 |
- cp /usr/share/syslinux/isolinux.bin isolinux/ |
456 |
- #isolinux support files |
457 |
- for i in libcom32.c32 libutil.c32 ldlinux.c32 reboot.c32 vesamenu.c32; do |
458 |
- if [ -f "/usr/share/syslinux/${i}" ]; then |
459 |
- cp "/usr/share/syslinux/${i}" isolinux/ |
460 |
- fi |
461 |
- done |
462 |
- #isolinux hardware detection toolkit, useful for system info and debugging |
463 |
- if [ -f "/usr/share/syslinux/hdt.c32" ]; then |
464 |
- cp /usr/share/syslinux/hdt.c32 isolinux/ |
465 |
- if [ -f "/usr/share/misc/pci.ids" ]; then |
466 |
- cp /usr/share/misc/pci.ids isolinux/ |
467 |
- fi |
468 |
- fi |
469 |
- #memtest goes under isolinux since it doesn't work for uefi right now |
470 |
- if [ -f /usr/share/memtest86+/memtest ]; then |
471 |
- cp /usr/share/memtest86+/memtest.bin isolinux/memtest86 |
472 |
- else |
473 |
- echo "Missing /usr/share/memtest86+/memtest.bin, this livecd will not have memtest86+ support. Enable USE=system-bootloader on catalyst to pull in the correct deps" |
474 |
- fi |
475 |
- else |
476 |
- echo "Missing /usr/share/syslinux/isolinux.bin, this livecd will not bios boot. Enable USE=system-bootloader on catalyst to pull in the correct deps" |
477 |
- fi |
478 |
- |
479 |
- #create grub-stub.cfg for embedding in grub-mkstandalone |
480 |
- echo "insmod part_gpt" > grub-stub.cfg |
481 |
- echo "insmod part_msdos" >> grub-stub.cfg |
482 |
- echo "search --no-floppy --set=root --file /livecd" >> grub-stub.cfg |
483 |
- echo "configfile /boot/grub/grub.cfg" >> grub-stub.cfg |
484 |
- |
485 |
- # some 64 bit machines have 32 bit UEFI, and you might want to boot 32 bit on a 64 bit machine, so we take the safest path and include both |
486 |
- # set up 32 bit uefi |
487 |
- ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O i386-efi -o ./boot/EFI/BOOT/grubia32.efi --themes= || die "Failed to make grubia32.efi" |
488 |
- #secure boot shim |
489 |
- cp /usr/share/shim/BOOTIA32.EFI boot/EFI/BOOT/ |
490 |
- cp /usr/share/shim/mmia32.efi boot/EFI/BOOT/ |
491 |
- |
492 |
- #set up 64 bit uefi |
493 |
- ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O x86_64-efi -o ./boot/EFI/BOOT/grubx64.efi --themes= || die "Failed to make grubx64.efi" |
494 |
- #secure boot shim |
495 |
- cp /usr/share/shim/BOOTX64.EFI boot/EFI/BOOT/ |
496 |
- cp /usr/share/shim/mmx64.efi boot/EFI/BOOT/ |
497 |
- |
498 |
- rm grub-stub.cfg || echo "Failed to remove grub-stub.cfg, but this hurts nothing" |
499 |
- popd || die "Failed to leave livecd dir" |
500 |
-} |
501 |
- |
502 |
extract_kernels() { |
503 |
# extract multiple kernels |
504 |
# $1 = Destination |
505 |
-- |
506 |
2.26.2 |