#! /bin/sh
-# mkcard.sh v0.4
+# mkcard.sh v0.5
# (c) Copyright 2009 Graeme Gregory <dp@xora.org.uk>
# Licensed under terms of GPLv2
#
echo ,,,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
+sleep 1
+
if [ -b ${DRIVE}1 ]; then
+ umount ${DRIVE}1
mkfs.vfat -F 32 -n "boot" ${DRIVE}1
else
if [ -b ${DRIVE}p1 ]; then
+ umount ${DRIVE}p1
mkfs.vfat -F 32 -n "boot" ${DRIVE}p1
else
echo "Cant find boot partition in /dev"
fi
if [ -b ${DRIVE}2 ]; then
+ umount ${DRIVE}2
mke2fs -j -L "rootfs" ${DRIVE}2
else
if [ -b ${DRIVE}p2 ]; then
+ umount ${DRIVE}p2
mke2fs -j -L "rootfs" ${DRIVE}p2
else
echo "Cant find rootfs partition in /dev"