Click here to load reader
Upload
vuongngoc
View
213
Download
0
Embed Size (px)
Citation preview
HOWTO Restore a FreeBSD system using thefixit CDMark Hannon markhannon at optusnet.com.au Fri May 20 10:49:44 GMT 2005
Previous message: [Virus detected]Next message: HOWTO Restore a FreeBSD system using the fixit CDMessages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here are some notes I made when recently restoring an install. Perhapssomething 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 aseries of dump files stored on a local HDD. They have been used tomigrate a FreeBSD installation from a vmware guest install to a localHDD 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. Ignorethe warnings and quit.
Step Three - Create FreeBSD disklabel-------------------------------------
Select the disklabel option and create and mount new options as pernormal. Sysinstall creates the disklabel, makes the new filesystems andmounts them all under /mnt. i.e in the automatic disklabel mode theuser 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 thesepartitions.
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 thisby 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 bysetting the FreeBSD partition active).
Previous message: [Virus detected]Next message: HOWTO Restore a FreeBSD system using the fixit CDMessages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the freebsd-doc mailing list