Changeset 13425 in hybrid for branches/releng-10/nanobsd/files/tools/updatep2
- Timestamp:
- Oct 4, 2015, 10:02:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-10/nanobsd/files/tools/updatep2
r13424 r13425 43 43 fi 44 44 45 . /tools/update.inc.sh 46 45 47 # Blow away old system. 46 dd if=/dev/zero of=/dev/${ NANO_DRIVE}s2 bs=1m count=1 > /dev/null 2>&148 dd if=/dev/zero of=/dev/${GEOM_DRIVE}s2 bs=1m count=1 > /dev/null 2>&1 47 49 48 50 # Copy in new system 49 dd of=/dev/${NANO_DRIVE}s2 obs=64k 51 dd of=/dev/${GEOM_DRIVE}s2 obs=64k 52 53 # Rebuild UFS label 54 if [ -n "${NANO_LABEL}" ]; then 55 tunefs -L ${NANO_LABEL}"s2a" /dev/${GEOM_DRIVE}s2a 56 fi 50 57 51 58 # Check that it worked 52 fsck_ffs -n /dev/${ NANO_DRIVE}s2a59 fsck_ffs -n /dev/${GEOM_DRIVE}s2a 53 60 54 61 # Update the /etc/fstab 55 62 trap "umount /mnt" 1 2 15 EXIT 56 mount /dev/${ NANO_DRIVE}s2a /mnt57 sed -i "" "s /${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/conf/base/etc/fstab58 sed -i "" "s /${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/etc/fstab63 mount /dev/${GEOM_DRIVE}s2a /mnt 64 sed -i "" "s+${NANO_DRIVE}s1+${NANO_DRIVE}s2+" /mnt/conf/base/etc/fstab 65 sed -i "" "s+${NANO_DRIVE}s1+${NANO_DRIVE}s2+" /mnt/etc/fstab 59 66 umount /mnt 60 67 trap 1 2 15 EXIT 61 68 62 gpart set -a active -i 2 ${ NANO_DRIVE}69 gpart set -a active -i 2 ${GEOM_DRIVE} 63 70
Note:
See TracChangeset
for help on using the changeset viewer.