From 394491685696699a27db00505c9e562c43e0b7f3 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Sat, 1 Sep 2007 17:59:00 +0000 Subject: [PATCH] Support for mounting pseudo-felisystems during stage1 Don't ignore fsType field, don't add /mnt/root to device names not starting with '/'. svn path=/nixos/trunk/; revision=9232 --- boot/boot-stage-1-init.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index 3b1d4d6a9fa..e2171dc3a71 100644 --- a/boot/boot-stage-1-init.sh +++ b/boot/boot-stage-1-init.sh @@ -88,6 +88,7 @@ mountFS() { local device="$1" local mountPoint="$2" local options="$3" + local fsType="$4" # Check the root device, if . mustCheck= @@ -124,7 +125,7 @@ mountFS() { fi # Mount read-writable. - mount -n -o "$options" "$device" /mnt/root$mountPoint || fail + mount -n -t "$fsType" -o "$options" "$device" /mnt/root$mountPoint || fail } @@ -185,21 +186,21 @@ else # !!! Really quick hack to support bind mounts, i.e., where # the "device" should be taken relative to /mnt/root, not /. - # Assume that every device that doesn't start with /dev or - # LABEL= is a bind mount. + # Assume that every device that start with / but doesn't + # start with /dev or LABEL= is a bind mount. case $device in /dev/*) ;; LABEL=*) ;; - *) + /*) device=/mnt/root$device ;; esac echo "mounting $device on $mountPoint..." - mountFS "$device" "$mountPoint" "$options" + mountFS "$device" "$mountPoint" "$options" "$fsType" done fi