summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-04-29 17:05:27 +0200
committerSebastian Schmelzer2011-04-29 17:05:27 +0200
commit9cda98276e7215efe84615dd546d9d60207a9a1b (patch)
tree0ac2759fcccb12621593c1b8c8e28d14ce99ec8f
parentminor fixes .. (diff)
downloadusb-boot-stick-9cda98276e7215efe84615dd546d9d60207a9a1b.tar.gz
usb-boot-stick-9cda98276e7215efe84615dd546d9d60207a9a1b.tar.xz
usb-boot-stick-9cda98276e7215efe84615dd546d9d60207a9a1b.zip
switch from extlinux back to syslinux
create usb-sticks with extra ext partition 0..96 vfat 97..END ext2 (for home or similar)
-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
+