This Sheet describes the procedure I used to move my company's FreeBSD system to a larger hard drive.
# ATA and ATAPI devices device ata0 at isa? port IO_WD1 irq 14 device ata1 at isa? port IO_WD2 irq 15 device ata device atadisk # ATA disk drives
ok boot -s
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# /stand/sysinstall
ad1s1a /mnt 512MB as UFS
ad1s1b swap 512MB as swap
ad1s1e /mnt/usr remaining as UFS
Note: To get partition 'a', tell Disklabel Editor the mount point is '/', then change it to '/mnt' using the 'M' option.
Choose 'W' to write changes to disk, then choose 'Q' to continue.
# mount /dev/ad1s1a /mnt
# mount /dev/ad1s1e /mnt/usr
# tar clf - -C / -X /mnt . | tar xpvf - -C /mnt
# tar clf - -C /usr . | tar xpvf - -C /mnt/usr
ok boot -s
# tunefs -n enable /usr
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# mount
/dev/wd0s1a on / (ufs, local, writes: sync 8 async 204)
/dev/wd0s1e on /usr (ufs, local, soft-updates, writes: sync 366 async 13493)
procfs on /proc (procfs, local)