# Swap PCs - move FreeBSD to the new machine



## ObiektywNy (Jan 5, 2011)

Hi
Maybe it will be trivial question, but I couldn't find straight answer on Google.

I spend quite a bit set up FreeBSD server (packages/conf's) and now I thinking to move FreeBSD OS to the faster machine. What is the best way to moves everything to the new hardware PC? Assuming that new PC will have bigger HDD and different hardware configuration.

Thank you for suggestions.


----------



## wblock@ (Jan 5, 2011)

dump(8)/restore(8), because then you can set up the disk with larger or different partitions.  See Backup Options For FreeBSD, or the New Huge Disk entry in the FAQ.

As far as different hardware, it depends.  Probably have to change the Ethernet card in /etc/rc.conf.  Maybe load different sound drivers.  Video card is just another xorg thing, well-covered by the Handbook.


----------



## ObiektywNy (Jan 7, 2011)

Thank you wblock.
I want to use external HDD as backup drive. I nned to format it.
The default format for FreeBSD is #165 and I assume that "dedicated mode" will be the most appropriate. 

Any suggestions what is the bestpartition type in that situation?

What you will recommend?


----------



## wblock@ (Jan 7, 2011)

Dedicated mode means no (partition) slice table, so there would be no partition type.

But I prefer a slice table.  You can easily do this with fdisk(8) and bsdlabel(8).  Adjusting the drive name as needed, follow the first few steps of Disk Setup On FreeBSD.  When you edit the bsdlabel, all you have to do is change the "a" partition type to 4.2BSD.  (This is a FreeBSD "partition", contained inside the slice created above.)  Leave the size unchanged, and it'll fill the whole disk.

When you newfs(8) that partition, use the -L option to give it a label.  Then the device number won't matter.  For example, if you labeled it "bigbackupfs", mounting it would be
`# mount /dev/ufs/bigbackupfs /mnt`
No need to figure out whether it's da0 or da1 or something else.


----------



## Orum (Jan 7, 2011)

Also, if you've compiled and installed a custom kernel, always revert to the generic (or manually boot it initially) one before moving the disk.  I, of course, have never made such a dumb mistake :OO.


----------

