¡¡¡¡µ±ÏµÍ³¸ºÔØÖð²½Ôö¼Ó£¬½ö½öÒÀ¿¿ÔÓÐÎļþϵͳµÄ¿Õ¼äÊDz»¹»µÄ£¬¸üÓÐЧµÄ·½Ê½ÊÇÔö¼ÓеÄÓ²ÅÌÉ豸¡£ÕâÊ×ÏÈÐèÒª¸Ä¶¯Ó²Å̼°Æä¿ØÖÆÆ÷µÄÓ²¼þÉèÖã¬ÒÔ¼°FreeBSDÄÚºËÅäÖã¬ÒÔ±ãÓ²ÅÌÄÜ°²×°µ½¼ÆËã»úÉϲ¢Äܱ»FreeBSDÄÚºËÕýȷʶ±ð¡£½ÓÏÂÀ´¾ÍÐèÒªÔÚÐÂÓ²ÅÌÉÏ´´½¨ÐµÄÎļþϵͳ¡£
¡¡¡¡ÔÚϵͳ°²×°¹ý³ÌÖУ¬ÒѾ½Ó´¥ÁËÔÚFreeBSDϹÜÀíÓ²Å̺ͷÖÇøµÄ·½Ê½£¬FreeBSDÐèÒªÁ½¸ö²½Öè²ÅÄÜΪÎļþϵͳ·ÖÅäÒ»¸öÓ²Å̿ռ䣬µÚÒ»²½ÊÇΪFreeBSD´´½¨Ò»¸öUFSϵͳ·ÖÇø£¬Õâ¸ö·ÖÇøÖ»ÓÉFreeBSDÀ´Ê¹Óã¬È»ºóÔÚµÚ¶þ²½ÖдÓÕâ¸ö·ÖÇøÖУ¬Îª¸÷¸öÎļþϵͳ»®·Ö¿Õ¼ä£¬ÔÚFreeBSDϳÆΪ´´½¨ÎļþϵͳµÄDiskLabel±êÇ©¡£
¡¡¡¡×îÈÝÒ׺ÍÖ±¹ÛµÄ´´½¨ÐÂÎļþϵͳ»ò½»»»¿Õ¼ä·½Ê½ÊÇʹÓð²×°³ÌÐòsysinstall£¬ÒÔ±ãϵͳÆô¶¯Äܹ»×Ô¶¯°²×°ÉÏÕâ¸öÎļþϵͳ¡£Ê¹ÓÃSysinstallÀ´°²×°ÐÂÎļþϵͳµÄ·½Ê½ÔÚϵͳ°²×°µÄ¹ý³ÌÖÐÒѾÓÐÁËÏêϸÃèÊö£¬ÒÔrootȨÏÞÖ´ÐÐ/stand/sysinstall¾ÍÄܽøÈëSysinstall£¬È»ºóÑ¡ÔñPartition½øÐзÖÇø£¬Ñ¡Ôñ Label´´½¨ºÍά»¤BSDÎļþϵͳ¡£
¡¡¡¡½¨Á¢ÎļþϵͳµÄÃüÁîÐз½Ê½
¡¡¡¡³ýÁËʹÓÃsysinstallÖ®Í⣬»¹¿ÉÒÔʹÓÃÃüÁîÐеķ½Ê½À´Íê³ÉÕâЩ²Ù×÷¡£Ïà±È½Ï¶øÑÔ£¬ÃüÁîÐеķ½Ê½¸üÀ§ÄÑ£¬Ò²¸üÈÝÒ׳ö´í£¬Òò´ËÒ»°ã²»ÐèҪʹÓÃÕâÖÖ·½Ê½£¬È»¶øÃüÁîÐз½Ê½ÄÜ´øÀ´¸ü´óµÄÁé»îÐÔ£¬ÔÚһЩϵͳά»¤Çé¿öϸüΪÓÐЧ¡£
¡¡¡¡ÃüÁîÐз½Ê½½¨Á¢ÎļþϵͳÐèҪʹÓÃfdiskÃüÁî½øÐÐÓ²Å̵ķÖÇø¹¤×÷£¬fdiskÄܲ鿴ϵͳ·ÖÇø±íÉϵķÖÇøÐÅÏ¢£¬²¢¸ü¸ÄÆä·ÖÇøÉèÖã»È»ºódisklabelÃüÁî¿ÉÒÔÔÚ·ÖÇøÖл®·Ö²»Í¬×Ó·ÖÇø¿Õ¼ä²¢±ê¼Ç¸÷¸ö¿Õ¼äµÄDiskLabel £»Ê¹ÓÃnewfs½¨Á¢ÐÂÎļþϵͳ£¬»òÕßʹÓÃswaponÃüÁîÔö¼Ó½»»»É豸¡£
¡¡¡¡´´½¨ÐÂÎļþϵͳ£¬Ê×ÏÈҪʹÓý»»¥Ê½µÄfdiskÃüÁʹÓÃ-i²ÎÊý£©¶ÔÓ²Å̽øÐзÖÇø£¬²»´ø²ÎÊýµÄfdiskÃüÁî½ö½öÏÔʾ¸ÃÓ²Å̵ķÖÇøÉèÖ㬶ø²»Äܸü¸ÄÉèÖá£fdisk¾ùʹÓÃËü¼ì²âµ½µÄÓ²ÅÌÉèÖÃ×÷ΪȱʡÉèÖã¬Èç¹û²»ÐèÒª¸Ä±ä£¬¾Í¿ÉÒÔÖ±½ÓʹÓÃÕâЩȱʡÉèÖûØÓ¦ÆäѯÎÊ¡£ÔÚfdiskÖпÉÒÔÐ޸ĵÄÊý¾ÝÓÐÓ²ÅÌÓ³ÉäÊý¾Ý£¬ÒÔ¼°Ëĸö·ÖÇøµÄÆðʼλÖúÍÀàÐÍ¡£
ÒýÓÃ:# fdisk -i wd1
******* Working on device /dev/rwd1 *******
parameters extraced from in-core disklabel are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
¡¡
parameters to be used for BIOS calculations are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
¡¡
Do you want to change our idea of what BIOS thinks ? [n]
¡¡¡¡fdiskÄܼì²âÓ²Å̵ÄÕæʵӳÉäÊý¾ÝºÍBIOSµÄÓ³ÉäÊý¾Ý£¬ÓÉÓÚFreeBSD²»Ê¹ÓÃBIOS´æÈ¡Ó²ÅÌÊý¾Ý£¬Òò´ËÕâÁ½¸öÊý¾ÝÓпÉÄܲ»Ò»Ö£¬µ«Õâ²»Ó°ÏìFreeBSDϵͳ¶ÔÓ²Å̵ķÃÎÊ¡£µ«BIOSµÄÓ³ÉäÊý¾Ý±ØÐëÓëBIOSÖеÄÉèÖÃÒ»Ö£¬·ñÔòfdiskʹÓôíÎóÊý¾Ý»®·ÖµÄ·ÖÇø£¬ÏµÍ³µÄÒýµ¼ºÍÆäËûʹÓÃBIOSµÄ²Ù×÷ϵͳ¾ÍÎÞ·¨Õýȷʶ±ð¡£µ±Ó²ÅÌÉÏûÓÐÓ²ÅÌ·ÖÇøʱ£¬fdiskÎÞ·¨»ñµÃÕýÈ·µÄBIOSÓ³ÉäÊý¾Ý£¨ÒòΪFreeBSD²»·ÃÎÊBIOS£©£¬´Ëʱ¾ÍÐèÒªÔÚѯÎÊÊÇ·ñ¸ü¸ÄBIOSÓ³É䷽ʽʱ»Ø´ðyes£¬ÒÔ½øÐиü¸Ä¡£Ò»°ãÔÚÓ²ÅÌÉÏÒÑÓзÖÇø»ò²»ÐèÒª¼æÈݵÄÇé¿öÏ£¬²»ÐèÒª¸ü¸ÄÕâ¸öÉèÖã¬Ö±½Ó»Ø³µÑ¡ÔñnoÂÔ¹ýÕâ¸öÉèÖá£
ÒýÓÃ:The data for partition 1 is:
UNUSED>
Do you want to change it? [n] y
¡¡¡¡È»ºó£¬fdisk»áÕë¶Ôÿ¸ö·ÖÇøѯÎÊÊÇ·ñ¸ü¸ÄÆäÊý¾Ý£¬´Ëʱ°´ÐèÒª¸ü¸Ä·ÖÇøµÄÉèÖá£ÓÉÓÚʹÓÃfdisk¿ÉÒÔÖ±½ÓÖ¸¶¨·ÖÇøµÄÆðʼºÍ½áÊø£¬Òò´Ë¾ßÓкܴóµÄÁé»îÐÔ£¬Ò²ºÜÈÝÒ׳öÏÖ´íÎó£¬Èç·ÖÇøµÄ»®·Ö³öÏÖÖصþ¡£ÓÉÓÚ¶à²Ù×÷ϵͳÒýµ¼³ÌÐò Boot ManagerÕ¼ÓÃÁËÓ²ÅÌÖ÷Òýµ¼ÇøºóÃæµÄ¼¸¸ö¿ÕÓàÉÈÇø£¬°´ÕÕDOS/WindowsµÄ±ê×¼£¬ËäÈ»Ö÷Òýµ¼Çø½öÕ¼ÓÃÁËÒ»¸öÉÈÇø£¬Í¬Ò»ÖùÃæÖеÄÆäËûÉÈÇø£¨Ò»°ãΪ64»ò32¸ö£©Ò²²»Äܱ»·ÖÅä¸øÆäËû·ÖÇø£¬¶øÒª±£³ÖΪ¿ÕÓ࣬ÕâЩÉÈÇø¿ÉÒÔΪ Boot ManagerÕ¼Óá£ÕâÑù¾ÍÔÚfdiskÖ¸¶¨·ÖÇøµÄÆðʼʱ£¬ÊDz»ÄÜ´Ó0¿ªÊ¼µÄ£¬¶øÒª´ÓÏÂÒ»¸öÖùÃæµÄÆðʼλÖÿªÊ¼¡£
¡¡¡¡È»ºó°´ÕÕÒªÇó»Ø´ð·ÖÇøµÄÀàÐÍ£¬£¨FreeBSD·ÖÇøΪ165£¬DOS·ÖÇøΪ6£©£¬·ÖÇøµÄ¿ªÊ¼Î»ÖúʹóС£¬×¢ÒⵥλӦ¸ÃΪ512×Ö½Ú£¨ÉÈÇø´óС£©¡£ºóÃæµÄ´ó²¿·Ö²ÎÊý¿ÉÒÔʹÓÃȱʡֵ»ØӦѯÎÊ£¬»òÕßÉ趨¼¤»î·ÖÇø¡£
¡¡¡¡¸ü¸Ä·ÖÇøÉèÖò¢±£´æÍ˳öfdiskÖ®ºó£¬»¹ÐèÒª¼ì²éϵͳÖÐÊÇ·ñ¾ßÓжÔÓ¦µÄÉ豸Îļþ£¬±ØÐëÔÚ/devĿ¼ÏÂÓµÓÐÏàÓ¦µÄÉ豸Îļþ²ÅÄÜ·ÃÎÊÎïÀíÉ豸¡£
¡¡¡¡»®·ÖÁËUFS»ù±¾·ÖÇøÖ®ºó£¬¾Í¿ÉÒÔʹÓÃdisklabel´´½¨Îļþϵͳ»ò½»»»¿Õ¼äµÄdisklabelÁË£¬ÎªÁË·½±ãÆð¼û£¬¿ÉÒÔÏÈΪÕâ¸ö·ÖÇø½¨Á¢¿ÕµÄdisklabel£¬È»ºóÔÙ½øÐÐÐ޸ġ£
ÒýÓÃ:# disklabel -r -w wd1s3 auto
# disklabel -e wd1s3
¡¡¡¡ÔÚʹÓÃ-w²ÎÊýΪ·ÖÇøwd1s3Éú³ÉȱʡµÄdisklabelʱ£¬¾Í±ØÐë¸ø¶¨´ÅÅ̵ÄÀàÐÍ£¬Í¨³£¿ÉÒÔʹÓÃauto £¬ÈÃϵͳ×Ô¶¯¼ì²â¡£³ýÁË×Ô¶¯Õì²âÖ®Í⣬ÔÚ/etc/disktabÎļþÖÐÒ²¸ø³öÁ˺ܶà±ê×¼´ÅÅÌÀàÐÍÊý¾Ý£¬ÕâЩÊý¾ÝÖаüÀ¨°üÀ¨ÈíÅÌÔÚÄڵĸ÷ÖÖ´ÅÅÌÀàÐÍ£¬¶ÔÓÚÕâ¸öÎļþÖв»´æÔÚµÄÐÂÐÍ´ÅÅÌ£¬¿ÉÒÔ¸ù¾ÝÔÓÐÀàÐͽøÐÐÐ޸ĶøÉú³ÉÐÂÊý¾Ý¡£Í¨³£ºÜÉÙÐèÒªÀûÓÃÕâ¸öÎļþÖÐÌṩµÄ´ÅÅÌÀàÐÍÊý¾ÝÀ´Éú³Édisklabel£¬Ê¹ÓÃauto²ÎÊýÄÜÈÃϵͳ×Ô¶¯¼ì²â´ÅÅ̵ÄÀàÐÍ¡£¼«ÉÙÊýÇé¿öÏ£¬ÀýÈçÔÚÅäÖÃα´æ´¢É豸vnµÄʱºò£¬²ÅÐèҪʹÓþßÌå´ÅÅÌÀàÐͲÎÊý¡£
¡¡¡¡Ö±½ÓÉú³ÉµÄdisklabel½ö½ö°üÀ¨´ÅÅ̵ÄÀàÐÍÐÅÏ¢£¬ÒÔ¼°Ò»¸öʹÓÃc±íʾÕû¸öϵͳ·ÖÇøµÄ¿Õdisklabel £¬¶øûÓоßÌåÎļþϵͳµÄdisklabel¡£ÒªÕæÕý»®·ÖÎļþϵͳ£¬ÐèÒªÔÙʹÓÃdisklabel -e±à¼¸ü¸Ädisklabel ÅäÖã¬ÀýÈçÔö¼ÓÁ½¸ö×Ó·ÖÇø£¬bºÍe£¬¾ÍÐèҪΪbÉèÖÃÀàÐÍswapµÄdisklabel£¬ÎªeÉèÖÃÀàÐÍ4.2BSDµÄdisklabel£¬¶øcʹÓõÄunusedÀàÐͱíʾÕâ¸ödisklabel²»ÓÃ×öÎļþϵͳ»ò½»»»¿Õ¼ä£¬¿ÉÓÃÓÚÌض¨Ä¿µÄ£¬Èçraw·½Ê½´æÈ¡Ó²ÅÌ¡£
¡¡¡¡×¢ÒâÓÉÓÚҪʹÓÃÊÖ¹¤¼ÆËãÎļþϵͳµÄ´óС£¬Òò´ËºÜÈÝÒ×·¢ÉúÖصþµÈ´íÎ󡣸÷¸ö²»Í¬¿Õ¼äµÄdisklabelÔÊÐíÖصþ£¬ÀýÈçȱʡ²úÉúµÄÒÔc´ú±íµÄdisklabel±íʾÕû¸öFreeBSDϵͳ·ÖÇø¾Í»áÓëÆäËûdisklabelµÄ¿Õ¼äÖصþ¡£µ«ÊǾßÌåÓÃ×öÎļþϵͳ»ò½»»»¿Õ¼äµÄ²¿·Ö¾Í²»ÄÜÖصþ£¬·ñÔò»áµ¼Ö´æÈ¡´íÎó·¢Éú¡£
¡¡¡¡±£´æÍ˳öºó£¬¾Í¿ÉÒÔʹÓÃdisklabel -r wd1s1À´²é¿´Ð½¨µÄ´ú±íÎļþϵͳ»ò½»»»¿Õ¼äµÄlabel ¡£ÏÂÃæΪÔö¼ÓÖ®ºóµÄdisklabelµÄ×îºóÒ»²¿·Ö¡£
ÒýÓÃ:# size offset fstype [fsize bsize bps/cpg]
b: 61440 0 swap
c: 409536 0 unused 0 0
e: 348096 61440 4.2BSD 0 0 0
È»ºóÔÚн¨µÄdisklabelΪ4.2BSDÀàÐ͵ĿռäÉÏÕæÕý½¨Á¢Îļþϵͳ£¬ÐèҪʹÓÃnewfsÃüÁî¡£
ÒýÓÃ:# newfs /dev/rwd1s1e
Ö´ÐÐfsck¼ì²é¸Õ½¨Á¢µÄ´ÅÅÌ·ÖÇøÓÐÎÞ´íÎó
ÒýÓÃ:# fsck -y /dev/rwd1s1e
È»ºó¾Í¿ÉÒÔ½«Õâ¸ö½¨Á¢ºÃµÄÎļþϵͳ°²×°µ½ÏµÍ³ÖÐÁË£¬Èç¹û½¨Á¢µÄÊǽ»»»¿Õ¼ä£¬¿ÉÒÔʹÓÃswaponÃüÁî¿Éʹ¸Ã½»»»·ÖÇøÁ¢¼´ÉúЧ¡£
# mount /dev/wd1s1e /mnt
# swapon /dev/wd1s1b
¡¡¡¡ÎªÁËÔÚÆô¶¯Ê±×Ô¶¯°²×°ÉÏÕâ¸öÎļþϵͳ£¬ÐèÒª±à¼/etc/fstabÎļþ£¬½«ÎļþϵͳºÍ½»»»É豸¼ÓÈëϵͳ£¬ÄÇôÏ´ÎϵͳÆô¶¯Ö®ºó£¬¾ÍÄÜʹÓÃеĴÅÅÌ·ÖÇøºÍеĽ»»»É豸ÁË¡£ÀýÈçдÅÅÌΪwd1£¬ÏàÓ¦FreeBSDµÄ·ÖÇøΪwd1s3e £¨Îļþϵͳ£©ºÍwd1s3b£¨½»»»·ÖÇø£©£¬ÎļþϵͳҪ°²×°µ½ÏµÍ³µÄ/disk2Ŀ¼Ï£¬ÔòfstabӦΪ£º
ÒýÓÃ:# Device Mountpoint FStype Options Dump Pass#
/dev/wd0s3b none swap sw 0 0
/dev/wd0s3a / ufs rw 1 1
/dev/wd0s3f /usr ufs rw 2 2
/dev/wd0s3e /var ufs rw 2 2
proc /proc procfs rw 0 0
/dev/wd1s1e /cdrom cufs rw 2 2
/dev/wd1s1b none swap sw 0 0
¡¡¡¡È»ºó¾Í¿ÉÒÔʹÓÃÐÂÓ²ÅÌÀ´µ÷Õû¿Õ¼ä½ôÕŵĴÅÅÌÉϵÄÎļþºÍĿ¼¡£´Ëʱ£¬³ýÁË¿ÉÒÔʹÓ÷ûºÅÁ¬½ÓÕâÖÖ·½Ê½Ö®Í⣬»¹¿ÉÒÔÖ±½Ó½«¸Ãн¨µÄÎļþϵͳ°²×°µ½ÐèÒªµÄĿ¼Ï¡£ÕâÒ²ÊÇÍƼöµÄ·½Ê½£¬ÒòΪ·ûºÅÁ¬½Ó»á¶ÔÎļþ²Ù×÷µÄÐÔÄÜÔì³ÉÉÙÐíÓ°Ïì¡£
ÒýÓÃ:# cd /usr
# mv local local.old
# mkdir local
# mount /dev/wd1s1e /usr/local
# mv /usr/local.old/* /usr/local/
tao_victor ÓÚ 2006-11-14 09:38:12·¢±í:
ÒѶÁ~~лл