I have migrated several instalations to larger/similar hard drives using the tools I commented. I will insist on the tools. Although I am aware that dump and dd work well, I'm personally not comfortable using dd, or tunefs after a dump. I still believe tar is the way to move filesystems and backup installations. g4u is ghost on steroids, and will clone whatever slice you need without touching the filesystem.
It really depends how you have your disk layout, if you dual or triple boot, etc.
For example, I migrated a triple boot xp/pcbsd/hp-quickplay linux (must be at the end of the geometry) (1 ntfs/1 ufs2/1 propietary hp slices) from a 100gb to a 120gb hdd. Depending on where to allocate the extra 20 gb, this is what I did:
+20 on xp: Dump using g4u the nfts slice to the new hdd connected as ide from the original drive in usb2. Use qtparted from mepis-livecd to prepare two dummy slics with the same former size for usf2 and hp, expand nfts slice on remaining space. g4u remaining slices.
+20 on /: Dump using g4u the ntfs slice. Dummy space for pcbsd and hpqp using qtparted. Prepare new hdd using qtparted from mepis-livecd, with three dummy slices. Install minimal pcbsd on the dummy slice or use sysinstall to prepare the target slice (depending on your expertise and confidence level of the command line. Tar original pcbsd***(check at the end how to do these last steps). G4u hp-qp.
+20 on PCBSD + change bsdlabel layout (more swap, separate /home/ /usr/ /var /tmp or /etc): This is the only reliable way I'm aware of to shrink and change usf disklabel layouts (I really wished there would be an foolproof graphic tool to do this). Same as above, but when doing the tar, consider the following:
Plan ahead your new layout, with a custom freebsd minimal installation, or a custom pcbsd slice layout. Using the --one-file-system flag, move each file system, one at a time.
http://unixarticles.com/articles/92/...ive-in-FreeBSD
|
Quote:
|
Shutdown and install the new drive in the computer, leaving the existing drive as the primary master. Installing the new drive as the master on the secondary ATA channel will give you faster throughput for transferring data, but the new drive may be installed as the slave drive on the primary ATA controller. Be sure to set both new drive and existing drive jumpers as required.
Boot to single user mode. If you are using FreeBSD 5.x or 6.x, choose the 'Boot FreeBSD in single user mode' option at the boot menu; otherwise, during the boot loader countdown, press any key other than the Enter key, and at the boot prompt, enter the command:
ok boot -s
At the shell prompt, mount the file systems:
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
Run sysinstall:
# /usr/sbin/sysinstall (In FreeBSD 4.x, it's /stand/sysinstall)
Choose 'Configure,' then 'Fdisk' from the menu, then choose your new drive. (For ATA drives, the new drive will be 'ad1' if it's the primary slave, or 'ad2' if it's the secondary master; for a SATA master on channel 4, it will be 'ad8'.) For the purpose of this procedure, we will assume that the new drive is 'ad2'.
In the FDISK Partition Editor, choose 'A' to use the entire disk. Press 'Q' to continue.
At the "Install Boot Manager" prompt, choose the appropriate boot manager. This procedure assumes that FreeBSD is the only operating system, so choose the 'Standard' master boot record.
Back at the sysinstall menu, choose 'Label'.
In the Disklabel Editor, create the following partitions:
ad2s1a /mnt 512MB as UFS2
ad2s1b swap 2048MB as swap (4x system RAM)
ad2s1d /var 4096MB as UFS2 + Softupdates
ad2s1e /usr remaining as UFS2 + Softupdates To get partition 'a', tell Disklabel Editor the mount point is '/', then change it to '/mnt' using the 'M' option.
Choose 'Q' to continue.
Exit sysinstall.
Mount the new filesystems:
# mount /dev/ad2s1a /mnt
# mount /dev/ad2s1d /mnt/var
# mount /dev/ad2s1e /mnt/usr
Copy the existing filesystems:
# tar cf - --one-file-system -C / --exclude='mnt/*' . | tar xpvf - -C /mnt
# tar cf - --one-file-system -C /var . | tar xpvf - -C /mnt/var
# tar cf - --one-file-system -C /usr . | tar xpvf - -C /mnt/usr
Shutdown and remove the old hard drive. Move the new drive to the location of the old drive; make sure to set the new drive's jumpers accordingly. If you are moving from an ATA drive to a SATA drive, make sure you change the boot device in the computer's System BIOS.
Boot to single user mode as described previously.
At the shell prompt, mount the file systems:
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
Verify that all of the filesystems are properly mounted:
# mount
You should see something like:
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s1e on /usr (ufs, local, soft-updates)
/dev/ad0s1d on /var (ufs, local, soft-updates)
Reboot and observe startup messages to ensure the system is functioning properly.
|
At the very last, I let the GAG bootloader to sort things out. This looks very complicated, but it was very straight forward, and it took me only an hour and a half to dump all the data.
P.S. I really like having separate / and /home layouts (with swap in between), since this layout will allow me to do the following:
Reinstall the system and leave /home and all personal files alone.
Back up /home, erase it, and expand / or swap according to your needs, then restore /home.
Move filesystems without compromising personal/user configuration files.