summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-09-22 04:48:39 +0000
committerimp <imp@FreeBSD.org>2010-09-22 04:48:39 +0000
commit0615d5c148188004b5a4ddd993e90a2e73615dce (patch)
tree09a8a1357cc6c3b4328d849929c49c487b8ab556 /tools
parentf11ed3a236abe9ee07151a89324bc2e344d38117 (diff)
downloadFreeBSD-src-0615d5c148188004b5a4ddd993e90a2e73615dce.zip
FreeBSD-src-0615d5c148188004b5a4ddd993e90a2e73615dce.tar.gz
Make the labels match the device name that's mounted, not just the
slice they are on. When NANO_LABEL is not defined, the fstab generates entries that specify /dev/ad0s1a. When NANO_LABEL is defined, it generates /dev/usb/${NANO_LABEL}s1a. The prior code created the file system with a label of ${NANO_LABEL}s1, leading to problems on boot. Pointy hat to: imp@
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/nanobsd/nanobsd.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index 6aea919..b7fc9fd 100644
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -501,7 +501,7 @@ create_i386_diskimage ( ) (
bsdlabel ${MD}s1
# Create first image
- populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1"
+ populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1a"
mount /dev/${MD}s1a ${MNT}
echo "Generating mtree..."
( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree
@@ -518,8 +518,10 @@ create_i386_diskimage ( ) (
sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f
done
umount ${MNT}
+ # Override the label from the first partition so we
+ # don't confuse glabel with duplicates.
if [ ! -z ${NANO_LABEL} ]; then
- tunefs -L ${NANO_LABEL}"s2" /dev/${MD}s2a
+ tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a
fi
fi
OpenPOWER on IntegriCloud