#!/bin/rc -e
# mkboot - prepare disk for booting(8)
fn usage {
echo >[1=2] usage: mkboot disk
exit usage
}
if (~ $#* 0)
usage
disk/mbr $1/data # keep fdisk happy
{
echo a p1 . '$'
echo t p1 FAT32LBA
echo A p1
echo w
} | disk/fdisk -b $1/data >/dev/null >[2=1]
disk/format -d -c 32 -l boot $1/dos README dos/*
exit ''
|