Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/rc/mk_aoe_installer_iso

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


#!/bin/rc
 
fn cmds {
	if(! test -e /sys/lib/dist/bin/386/cdsh) {
		@{
			cd /sys/lib/dist/cmd
			mk install
			mk clean
		}
	}
	if(! test -e /sys/lib/dist/bin/386/multi) {
		@{
			cd /sys/lib/dist/cmd/multi 
			mk install
			mk scripts
			mk clean
		}
	}
}

fn boot {
	rm -rf boot
	mkdir boot
	
	bind /dev/null /sys/log/timesync
	# make files writable for now.
	cat /sys/lib/dist/pc/proto | sed 's!d000!d775!;s!000!664!;s!555!775!;s!444!664!' > proto.cp
	disk/mkfs -a proto.cp | disk/mkext -d boot
	cp /bin/ramfs boot/386/bin
	echo '/^$
s/^/\/386\/bin\/ramfs/
/#v
s/''#v''/''#v'' ''#æ''/
wq
' | ed boot/rc/bin/termrc
	echo '/tmp
s/^.+$/\/386\/bin\/ramfs/
wq
' | ed boot/usr/glenda/lib/profile
	@{
		cd boot/386
		strip init
		cd bin
		strip * */* >[2]/dev/null || status=''
	}
	rm proto.cp
}


fn bootdisk {
	dd -if /dev/zero -of floppy/bootdisk.img -bs 1474560 -count 1
	disk/format -b /386/pbs -df floppy/bootdisk.img /386/9load plan9.ini /386/9pcflop.gz
}

fn iso {
	test -e boot/bootdisk.img || bind -b floppy boot
	rm plan9inst.iso
	disk/mk9660 -9cj -v 'Plan 9 AOE Boot' -s boot -b bootdisk.img plan9inst.iso
}

cd /n/storm/home/plan9/inst
cmds
bind -a /sys/lib/dist/bin/386 /bin
boot
bootdisk
iso


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].