Date: Wed, 22 Sep 2010 04:48:39 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212990 - head/tools/tools/nanobsd Message-ID: <201009220448.o8M4mdXs016738@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Sep 22 04:48:39 2010 New Revision: 212990 URL: http://svn.freebsd.org/changeset/base/212990 Log: 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@ Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Wed Sep 22 02:26:07 2010 (r212989) +++ head/tools/tools/nanobsd/nanobsd.sh Wed Sep 22 04:48:39 2010 (r212990) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009220448.o8M4mdXs016738>