moving an entire system
rsmith at xs4all.nl
Thu Nov 19 17:39:58 UTC 2009
On Thu, Nov 19, 2009 at 02:04:03PM +0100, n dhert wrote:
> I want to move the contents of a freebsd72 system entirely to different
> hardware (also Intel 64-bit), using dump/restore
If you are running a custom kernel, check that all the drivers for the new
hardware are in there! Or switch to the GENERIC kernel before making backups.
> These are the filesystems now:
> /dev/da0s1a 2026030 650876 1213072 35% /
> /dev/da0s1e 20308398 652820 18030908 3% /tmp
> /dev/da0s1f 95719170 12449998 75611640 14% /usr
> /dev/da0s1d 20308398 2960282 15723446 16% /var
> /dev/da1p1 2175407698 168279068 1833096016 8% /home
> How should one proceed? I have an 286 Gb external USB disk formatted with a
> slice large enough to hold all dumps of all fileystems, mounted on /seagate
> /dev/da2s1a 283810126 12 260463064 0% /seagate
> a. put the original machine in single-user mode
> b. use dump (could L be left out if machine is in single-user mode?)
The L flag is used to denote a live (i.e. mounted) filesystem. So I would keep
it, unless you can unmount the filesystem you want to dump. If you are using
the -L flag there is no need to switch to single user mode.
> d. target machine, plug in the external USB disk and mount it
> # mkdir /seagate
> # mount /dev/da2s1a /seagate
Think about your filesystem (bsdlabel) sizes before you create them on the new
machine. If you want to change anything, now is the time. :-) From the look of
it you've got plenty of space, but maybe you want to make /home even bigger by
making /usr and /var smaller, or the other way around?
> e. restore file systems
> How exactly ? is this ok for /home :
> # umount /home
> # /sbin/newfs /dev/da0s1g
> # /sbin/mount /dev/da0s1g /mnt
> # cd /mnt
> # /sbin/restore rf /seagate/dumpofhome.dmp
> # umount /mnt
> # mount /dev/da0s1g /home
That looks OK. Personally I always encrypt the partition that contains my /home
geli init -l 256 /dev/da0s1g
geli attach /dev/da0s1g
newfs -U /dev/da0s1g.eli
mount /dev/da0s1g.eli /home
The geli init command will ask you to supply a password. The 'geli attach'
will ask for the newly chosen password before it created the encrypted
device. At the next boot you will be asked for the password before /home is
mounted. (Don't forget to change /etc/fstab accordingly!).
In the unfortunate case that your machine is stolen, encryption protects your
privacy by preventing others from reading your private data!
> for /tmp, /usr and /var?
I wouldn't bother with making a backup of /tmp.
If your new hardware differs from the old one, you should check if to need to
adapt /boot/loader.conf, /etc/rc.conf (different network chip?) and
/etc/sysctl.conf (e.g. hw.snd.default_unit if the new machine has more than
one sound device). Also check if /etc/fstab is still valid. In general, check
all configuration files that could have an inpact.
On the other hand, you might want to take the opportunity to switch to
8.0-PRERELEASE. In that cause you only have to backup your own data and the
system configuration files.
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20091119/919eaf37/attachment.pgp
More information about the freebsd-questions