# move FreeBSD Hard Disk to another computer or system



## mfaridi (Apr 6, 2011)

in work I have one hard disk and I install on it  FreeBSD 8.2 AMD64 and I use Gnome and my motherboard is Asus and my CPU is Intel with 3GB of RAM , and I want move this HDD to another system because of motherboard error and broken motherboard , I can not find another mother board like this , and finally I find another motherboard with nVidia chipset and AMD CPU and , so I want move this HDD to new system , before I move to new motherboard with new chipset and new CPU , what I must do ?
I do not reinstal FreeBSD , and I want FreeBSD work for me with new mainboard and new CPU .
if I move HDD with FreeBSD installed to new motherboard and new CPU , what I must do ?
Do I need modify something ?


----------



## mk (Apr 6, 2011)

I've done this with vanilla FreeBSD install. Install on machine A and move disk to machine B.
It worked. 
You may want to check your /etc/fstab for correct mount points on your new machine.


----------



## SirDice (Apr 6, 2011)

Unless you used a highly customized kernel there shouldn't be any major issues. Just move the drive to a new system and boot from it.


----------



## wblock@ (Apr 6, 2011)

Disk device numbering and names can change.  As mk points out, this can affect /etc/fstab, but it's easy to avoid if you use labels; see FreeBSD Labeled Filesystems.

Ethernet device names and numbering can change, too, affecting firewalls.  If the system was built with CPUTYPE set, it will only run on a similar CPU.


----------



## foldingstock (Apr 6, 2011)

mk said:
			
		

> I've done this with vanilla FreeBSD install. Install on machine A and move disk to machine B.
> It worked.
> You may want to check your /etc/fstab for correct mount points on your new machine.



Network/firewall settings may also need to be reviewed if the network card(s) in the new machine use a different chipset from the old machine.


----------



## zennybsd (Apr 6, 2011)

Hard drive is cheap*. So I have two suggestions:

1) Fresh install 8.2 or 9.0 current on a new HDD and then copy the configurations and files.

2) Use a CF/USB drive to boot (or create a nanobsd image) whereas the rest of the system resides in HDD with zfs. Thus, migration later would be easier.

Obviously, the nanobsd way has a steep learning curve, but I found it extremely useful for dynamic systems.

*DISCLAIMER: @mfaridi:I have no idea about the affordability and availability in your region. ;-) So pardon me if this does not apply in your case.


----------



## mfaridi (Apr 9, 2011)

Thanks guys, I think the FreeBSD label file system is great, and works good for me. I use the Generic kernel and do not modify the kernel. Can I use label with a Generic kernel?


----------



## wblock@ (Apr 9, 2011)

mfaridi said:
			
		

> I use Generic kernel and do not modify kernel , can I use label with Generic kernel ?



Sure.  But please back up first.


----------



## mfaridi (Apr 9, 2011)

In this guide, I see things about CD-ROM and DVD-ROM, and I think I have to add them to fstab too and make label for it too (http://www.wonkity.com/~wblock/docs/html/labels.html).

Am I right?


----------



## wblock@ (Apr 9, 2011)

There can be entries for CD and DVD in /etc/fstab, but they're just device names like /dev/cd0.

glabel(8) implies that labels for the individual CD media will be created in /dev/iso9660/.  I'd expect it to get the label from the volume ID (-V option for mkisofs(8)), but haven't tested it.


----------



## mfaridi (Apr 9, 2011)

I have a lot of files and information on my hard disk. Can this approach cause problems for me and may I lose all of my data?


----------



## mamalos (Apr 9, 2011)

Don't worry, you will have no problem, unless you mess with your disk and/or MBR. The only problems you might face, is the device naming in /etc/fstab, as most others have stated, and your graphic card -in case you *kldload* some specific driver-. The former may result in a non-bootable-easy-to-fix system (even if you don't create labels), the second may result in a non-working *Xorg*, unless you fix your /etc/X11/xorg.conf file to suit your new needs (or whichever configuration file you use for *X*)

Good luck and don't worry. *I*, and I speak of myself, have never kept a backup when I had to do such operations, but that's *me* and *my* relationship with backups . If your information is valuable, *you should* keep a backup regardless of you moving your disk to a new system.


----------

