2011-05-19 16:02:37 +02:00
|
|
|
# bootcd post script
|
|
|
|
#
|
|
|
|
# creates a fake installation aimed at producing a kernel image and initrd
|
|
|
|
# for booting flash and disk partitions
|
|
|
|
|
|
|
|
[ -e $MOUNTDIR2/boot/isolinux ] || mkdir -p $MOUNTDIR2/boot/isolinux
|
|
|
|
|
|
|
|
chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}${KERNEL_EXTRAVER}
|
|
|
|
|
|
|
|
# make initramfs
|
|
|
|
|
|
|
|
LANG=${LANGUAGE}_${COUNTRY} chroot $MOUNTDIR dracut \
|
2013-08-30 15:19:19 +02:00
|
|
|
--filesystems "autofs4 ext3 ext4 overlayfs squashfs isofs reiserfs" \
|
2011-05-19 16:02:37 +02:00
|
|
|
--nomdadmconf --nolvmconf \
|
|
|
|
/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \
|
|
|
|
${KERNEL_MAJVER}${KERNEL_EXTRAVER}
|
|
|
|
|
|
|
|
# Note: isolinux requires 8.3 filenames
|
|
|
|
cp $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img.gz \
|
|
|
|
$MOUNTDIR2/boot/initrmfs.gz
|
|
|
|
|
|
|
|
cp $MOUNTDIR/boot/vmlinuz-${KERNEL_MAJVER}${KERNEL_EXTRAVER} \
|
|
|
|
$MOUNTDIR2/boot/vmlinuz
|
|
|
|
|
|
|
|
# configure isolinux boot loader
|
|
|
|
cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
|
|
|
timeout 100
|
|
|
|
prompt 1
|
|
|
|
display menu.txt
|
|
|
|
F1 help.txt
|
|
|
|
F2 helpit.txt
|
|
|
|
default 1
|
|
|
|
label 1
|
|
|
|
kernel /boot/vmlinuz
|
|
|
|
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda1 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
|
|
|
|
label 2
|
|
|
|
kernel /boot/vmlinuz
|
|
|
|
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda2 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
|
|
|
|
label 3
|
|
|
|
kernel /boot/vmlinuz
|
|
|
|
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
|
|
|
|
label 4
|
|
|
|
kernel /boot/vmlinuz
|
|
|
|
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/hda1 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
|
|
|
|
label 8
|
|
|
|
kernel /boot/vmlinuz
|
|
|
|
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda1 console=tty1 initrd=/boot/initrmfs.gz debug=1 splash=verbose
|
|
|
|
label 9
|
|
|
|
kernel memtest
|
|
|
|
_EOF
|
|
|
|
|
|
|
|
# install isolinux binary
|
|
|
|
[ -e $MOUNTDIR/usr/share/syslinux/isolinux.bin ] && cp $MOUNTDIR/usr/share/syslinux/isolinux.bin $MOUNTDIR2/boot/isolinux/isolinux.bin ||
|
|
|
|
{ echo "Error: /usr/share/syslinux/isolinux.bin not found. Please install the syslinux package.";
|
|
|
|
exit 1; }
|
|
|
|
|
|
|
|
# install memtest
|
|
|
|
[ -e $MOUNTDIR/boot/memtest.bin ] && cp $MOUNTDIR/boot/memtest.bin $MOUNTDIR2/boot/isolinux/memtest ||
|
|
|
|
{ echo "Error: /boot/memtest.bin not found. Please install the memtest86 package.";
|
|
|
|
exit 1; }
|
|
|
|
|
|
|
|
# copy static files for specific platform
|
|
|
|
[ -e $TARGETDIR/platforms/$PLATFORM/root ] &&
|
2012-03-17 18:03:13 +01:00
|
|
|
cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR2/
|
2011-05-19 16:02:37 +02:00
|
|
|
|
|
|
|
MOUNTDIR=$MOUNTDIR2 produce_media
|
|
|
|
|
|
|
|
exit 0
|