diff options
author | Sebastian Schmelzer | 2011-04-29 17:33:19 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2011-04-29 17:33:19 +0200 |
commit | eda8d2205ff5b545f9aa087898f23f9a573bafdc (patch) | |
tree | fca4ad236ec785c7b28845c3faee139c9629e047 | |
parent | switch from extlinux back to syslinux (diff) | |
download | usb-boot-stick-eda8d2205ff5b545f9aa087898f23f9a573bafdc.tar.gz usb-boot-stick-eda8d2205ff5b545f9aa087898f23f9a573bafdc.tar.xz usb-boot-stick-eda8d2205ff5b545f9aa087898f23f9a573bafdc.zip |
update create installer script to use syslinux as well ..
-rwxr-xr-x | create-installer | 3 | ||||
-rwxr-xr-x | installer/tpl/installer.tpl.sh | 29 |
2 files changed, 26 insertions, 6 deletions
diff --git a/create-installer b/create-installer index 7f0bdbd..ddec96d 100755 --- a/create-installer +++ b/create-installer @@ -24,7 +24,7 @@ mkdir -p $ROOT_DIR/installer/tmp/share \ $ROOT_DIR/installer/tmp/boot cp -f $SYSLINUX/mbr/mbr.bin $ROOT_DIR/installer/tmp/share -cp -f $SYSLINUX/extlinux/extlinux -i $ROOT_DIR/installer/tmp/bin +cp -f $SYSLINUX/linux/syslinux $ROOT_DIR/installer/tmp/bin [ ! -f $ROOT_DIR/build/kernel-preboot-latest ] && build.kernel.sh cp -f $ROOT_DIR/build/kernel-preboot-latest $ROOT_DIR/installer/tmp/boot/kernel @@ -35,6 +35,7 @@ cp -f $ROOT_DIR/build/initramfs-default $ROOT_DIR/installer/tmp/boot/init cp -f $SYSLINUX/com32/menu/menu.c32 $ROOT_DIR/installer/tmp/boot/ cp -f $SYSLINUX/com32/menu/vesamenu.c32 $ROOT_DIR/installer/tmp/boot/ cp -f $ROOT_DIR/config/extlinux/* $ROOT_DIR/installer/tmp/boot/ +mv $ROOT_DIR/installer/tmp/boot/extlinux.conf $ROOT_DIR/installer/tmp/boot/syslinux.cfg cd $ROOT_DIR/installer/tmp/ tar cjf ../stick-payload.tar.bz2 * diff --git a/installer/tpl/installer.tpl.sh b/installer/tpl/installer.tpl.sh index f87aceb..9777fc1 100755 --- a/installer/tpl/installer.tpl.sh +++ b/installer/tpl/installer.tpl.sh @@ -31,18 +31,37 @@ for i in 1 2 3 4 5 6 7 8 9; do umount /dev/${OUT_DEV}$i &> /dev/null done -cat $TMP_DIR/share/mbr.bin > /dev/${OUT_DEV} -mkfs.ext2 /dev/${OUT_DEV}1 +# create bootable vfat partition with 96cylinders and a ext3 partition for the +# rest of the stick +sfdisk /dev/${OUT_DEV} << EOF +,96,6,* +,,L +EOF + +sync + +# copy mbr to stick +dd bs=440 count=1 conv=notrunc if=$TMP_DIR/share/mbr.bin of=/dev/${OUT_DEV} + +# create filesystems on newly createt partitions +mkfs.vfat -F 16 -n PBStick /dev/${OUT_DEV}1 +mkfs.ext2 -L OpenSLX-Home /dev/${OUT_DEV}2 + +mkdir -p /media/openslx-stick /media/openslx-stick-usrhome + +sync -mkdir -p /media/openslx-stick mount /dev/${OUT_DEV}1 /media/openslx-stick +mount /dev/${OUT_DEV}2 /media/openslx-stick-usrhome mkdir -p /media/openslx-stick/boot -$TMP_DIR/bin/extlinux -i /media/openslx-stick/boot - cp -v $TMP_DIR/boot/* /media/openslx-stick/boot/ sync umount /media/openslx-stick +umount /media/openslx-stick-usrhome + +$TMP_DIR/bin/syslinux --install -d /boot -f /dev/${OUT_DEV}1 + exit 0 |