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).
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
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 =).
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.
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!
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).
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 >;)
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
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.
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).
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
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 =).
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.
….get the “fdisk” part to script, the whole thing could be done with one button…..
I like that!
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!
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).
2 words: norton ghost
problem solved
=)
Does ghost copy Linux/BSD partitions ?
Is it able to copy a ext2fs to a reiserfs partition ?
Alex.
“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 >;)
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
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.
helooo drive image is way better than ghost/.