ÎÒÃǼÙÉèÄãµÄFreeBSÒÑ×°ÔÚÒ»¸ö4GµÄÓ²ÅÌÉÏ(IDE Master ad0)£¬²¢ÇÒÎÒÃÇÏë°ÑËüÒƵ½Ò»¸öеÄ20GµÄÓ²ÅÌÉÏ£¬ ÄãËùÒª×öµÄ½ö½öÊÇÈ¥µôÀϵÄÓ²ÅÌ£¬×°ÉÏ20GµÄÐÂÓ²ÅÌ(×÷ΪIDE Master)²¢ÇÒ½øÐÐFreeBSDµÄ×îС»¯°²×°(minimal clean install)£¬×¼È·ÉèÖúÃÄãµÄ·ÖÇø¡£ÇëÈ·¶¨ÄãÒÑÉèÖÃÁËÓ²ÅÌΪ¿ÉÆô¶¯£¬²¢ÇÒÆô¶¯Ò»´Î×öΪ²âÊÔ£¡
½ÓÏÂÀ´£¬ÖØÐÂ×°ÉÏÔÓ²ÅÌ(4G)(×÷ΪIDE Master)£¬ºÍÐÂÓ²ÅÌ(20G)(×÷ΪIDE Slave)¡£Æô¶¯ÔÀ´°²×°µÄFreeBSDµ½µ¥Óû§Ä£Ê½ÏÂ(single user mode):
½øÈëµ¥Óû§Ä£Ê½£º
1.ÔÚ10Ãëµ¹¼ÆʱµÄʱºò°´Ï¿ոñ(space)¼ü£¬ÊäÈëboot -s
È»ºóÔÚ#ºóÊäÈë
fsck -p
mount -u /
mount -a
swapon -a
adjkerntz -i
2.È·¶¨ÄãÒѾÓÐÁËËùÐèµÄÉ豸Îļþ£¬ÕâÑùÄã¾Í¿ÉÒÔmount·ÖÇøµ½´ÓÅÌÉÏ¡£
cd /dev
./MAKEDEV ad1s1a
./MAKEDEV ad1s1e
./MAKEDEV ad1s1f
FreeBSD 5.x°æ±¾²ÉÓÃdevfs,¿ÉÒÔ×Ô¶¯¼ì²âÓ²¼þ£¬Òò´Ë²»ÓÃ
3.½¨Á¢ÐÂÓ²ÅÌ·ÖÇøµÄ¹ÒÔصã(mount point)
mkdir /backup
mkdir /backup/root
mkdir /backup/usr
mkdir /backup/var
4.ÎÒÓÃÒ»¶Îshell½Å±¾À´×öÒÔϼ¸²½²Ù×÷£º
1 - create new filesystems (newfs the drive)
2 - mount the partitions
3 - dump the data from my old drive, and restore it to my new one
4 - unmount the new drives partitions
5 - enable softupdates on the new drive (optional)
ÏÂÃæÊÇÎÒÓõÄShell½Å±¾
ÒýÓÃ:#!/bin/sh
newfs /dev/ad1s1a
newfs /dev/ad1s1e
newfs /dev/ad1s1f
mount /dev/ad1s1a /backup/root
mount /dev/ad1s1e /backup/var
mount /dev/ad1s1f /backup/usr
( dump -0f - / ) | ( cd /backup/root ; restore -rf - )
( dump -0f - /var ) | ( cd /backup/var ; restore -rf - )
( dump -0f - /usr ) | ( cd /backup/usr ; restore -rf - )
umount /backup/root
umount /backup/var
umount /backup/usr
tunefs -n enable /dev/ad1s1a ###ÔÚ·ÖÇøÉÏÃæÆôÓÃSOFTUPDATES
tunefs -n enable /dev/ad1s1e
tunefs -n enable /dev/ad1s1f
#end
½øÐÐdump/restoreµÄ²Ù×÷¿ÉÄܻỨ¼¸¸öСʱµÄʱ¼ä£¬ÇëÄÍÐĵȴý¡£µ±Ó²Å̵±Êý¾Ýdumped and restoredµ½ÐÂÓ²Å̺ó£¬ÄãÒª×öµÄ½ö½öÊÇж³ýÀÏÓ²ÅÌ(4G)£¬°ÑÐÂÓ²ÅÌÉèÖÃΪÖ÷ÅÌ(IDE Master)²¢ÇÒÖØÆô(Reboot).ÏÖÔÚÄã¾Í¿ÉÒÔ´ÓÐÂÓ²ÅÌ(20G)Æô¶¯ÔÀ´ÒÑ°²×°µÄFreeBSDÁË£¡
Äã¿ÉÒÔÏÂÔØdiskcopyshell ½Å±¾£¬ÓÃtar xvf drivecopy.tar½âѹµÃµ½ drivecopy.shÎļþ¡£Èç¹ûÄã×Ô¶¨ÒåÁË·ÖÇø(custom partitions),ÄãÐèÒªÐÞ¸Ädrivecopy.shÎļþ¡£¼ÓÈëÄãÔÚ°²×°µÄʱºòÑ¡ÔñÁ˱ê×¼FreeBSD ·ÖÇø(standard FreeBSD partitions)£¬¾Í°ÑÐèÒªÐ޸ĴËÎļþ¡£
Äã¿ÉÒÔͨ¹ý
man dump
man restore
man tar
man mount
man adjkerntzÀ´µÃµ½ÕâЩÃüÁîµÄ¸ü¶àÐÅÏ¢£¡