Plan 9 from Bell Labs’s /usr/web/sources/plan9/rc/bin/pc/setup.9fat

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


#!/bin/rc

rfork e
if(! ~ $#* 2) {
	echo 'usage: setup.9fat /dev/sdC0/9fat plan9.ini' >[1=2]
	exit usage
}

. /rc/bin/pc/defs
fat=$1
ini=$2
if(! test -f  $fat) {
	echo fat partition not found >[1=2]
	exit fat
}
if(! test -f $ini) {
	echo plan9.ini not found >[1=2]
	exit ini
}

if(pc/isfat $fat) {
	echo 'Already a FAT partition in '^$fat^'; ream it?'
	prompt 'ream 9fat' y n
	switch($rd) {
	case n
		exit
	}
}

disk/format -r 2 -d -b /386/pbs $fat /386/9load /386/9pcdisk
mount -c /srv/dos /n/9fat $fat
cp $ini /n/9fat/plan9.ini
unmount /n/9fat

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].