# Best way to migrate to FreeBSD



## jonfr (Jun 9, 2012)

I am currently using Gentoo Linux with ext3 and ext4 file system. I use it both as desktop and a server. I have decided to move from Gentoo Linux to FreeBSD. The reason is that Gentoo Linux has now been for some time terribly inconstant at the package level. But that means for me wasted time on solving problems that I should not have needed to solve. As it should be in the development arena to do so.

I need to find a good way to move my data from ext3/4 to the FreeBSD filesystem (UFS2?). I also need to find a good way to move my user data into FreeBSD equal of /home. But before I move my desktop computer. I plan to move my server over to FreeBSD first. It contains fewer data that need to be saved (if any). But I need a few things running on it that I use. Then it is a matter of the programs that I use in Gentoo Linux. I think most of them exist in FreeBSD.

On my server computer (also Gentoo Linux). I use Aiccu and radvd for IPv6 connection. I also use it as test server for mysql, web pages etc, when I need to do so. Other servers I run on it are dhcpd and dnsmasq for DNS resolving, Samba is also used to transfer files to the web server over the local LAN.

But I am sure that I am missing something here. So anything that might be please let me know. Thanks for the help!


----------



## DutchDaemon (Jun 9, 2012)

To anyone replying: please keep your answers *general*. The question covers file systems, storage, web services, networking, ports, etc. Answering every single question will derail this topic. 

Poster: detailed questions need to be asked in separate topics in the applicable sub-forums. These 'catch-all' questions usually don't result in usable answers. So only general answers may be given.


----------



## jonfr (Jun 9, 2012)

Thanks for that. I've will get into detailed questions when I start the migration to FreeBSD. But I am not sure on the time frame of that as of yet. But I need to read up on the manual first. But I also need few general answers to start with.


----------



## UNIXgod (Jun 10, 2012)

You can compile ext3 support as read only when you install a custom FreeBSD kernel. From there you can migrate the data. This would require a new disc.

Another way would be to copy it over the network if your setting up a new box. This would require a second computer.

If neither of these are options the last way would be to backup data to tape, CD, DVD or thumb device and migrate the data that way.


----------



## jonfr (Jun 10, 2012)

Backing up my data is going to be a bit difficult. Due to its amount. Using my server computer as a backup is not a option. It is a question if I can move 2TB drive to ext3 and from GPT type of drive. It is a 4K sector drive.

Desktop.

```
df -h
Filesystem         Size  Used Avail Use% Mounted on
rootfs              60G   26G   31G  46% /
udev                10M     0   10M   0% /dev
/dev/sda3           60G   26G   31G  46% /
tmpfs              2,5G  324K  2,5G   1% /run
rc-svcdir          1,0M  108K  916K  11% /lib64/rc/init.d
cgroup_root         10M     0   10M   0% /sys/fs/cgroup
none               2,5G  2,1M  2,5G   1% /dev/shm
/dev/sda4          229G   83G  134G  39% /home
/dev/sdc1          931G  720G  165G  82% /mnt/1tb.drive
/dev/sdd1          1,9T  492G  1,3T  28% /mnt/2tb.drive
//192.168.1.1/www   22G   18G  2,6G  88% /mnt/www.folder
```
Server.


```
df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           15G   14G  629M  96% /
udev             10M     0   10M   0% /dev
/dev/sda3        15G   14G  629M  96% /
tmpfs           505M  212K  505M   1% /run
rc-svcdir       1,0M  140K  884K  14% /lib/rc/init.d
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
none            505M     0  505M   0% /dev/shm
/dev/sda4        22G   18G  2,6G  88% /home
```


----------



## vermaden (Jun 11, 2012)

jonfr said:
			
		

> I need to find a good way to move my data from ext3/4 to the FreeBSD filesystem (UFS2?).


Better dive into the ZFS and Boot Environments instead of UFS: http://forums.freebsd.org/showthread.php?t=31662



			
				jonfr said:
			
		

> On my server computer (also Gentoo Linux). I use Aiccu and radvd for IPv6 connection. I also use it as test server for mysql, web pages etc, when I need to do so. Other servers I run on it are dhcpd and dnsmasq for DNS resolving, Samba is also used to transfer files to the web server over the local LAN.



You should not have problems with setting-up these.



			
				jonfr said:
			
		

> But I am sure that I am missing something here. So anything that might be please let me know. Thanks for the help!



If you are comfortable with FreeBSD, then go ahead, start migrating your server to FreeBSD, then desktop, but if you feel, that there are several things/areas where you think you lack some experience/knowledge, pop a VirtualBox virtual machine and test more to be sure how things are/work. Using the specified _ZFS Madness_ HOWTO you can later move that virtual machine onto the physical host.


----------



## throAU (Jun 18, 2012)

You've got backup media right? 


Backup data to file on filesystem both can read (e.g., ZFS, with FUSE on Linux, or FAT, NTFS, network share, etc), then restore into new OS.

If nothing else it will be a good test of your disaster recovery method.

Yes, backing up will be painful but seriously if you're not already doing it, there's no better time to start like the present.  Especially if you're trying to transition to a new OS; the unfamiliarity may well end up with you making a terrible mistake resulting and nuking your data.  It does happen.

Also, I don't believe you will be able to convert an ext3 filesystem to a FreeBSD native format without a wipe and restore to that device.


----------



## tingo (Jun 21, 2012)

General answers:

migrate your data to a fileserver, including all your backups. Remember to have the backups in a format that you will be able to use on your new system (.tar.gz., .zip or whatever)
install FreeBSD on a new machine, use it as a temporary workstation - learn and get to know your way around FreeBSD.
when you are comfortable enough, decide on a migration plan and migrate.


----------

