. $config
. kernel/kernel-version
askyes "bootsystem" "Extract original bootsystem files?"

bootfloppymnt=/tmp/bootfloppy
initrdmnt=/tmp/initrd

mkdir -p $bootfloppymnt || true
mount -o loop -t vfat $newisodir/KNOPPIX/boot.img $bootfloppymnt
mkdir -p bootsystem/bootfloppy || true
cp $bootfloppymnt/* bootsystem/bootfloppy/
umount $bootfloppymnt

gunzip -c bootsystem/bootfloppy/miniroot.gz > bootsystem/miniroot
rm bootsystem/bootfloppy/miniroot.gz bootsystem/bootfloppy/vmlinuz \
   bootsystem/bootfloppy/ldlinux.sys || true

mkdir -p $initrdmnt || true
mount -o loop bootsystem/miniroot $initrdmnt
mkdir -p bootsystem/miniroot.d || true
cp -a $initrdmnt/* bootsystem/miniroot.d/
umount $initrdmnt
