# 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 \ --filesystems "autofs4 ext3 ext4 overlay squashfs isofs reiserfs" \ --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 syslinux modules for f in ldlinux.c32 libcom32.c32 libutil.c32 libmenu.c32 menu.c32 vesamenu.c32; do cp $MOUNTDIR/usr/share/syslinux/$f $MOUNTDIR2/boot/isolinux/ done # 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 ] && cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR2/ MOUNTDIR=$MOUNTDIR2 produce_media exit 0