From 0615d5c148188004b5a4ddd993e90a2e73615dce Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 22 Sep 2010 04:48:39 +0000 Subject: 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@ --- tools/tools/nanobsd/nanobsd.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') 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 -- cgit v1.1