Commit 8926238fea6df85f8e5157f20586f10fbc43f932

Authored by Silvan Calarco
1 parent 1c48a36346
Exists in master

livecd: add dual kernel installation support

Showing 1 changed file with 67 additions and 31 deletions Side-by-side Diff

platforms/livecd/post.inc.sh
... ... @@ -7,20 +7,24 @@
7 7  
8 8 [ -e $MOUNTDIR2/boot/isolinux ] || mkdir -p $MOUNTDIR2/boot/isolinux
9 9  
10   -chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${KERNEL_EXTRAVER}
  10 +ISOID=
  11 +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
  12 + chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${K}
  13 + LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \
  14 + --filesystems "ext3 ext4 unionfs squashfs isofs reiserfs reiser4" \
  15 + --nomdadmconf --nolvmconf \
  16 + /boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
  17 + ${KERNEL_MAJVER}${K}
11 18  
12   -LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \
13   - --filesystems "ext3 ext4 unionfs squashfs isofs reiserfs reiser4" \
14   - --nomdadmconf --nolvmconf \
15   - /boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \
16   - ${KERNEL_MAJVER}${KERNEL_EXTRAVER}
  19 + # Note: isolinux requires 8.3 filenames
  20 + cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img.gz \
  21 + $MOUNTDIR2/boot/initrd${ISOID}.gz
17 22  
18   -# Note: isolinux requires 8.3 filenames
19   -cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \
20   - $MOUNTDIR2/boot/initrmfs.gz
  23 + cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${K} \
  24 + $MOUNTDIR2/boot/vmlinuz${ISOID}
21 25  
22   -cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER} \
23   - $MOUNTDIR2/boot/vmlinuz
  26 + ISOID=$(($ISOID + 1))
  27 +done
24 28  
25 29 # add buildinfo
26 30 buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}"
27 31  
28 32  
... ... @@ -30,26 +34,58 @@
30 34 PROMPT 0
31 35 TIMEOUT 20
32 36 DEFAULT vesamenu.c32
33   -MENU TITLE ${buildinfo} (${KERNEL_MAJVER}${KERNEL_EXTRAVER} kernel)
  37 +MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
34 38 MENU BACKGROUND openmamba.png
35 39 MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std
  40 +_EOF
36 41  
37   -LABEL kms
38   -MENU LABEL default
39   - kernel /boot/vmlinuz
40   - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792
41   -LABEL vga1024
42   -MENU LABEL VGA 1024x768 (no modeset)
43   - kernel /boot/vmlinuz
44   - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset
45   -LABEL vga800
46   -MENU LABEL VGA 800x600 (no modeset)
47   - kernel /boot/vmlinuz
48   - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset
49   -LABEL debug
50   -MENU LABEL Debug mode
51   - kernel /boot/vmlinuz
52   - append initrd=/boot/initrmfs.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug rdshell
  42 +ISOID=
  43 +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
  44 + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
  45 +LABEL default-${KERNEL_MAJVER}${K}
  46 +MENU LABEL default (${KERNEL_MAJVER}${K})
  47 + kernel /boot/vmlinuz${ISOID}
  48 + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792
  49 +_EOF
  50 + ISOID=$(($ISOID + 1))
  51 +done
  52 +
  53 +echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg
  54 +ISOID=
  55 +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
  56 + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
  57 +LABEL vga800-${KERNEL_MAJVER}${K}
  58 +MENU LABEL VGA 800x600 no modeset (${KERNEL_MAJVER}${K})
  59 + kernel /boot/vmlinuz${ISOID}
  60 + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset
  61 +_EOF
  62 + ISOID=$(($ISOID + 1))
  63 +done
  64 +
  65 +ISOID=
  66 +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
  67 + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
  68 +LABEL vga1024-${KERNEL_MAJVER}${K}
  69 +MENU LABEL VGA 1024x768 no modeset (${KERNEL_MAJVER}${K})
  70 + kernel /boot/vmlinuz${ISOID}
  71 + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset
  72 +_EOF
  73 + ISOID=$(($ISOID + 1))
  74 +done
  75 +
  76 +echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg
  77 +ISOID=
  78 +for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
  79 + cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
  80 +LABEL debug-${KERNEL_MAJVER}${K}
  81 +MENU LABEL Debug mode (${KERNEL_MAJVER}${K})
  82 + kernel /boot/vmlinuz${ISOID}
  83 + append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug nomodeset
  84 +_EOF
  85 + ISOID=$(($ISOID + 1))
  86 +done
  87 +
  88 +cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
53 89 MENU SEPARATOR
54 90 LABEL memtest
55 91 MENU LABEL Memory test