Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/rc/mkboot

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc -e
# mkboot - prepare disk for booting(8)

fn usage {
	echo >[1=2] usage: mkboot disk
	exit usage
}

if (~ $#* 0)
	usage

disk/mbr -m /386/mbr $1/data
disk/fdisk -bw -a $1/data
disk/prep -bw -a^(9fat nvram) $1/plan9
kernel=`{awk -F! '/^bootfile=/{print $NF}' 9fat/plan9.ini}
disk/format -b /386/pbslba -d -r 2 $1/9fat \
	/386/9load /386/$kernel 9fat/*
exit ''

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.