×ðÁú¿­Ê±¹ÙÍøµÇ¼

Linux MBR£ºÆô¶¯Ö¸µ¼³ÌÐòµÄ»ù±¾¹¦Ð§


Linux MBR£ºÆô¶¯Ö¸µ¼³ÌÐòµÄ»ù±¾×÷Óà £¬ÐèÒªÏêϸ´úÂëʾÀý

ÔÚÅÌËã»úµÄÆô¶¯Àú³ÌÖÐ £¬Master Boot Record£¨MBR £¬Ö÷Ö¸µ¼¼Í¼£©ÊÎÑÝ×ÅÖÁ¹ØÖ÷ÒªµÄ½ÇÉ«¡£MBRÊÇ´æ´¢ÔÚÓ²Å̵ĵÚÒ»¸öÉÈÇøÖеÄһС¶Î³ÌÐò £¬Ëü°üÀ¨ÁËÖ¸µ¼¼ÓÔسÌÐòºÍ·ÖÇø±íµÈÐÅÏ¢¡£µ±ÅÌËã»úÆô¶¯Ê± £¬BIOS»áÊ×ÏȼÓÔØMBR £¬È»ºóÖ´ÐÐÆäÖеÄÖ¸µ¼¼ÓÔسÌÐò £¬´Ó¶øÖ¸µ¼²Ù×÷ϵͳµÄ¼ÓÔØ¡£

MBRµÄ»ù±¾×÷Óãº

Ö¸µ¼¼ÓÔسÌÐò£ºMBRÖаüÀ¨ÁËÖ¸µ¼¼ÓÔسÌÐò £¬¸Ã³ÌÐòÈÏÕæ¼ÓÔزÙ×÷ϵͳµÄÄںˡ£ÔÚLinuxϵͳÖÐ £¬Ö¸µ¼¼ÓÔسÌÐòͨ³£ÊÇGRUB£¨GRand Unified Bootloader£©¡£

·ÖÇø±íÐÅÏ¢£ºMBRÖл¹°üÀ¨ÁËÓ²Å̵ķÖÇø±íÐÅÏ¢ £¬¼Í¼ÁËÓ²Å̵ķÖÇø½á¹¹ÇéÐÎ £¬×ÊÖúÖ¸µ¼¼ÓÔسÌÐòÕÒµ½²Ù×÷ϵͳËùÔڵķÖÇø¡£

Æô¶¯²Ù×÷ϵͳ£ºÍ¨¹ýÖ¸µ¼¼ÓÔسÌÐò £¬MBRÄܹ»×¼È·µØÆô¶¯²Ù×÷ϵͳ £¬ÎªÓû§ÌṩÅÌËã»úµÄʹÓÃÇéÐΡ£

ÏÂÃæÎÒÃÇÀ´¿´Ò»¸ö¼òÆÓµÄLinux MBRµÄ´úÂëʾÀý£º

´úÂëʾÀý£º

section .text
    global _start

_start:
    jmp main

print_string:
    mov ah, 0x0E
    mov bh, 0x00
    xor bl, bl

print_loop:
    lodsb
    test al, al
    jz print_done

    int 0x10
    jmp print_loop

print_done:
    ret

main:
    mov si, hello_message
    call print_string

    jmp $

hello_message db "Welcome to Linux MBR!", 0x0D, 0x0A, 0

times 510-($-$$) db 0
dw 0xAA55

µÇ¼ºó¸´ÖÆ

ÒÔÉÏÊÇÒ»¸ö¼òÆӵĻã±à´úÂëʾÀý £¬ÓÃÓÚÔÚÅÌËã»úÆô¶¯Ê±ÏÔʾһÌõ½Ó´ýÐÂÎÅ¡£¸ÃʾÀýʵÏÖÁË´ÓMBR¼ÓÔØ´úÂëµ½ÆÁÄ»´òÓ¡½Ó´ýÐÂÎŵĹ¦Ð§¡£

×ܽ᣺

LinuxµÄMBRÔÚÅÌËã»úÆô¶¯Àú³ÌÖÐÊÎÑÝ×Ų»¿É»òȱµÄ½ÇÉ« £¬ÈÏÕæÖ¸µ¼²Ù×÷ϵͳµÄ¼ÓÔØ¡£Í¨¹ýÒÔÉÏ´úÂëʾÀý £¬ÎÒÃÇ¿ÉÒÔÆðÔ´ÏàʶMBRµÄ»ù±¾×÷ÓúÍʵÏÖ·½·¨¡£ÉîÈëѧϰºÍÃ÷È·MBRµÄÔ­Àí £¬ÓÐÖúÓÚÎÒÃǸüºÃµØÃ÷È·ÅÌËã»úÆô¶¯Àú³ÌºÍ²Ù×÷ϵͳ¼ÓÔØÀú³Ì¡£

ÒÔÉϾÍÊÇLinux MBR£ºÆô¶¯Ö¸µ¼³ÌÐòµÄ»ù±¾¹¦Ð§µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ