- Timestamp:
- Oct 4, 2015, 10:02:22 PM (9 years ago)
- Location:
- branches/releng-10/nanobsd/files/tools
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-10/nanobsd/files/tools/updatep1
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}s1 bs=1m count=1 > /dev/null 2>&148 dd if=/dev/zero of=/dev/${GEOM_DRIVE}s1 bs=1m count=1 > /dev/null 2>&1 47 49 48 50 # Copy in new system 49 dd of=/dev/${ NANO_DRIVE}s1 obs=64k51 dd of=/dev/${GEOM_DRIVE}s1 obs=64k 50 52 51 53 # Check that it worked 52 fsck_ffs -n /dev/${ NANO_DRIVE}s1a54 fsck_ffs -n /dev/${GEOM_DRIVE}s1a 53 55 54 gpart set -a active -i 1 ${ NANO_DRIVE}56 gpart set -a active -i 1 ${GEOM_DRIVE} 55 57 -
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.