ref: 77cb5f5243655da44542025395a2429bddb4dc7e
parent: 2f8b5074ebe0fff8e35f9e83996d1ae2c0b74622
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 5 13:02:37 EDT 2019
bootrc: fix $rootdir and $rootspec handling (thanks lucio) we did not interpret the $rootdir and $rootspec environment variables right. $rootdir is what gets bound to / (usually /root) and $rootspec is the mountspec of /root.
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -130,7 +130,7 @@
# mount root filesystem
if(~ $#rootdir 0)
rootdir=/root
- must mount -c /srv/boot $rootdir
+ must mount -c '#s/boot' /root $rootspec
# compile init command
if(~ $#init 0){@@ -151,7 +151,7 @@
# create the name space, mount the root fs
/mnt/broot/$cputype/bin/bind / /
- /mnt/broot/$cputype/bin/mount -ac '#s/boot' /
+ /mnt/broot/$cputype/bin/bind -ac $rootdir /
# remove the remaining temporary root
/mnt/broot/$cputype/bin/unmount /mnt/broot
--
⑨