Home > FreeBSD > How to Move FreeBSD to a New Hard Disk How to Move FreeBSD to a New Hard Disk Eugenia Loli 2003-12-29 FreeBSD 13 Comments This useful tutorial-article will explain how you can move your FreeBSD installation from one hard disk drive to another. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli 13 Comments 2003-12-29 2:41 am mount the new drive as slave, edit the disklabel (disklabel -i -I in NetBSD…I’d assume it’s the same in FreeBSD), newfs (should specify -b and -f!), do the dump, shutdown, set the new drive as master, boot with an install floppy and re-write the bootloader. Alternatively, if you’re using grub, you could do this chrooted to the new disk before you reboot (limited to UFS1 partitions). 2003-12-29 8:52 am Or ,you could just buy one of those box’es where you plug in your old harddrive into the top and the new one into the bottom and press the on button.Wait till the red light truns green and presto! a complete copy ,but that would ruin all the fun 2003-12-29 11:19 am What are you blabbering about? Unless you want to get stuck with one whopping 4GB partition (wahoo!) on your brand new 160gig hd I suggest you find another way of doing it. Come to think of it, I doubt those things can even write partitions. This is a rather useful tutorial. Harddisks are becoming cheaper, bigger and more power-friendly by the minute =). 2003-12-29 1:59 pm I agree with hurdboy, the minimal install seems a bit superfluous if you’re not even going to use it. But using disklabel manually isn’t necessary either. You can also create the partitions on the new drive via sysinstall on your running system, no need to do a minimal install for that (choose Configure -> FDisk, create a slice, select ‘w’ to write, then choose Configure -> Disklabel, create your partitions, and select ‘w’ to write again). Also, you don’t have to use MAKEDEV when you’re running FreeBSD 5.x, seeing that FreeBSD devfs is default on 5.x. 2003-12-29 7:42 pm ….get the “fdisk” part to script, the whole thing could be done with one button….. I like that! 2003-12-29 10:38 pm Can’t you just use ‘cp’ with the appropriate flags? Seems to have been working fine on my Linux machines, but maybe FreeBSD is different. That’s one thing that I hate about Windows XP, however. It’s so damn fragile about things like this. My friend got a new hard drive, and after a whole lot of fussing, he ended up just not bothering trying to move Windows over and just set the second one as the “D:” drive. And god help you if you want to move your installation to a different machine! 2003-12-29 11:58 pm No, cp will not work because it doesn’t copy special files like sockets, cp expands sparse files and it doesn’t know about flags/attributes of files (the same for gnu-tar). 2003-12-30 12:30 am 2 words: norton ghost problem solved =) 2003-12-30 1:46 am Does ghost copy Linux/BSD partitions ? Is it able to copy a ext2fs to a reiserfs partition ? Alex. 2003-12-30 1:55 am “norton ghost” I’ve had much better luck with dd. Sure it’s a tad on the primitive side, but with a little post dd tweaking, I’ve been able to move around all manner of OSs, Linux, FreeBSD and Windows 2000, to disks of different sizes. The first time you reboot to win2k after doing so it demands that you reboot as it’s found new devices >;) 2003-12-30 4:15 am From what I understand about Norton Ghost, doesn’t it make an exact replica of the harddisk, so if you move your image from a 4gb harddrive over to a 160gb harddrives, the partitions will be the same as with the old drive. Could be wrong though, but it can work 2003-12-30 5:36 am if its a partition type that ghost understands, then it can just copy the files over and resize the destination at the same time, otherwise it does a bit for bit copy of the partition and keeps it the same exact size. i know it understands fat12/16/32, ntfs, and ext2/3. not sure if it knows how to properly handle any other file system. 2003-12-30 11:17 am helooo drive image is way better than ghost/.