summaryrefslogtreecommitdiff
path: root/sys/src/9/boot
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-02-14 01:42:32 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-02-14 01:42:32 +0100
commitecebba779f8cb55dadac70ef1c109e9e69c63423 (patch)
treef003eabc02cfe1f67b6069f946f2d0741607520a /sys/src/9/boot
parent24150b117110e982496b10c2f1dfef329160a36a (diff)
provide /n and /mnt early in bootrc to allow consistent use in /lib/namespace
theres a bootstrap problem: when /bin/init is run, it processes /lib/namespace where we might want to mount or bind resources to /n or /mnt. but mntgen was run later in cpurc/termrc so these mounts would be ignored. we already have mntgen in bootfs, so we can provide these mountpoints early. i keep the termrc/cpurc mntgens where they are, but ignore the error prints. this way old kernels will continue to work.
Diffstat (limited to 'sys/src/9/boot')
-rw-r--r--sys/src/9/boot/bootfs.proto1
-rwxr-xr-xsys/src/9/boot/bootrc8
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/src/9/boot/bootfs.proto b/sys/src/9/boot/bootfs.proto
index 02ca92979..6b1366b37 100644
--- a/sys/src/9/boot/bootfs.proto
+++ b/sys/src/9/boot/bootfs.proto
@@ -10,6 +10,7 @@ $objtype
bind
cat
cfs
+ chmod
cryptsetup
dd
disk
diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc
index 09cbd4b79..b8c96cc17 100755
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -1,6 +1,10 @@
#!/bin/rc
-mntgen -s slash /mnt
+# mount points
+mntgen -s slashn /n && chmod 666 /srv/slashn
+mntgen -s slashmnt /mnt && chmod 666 /srv/slashmnt
+mntgen -s mntexport /mnt/exportfs && chmod 666 /srv/mntexport
+
bind /root /mnt/broot
unmount /root
@@ -229,5 +233,5 @@ while(){
# cleanup so it can be restarted
nobootprompt=()
- rm -f /srv/^(cfs boot slashn cs dns)
+ rm -f /srv/^(cfs boot cs dns)
} </dev/cons