summaryrefslogtreecommitdiffstats
path: root/release/amd64
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-01-12 02:12:40 +0000
committergjb <gjb@FreeBSD.org>2016-01-12 02:12:40 +0000
commit5d3275e0a0985a086d790dfa9e3d01edadeefaeb (patch)
tree6f70b28fa02b8b0a38601bbb2417c72e15314c50 /release/amd64
parent8a453508e4db45cdad89f5efdf3e273515d16fa6 (diff)
downloadFreeBSD-src-5d3275e0a0985a086d790dfa9e3d01edadeefaeb.zip
FreeBSD-src-5d3275e0a0985a086d790dfa9e3d01edadeefaeb.tar.gz
MFC r293188:
Prevent memstick installation medium from attempting to mount the root filesystem read-write. This causes problems booting the memstick installation medium from write-protected USB flash drives. PR: 187161, 205886 Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/amd64')
-rwxr-xr-xrelease/amd64/make-memstick.sh2
-rwxr-xr-xrelease/amd64/make-uefi-memstick.sh2
2 files changed, 4 insertions, 0 deletions
diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh
index e10b892..2dd8372 100755
--- a/release/amd64/make-memstick.sh
+++ b/release/amd64/make-memstick.sh
@@ -29,12 +29,14 @@ if [ -e ${2} ]; then
fi
echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
makefs -B little -o label=FreeBSD_Install ${2} ${1}
if [ $? -ne 0 ]; then
echo "makefs failed"
exit 1
fi
rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
unit=$(mdconfig -a -t vnode -f ${2})
if [ $? -ne 0 ]; then
diff --git a/release/amd64/make-uefi-memstick.sh b/release/amd64/make-uefi-memstick.sh
index 6c289e0..52e17cc 100755
--- a/release/amd64/make-uefi-memstick.sh
+++ b/release/amd64/make-uefi-memstick.sh
@@ -29,12 +29,14 @@ if [ -e ${2} ]; then
fi
echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab
+echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local
makefs -B little -o label=FreeBSD_Install ${2}.part ${1}
if [ $? -ne 0 ]; then
echo "makefs failed"
exit 1
fi
rm ${1}/etc/fstab
+rm ${1}/etc/rc.conf.local
mkimg -s gpt -b ${1}/boot/pmbr -p efi:=${1}/boot/boot1.efifat -p freebsd-boot:=${1}/boot/gptboot -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2}
rm ${2}.part
OpenPOWER on IntegriCloud