shithub: misc

ref: 001e60ea4b45fec9cb40ab8fbbebc334b4d3e9f4
dir: /9legacy/bootusb.rc/

View raw version
#!/boot/rc -m /boot/rcmain

/boot/echo -n boot...
/boot/bind -ac '#e' /env
path=(/bin /boot)

bind '#p' /proc
bind '#d' /fd
bind -a '#P' /dev
bind -a '#t' /dev
bind -a '#S' /dev
echo -n adr >/dev/hostowner

usbd
bind -a '#I' /net

# Loopback initialization from /sys/src/9/boot/local.c
<>/net/ipifc/clone{
	echo -n bind loopback >[1=0]
	echo -n add 127.0.0.1 255.255.255.255 >[1=0]
}
partfs /dev/sdU0.0/data
fdisk -p /dev/sdXX/data >/dev/sdXX/ctl
prep -p /dev/sdXX/plan9 >/dev/sdXX/ctl
echo venti $venti
venti -m 10 -c /dev/sdXX/arenas0 -a tcp!127.1!17034
fossil -m 10 -f /dev/sdXX/fossil -c 'srv -AWP boot' 
rootdir=/root
rootspec=''
mount -c /srv/boot /root
bind -ac $rootdir /
bind -ac $rootdir/mnt /mnt

echo starting factotum
factotum -s factotum

bind /$cputype/bin /bin
bind -a /rc/bin /bin
path=(. /bin)
/$cputype/init -t
cd /usr/$user

################
if (! ~ $#init 0)
	exec `{echo $init}
if (~ $service cpu)
	exec /$cputype/init -c
if not
	exec /$cputype/init -t
exec /boot/rc -m/boot/rcmain -i