Date: Fri, 20 May 2005 20:49:39 +1000 From: Mark Hannon <markhannon@optusnet.com.au> To: freebsd-docs@freebsd.org Subject: HOWTO Restore a FreeBSD system using the fixit CD Message-ID: <1116586180.8570.1.camel@tbird.home.lan>
next in thread | raw e-mail | index | archive | help
Here are some notes I made when recently restoring an install. Perhaps something could go into the handbook? Regards/Mark ============================================================= HOWTO Restore a FreeBSD installation directly from dump files ============================================================= These instructions document how to restore a FreeBSD installation from a series of dump files stored on a local HDD. They have been used to migrate a FreeBSD installation from a vmware guest install to a local HDD install. Step One - Backup ----------------- Backup your FreeBSD installation to a series of dumpfiles. # /sbin/dump -L -0 -f root.0 / # /sbin/dump -L -0 -f var.0 /var # /sbin/dump -L -0 -f usr.0 /usr This will create three dumpfiles with your root, var and usr partitions. Move the files to a local disk partition. Step Two - Create FreeBSD partition ----------------------------------- Boot the 5.4-RELEASE-disc1 CD and select the Configure->Fdisk option. Create a FreeBSD partition and select W to write the changes. Ignore the warnings and quit. Step Three - Create FreeBSD disklabel ------------------------------------- Select the disklabel option and create and mount new options as per normal. Sysinstall creates the disklabel, makes the new filesystems and mounts them all under /mnt. i.e in the automatic disklabel mode the user will end up with the following filesytems created and mounted: / = /mnt /tmp = /mnt/tmp /var = /mnt/var /usr = /mnt/usr The following steps will restore the backup installation into these partitions. Step Four - Restore the Filessystems ------------------------------------ Select the fixit -> cd/dvd option and enter the Fixit shell. Start csh to get command line completion Fixit# csh Setup a large /tmp filesystem so that restore doesn't complain. Do this by linking to the restored systems /tmp. # mv tmp/ tmp.old # ln -sf /mnt/tmp tmp Mount the local disk partition with the files to restore. # mkdir /dumpfiles # /mnt2/usr/sbin/mount_msdosfs /dev/ad0s5 /dumpfiles Restore the root partition # cd /mnt # /mnt2/sbin/restore xf /dumpfiles/root.0 Restore the remaining partitions # cd /mnt/var # /mnt2/sbin/restore xf /dumpfiles/var.0 # cd /mnt/usr # /mnt2/sbin/restore xf /dumpfiles/usr.0 Enter the installed system to cleanup # /mnt2/sbin/chroot /mnt Correct the /tmp permissions in the installed system # chmod 1777 /tmp Edit fstab etc # vi /etc/fstab etc # vi /etc/rc.conf Exit the installed chroot, fixit csh and fixit shells # ^D # ^D # ^D Step Five - Reboot ------------------ Reboot and start your new system (either via another bootloader or by setting the FreeBSD partition active).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1116586180.8570.1.camel>