summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall-usb29
1 files changed, 25 insertions, 4 deletions
diff --git a/install-usb b/install-usb
index 90c7815..6b8a25f 100755
--- a/install-usb
+++ b/install-usb
@@ -23,15 +23,31 @@ for i in 1 2 3 4 5 6 7 8 9; do
umount /dev/${OUT_DEV}$i &> /dev/null
done
-cat $SYSLINUX/mbr/mbr.bin > /dev/${OUT_DEV}
-mkfs.ext2 -L openslx-stick /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=$SYSLINUX/mbr/mbr.bin of=/dev/${OUT_DEV}
+
+# create filesystems on newly createt partitions
+mkfs.vfat -F 16 -n openslx-stick /dev/${OUT_DEV}1
+mkfs.ext2 -L openslx-usrhome /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
-$SYSLINUX/extlinux/extlinux -i /media/openslx-stick/boot
[ ! -f $ROOT_DIR/build/kernel-preboot-latest ] && build.kernel.sh
cp -v $ROOT_DIR/build/kernel-preboot-latest /media/openslx-stick/boot/kernel
@@ -44,6 +60,11 @@ cp -v $SYSLINUX/com32/menu/menu.c32 /media/openslx-stick/boot/
cp -v $SYSLINUX/com32/menu/vesamenu.c32 /media/openslx-stick/boot/
cp -v $ROOT_DIR/config/extlinux/* /media/openslx-stick/boot
+mv /media/openslx-stick/boot/extlinux.conf /media/openslx-stick/boot/syslinux.cfg
sync
umount /media/openslx-stick
+umount /media/openslx-stick-usrhome
+
+$SYSLINUX/linux/syslinux --install -d /boot -f /dev/${OUT_DEV}1
+