diff --git a/Imaging-FreeBSD-With-tbku.txt b/Imaging-FreeBSD-With-tbku.txt index 7f55b93..b77b78f 100644 --- a/Imaging-FreeBSD-With-tbku.txt +++ b/Imaging-FreeBSD-With-tbku.txt @@ -200,15 +200,14 @@ the tools already present on the FreeBSD installation CD. However, instead of actually installing an operating system, we'll just use the paritioning and disk labeling tools to prepare the target disk to -receive our FreeBSD image. Then, we'll jump into the "Fixit" shell +receive our FreeBSD image. Then, we'll jump into the ``Fixit`` shell and actually do the restore from there. Provisioning Machines With A Master Image 1. Boot the FreeBSD installation disk. - 2. Now we have to prepare the disk to receive a FreeBSD - filesystem:: + 2. Prepare the disk to receive a FreeBSD filesystem:: Custom @@ -219,7 +218,7 @@ Partition as desired Select the partition that will boot - S - To make it bootable) + S - To make it bootable Quit @@ -253,10 +252,10 @@ mount - You see your newly created filesystems mounted under - ``/mnt``. Now, we need to create the top level - directories that are typically not backed up in - an image (some of these may already be present):: + You should see your newly created filesystems mounted under + ``/mnt``. Now, we need to create the top level directories + that are typically not backed up in an image (some of these + may already be present):: cd /mnt mkdir cdrom dev dist proc tmp @@ -275,7 +274,7 @@ you are informed that the drive has been recognized as ``/dev/da1``. So, you try this:: - mount -t msdosfs /devda1s1 /mnt/mnt + mount -t msdosfs /dev/da1s1 /mnt/mnt Oops ... the ``Fixit`` shell complains - it doesn't know how to mount filesystems of type ``msdosfs`` because the @@ -284,9 +283,9 @@ Fortunately, there's a very simple way to work around this. The CD from which you booted is itself mounted under - ``dist``. That CD has a more-or-less full "live" FreeBSD - system on it, that *does* have the files you need there. - In this case, the "fix" is to do something like this:: + ``/dist``. That CD has a more-or-less full "live" FreeBSD + system on it, that *does* have the files you need there. In + this case, the "fix" is to do something like this:: mkdir -p /sbin # Make sure the directory exists in Fixit cp -pv /dist/sbin/mount_msdosfs /sbin @@ -308,10 +307,33 @@ cd /mnt # This is the logical root of our disk tar -xzvf mnt/my-fine-image.tar.gz - When untarring is complete, unmount your newly - imaged drive, exit the ``Fixit`` shell, and then - exit the FreeBSD installation menus to reboot the - system. + 4. Finally, we need to make sure that our newly imaged + filesystems will be mounted properly at boot time. This is + controlled by the contents of: ``/mnt/etc/fstab`` Suppose, + after we image the drive, that file looks like this:: + + /dev/ad4s1b none swap sw 0 0 + /dev/ad4s1a / ufs rw 1 1 + /dev/ad4s1d /var ufs rw 2 2 + /dev/ad4s1e /usr ufs rw 2 2 + /dev/acd0 /cdrom cd9660 ro,noauto 0 0 + + This would indicate the image was taken from a system with + FreeBSD installed on the first SATA drive. Now, lets + assume we're going to use the same partitioning, but our + newly imaged drive is the first *SCSI* drive on the system. + ``/mnt/etc/fstab`` needs to be edited to look like this:: + + /dev/da0s1b none swap sw 0 0 + /dev/da0s1a / ufs rw 1 1 + /dev/da0s1d /var ufs rw 2 2 + /dev/da0s1e /usr ufs rw 2 2 + /dev/acd0 /cdrom cd9660 ro,noauto 0 0 + + It may also be necessary to edit the ``/mnt/etc/rc.conf`` + file to adjust IP address assignments or other system + configuration parameters. + We're DONE! Well ... maybe. If the environment or hardware of your target machine is similar/same as the machine from which you took the @@ -473,4 +495,4 @@ modifying it in any way. -$Id: Imaging-FreeBSD-With-tbku.txt,v 1.104 2008/03/17 21:36:04 tundra Exp $ +$Id: Imaging-FreeBSD-With-tbku.txt,v 1.105 2008/03/17 22:12:28 tundra Exp $