ÆÊÎöLinux MBRµÄ½ç˵ºÍ¹¦Ð§
Linux MBRµÄ½ç˵ºÍ×÷ÓÃ
ÔÚLinuxϵͳÖУ¬MBR£¨Master Boot Record£¬Ö÷Ö¸µ¼¼Í¼£©ÊÇÒ»¸öºÜÊÇÖ÷ÒªµÄ²¿·Ö£¬ËüλÓÚÓ²Å̵ĵÚÒ»¸öÉÈÇø£¬Õ¼ÓÐÁË512¸ö×ֽڵĿռ䡣MBRµÄ×÷ÓÃÊÇÔÚÅÌËã»úÆô¶¯Ê±Ìṩָµ¼³ÌÐò£¬×ÊÖúϵͳ¼ÓÔزÙ×÷ϵͳ¡£
MBRµÄ½á¹¹
MBRµÄ½á¹¹ÈçÏ£º
Ö¸µ¼´úÂëÇø£¨446×Ö½Ú£©£ºÕⲿ·Ö°üÀ¨Ö¸µ¼¼ÓÔسÌÐòµÄ´úÂ룬ÈÏÕæÆô¶¯²Ù×÷ϵͳ¡£
·ÖÇø±í£¨64×Ö½Ú£©£º·ÖÇø±í¼Í¼ÁËÓ²ÅÌÉϵķÖÇøÐÅÏ¢£¬°üÀ¨Ã¿¸ö·ÖÇøµÄÆðʼλÖᢾÞϸ¡¢·ÖÇøÀàÐ͵ȡ£
ÊðÃû£¨2×Ö½Ú£©£º×îºóÁ½¸ö×Ö½ÚÓÃÀ´´æ·Å±êʶ·û 0x55AA£¬ÌåÏÖÕâÊÇÒ»¸öÓÐÓõÄMBR¡£
MBRµÄ×÷ÓÃ
ÔÚÅÌËã»úÆô¶¯Ê±£¬BIOS»á¼ÓÔØÓ²Å̵ÄMBRµ½ÄÚ´æÖÐÖ´ÐС£MBRÖеÄÖ¸µ¼¼ÓÔسÌÐò»á¶ÁÈ¡·ÖÇø±í£¬ÕÒµ½Ô˶¯·ÖÇø£¨Active Partition£©²¢¼ÓÔظ÷ÖÇøµÄÖ¸µ¼ÉÈÇø£¬´Ó¶øÆô¶¯²Ù×÷ϵͳ¡£
ÏÖʵ²Ù×÷ÑÝʾ
ÏÂÃæͨ¹ýÒ»¸ö¼òÆÓµÄÏÖʵ²Ù×÷À´ÑÝʾÔõÑùÉó²éºÍÐÞ¸ÄLinuxϵͳÖеÄMBR¡£
Éó²éMBR
sudo dd if=/dev/sda of=mbr_backup bs=512 count=1 hexdump -C mbr_backup
µÇ¼ºó¸´ÖÆ
ͨ¹ýÉÏÃæµÄÏÂÁÎÒÃǽ«Ó²ÅÌsdaµÄMBR±¸·Ýµ½Ò»¸öÎļþÖУ¬²¢Í¨¹ýhexdumpÏÂÁîÉó²éÎļþµÄÄÚÈÝ¡£Äã¿ÉÒÔ¿´µ½MBRµÄ½á¹¹ÒÔ¼°ÄÚÀï´æ·ÅµÄÄÚÈÝ¡£
ÐÞ¸ÄMBR
sudo fdisk /dev/sda Command (m for help): a Partition number (1-4): 1 Command (m for help): w
µÇ¼ºó¸´ÖÆ
ÉÏÃæµÄÏÂÁîʹÓÃfdisk¹¤¾ßÀ´±à¼Ó²ÅÌsdaµÄ·ÖÇø±í£¬½«µÚÒ»¸ö·ÖÇøÉèÖÃΪÔ˶¯·ÖÇø¡£ÕâÑù¿ÉÒÔÐÞ¸ÄMBRÖмͼµÄÔ˶¯·ÖÇø£¬´Ó¶ø¸Ä±äϵͳÆô¶¯Ê±¼ÓÔصIJÙ×÷ϵͳ¡£
×ܽá
MBR×÷ΪÅÌËã»úÆô¶¯µÄµÚÒ»µÀÃÅ£¬¶ÔϵͳµÄÆô¶¯Àú³ÌÖÁ¹ØÖ÷Òª¡£Í¨¹ýÏàʶMBRµÄ½á¹¹ºÍ×÷Óã¬ÎÒÃÇÄܹ»¸üºÃµØÃ÷ȷϵͳÆô¶¯µÄÁ÷³Ì£¬ÒÔ¼°ÔÚÐëÒªµÄʱ¼ä¾ÙÐе÷½âºÍÐÞ¸´¡£Ï£Íû±¾ÎĶÔÄãÓÐËù×ÊÖú£¬Ò²½Ó´ý¸÷È˼ÌÐøÉîÈëѧϰºÍ̽Ë÷¡£
½¨Ò飺ÔÚ²Ù×÷MBRʱһ¶¨ÒªÉóÉ÷£¬²Ù×÷ʧÎó¿ÉÄܻᵼÖÂϵͳÎÞ·¨Æô¶¯»òÊý¾Ýɥʧ£¬ÇëÎñ±Ø±¸·ÝÖ÷ÒªÊý¾Ý²¢ÉóÉ÷²Ù×÷¡£
ÒÔÉϾÍÊÇÆÊÎöLinux MBRµÄ½ç˵ºÍ¹¦Ð§µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡