Transferring a FreeBSD on new hard drive [Manual]



Follow this steps to transfer FreeBSD on new hard drive of any size.

Apply here payday loans

  • Connect the new hard disk in the system with a FreeBSD (/dev/ad1s1)
  • Split the new drive into sections like old one using /stand/sysinstall. Size /dev/ad1s1a may be greater than /dev/ad0s1a.
  • Create a temporary folder and subfolders:
    mkdir /backup
    mkdir /backup/root
    mkdir /backup/usr
    mkdir /backup/var
    mkdir /backup/tmp
  • Boot up with single user
  • Mount partitions:
    mount /dev/ad1s1a/backup/root
    mount /dev/ad1s1e/backup/var
    mount /dev/ad1s1f/backup/usr
    (here specify your own)
  • Transfer system:
    ( dump -0f - / ) | ( cd /backup/root ; restore -rf - )
    ( dump -0f - /var ) | ( cd /backup/var ; restore -rf - )
    ( dump -0f - /usr ) | ( cd /backup/usr ; restore -rf - )
  • Unmount
     umount /backup/root
    umount /backup/var
    umount /backup/usr
  • Turn on Soft Updates
    tunefs -n enable /dev/ad1s1a
    tunefs -n enable /dev/ad1s1e
    tunefs -n enable /dev/ad1s1f

Now you can remove from old hard drive and replace it with new one.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>