zoukankan      html  css  js  c++  java
  • MBR(Master Boot Record)主引导记录分析

    root@ubuntu1404:/home/chen# fdisk -l /dev/sda1
    
    Disk /dev/sda1: 254 MB, 254803968 bytes
    255 heads, 63 sectors/track, 30 cylinders, total 497664 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/sda1 doesn't contain a valid partition table
    root@ubuntu1404:/home/chen# fdisk -l /dev/sda5
    
    Disk /dev/sda5: 21.2 GB, 21216886784 bytes
    255 heads, 63 sectors/track, 2579 cylinders, total 41439232 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/sda5 doesn't contain a valid partition table

    存贮字节位 内容及含义
    第0字节 引导标志。若值为80H表示活动分区,若值为00H表示非活动分区。
    第1,2,3字节 本分区的起始磁头号、扇区号、柱面号。其中:磁头号——第1字节;
    扇区号——第2字节的低6位;
    柱面号——为第2字节高2位+第3字节8位。
    第4字节 分区类型符。00H——表示该分区未用(即没有指定);
    06H——FAT16基本分区;
    0BH——FAT32基本分区;
    05H——扩展分区;
    07H——NTFS分区;
    0FH——(LBA模式)扩展分区(83H为Linux分区等)。
    第5,6,7字节 本分区的结束磁头号、扇区号、柱面号。其中:磁头号——第5字节;
    扇区号——第6字节的低6位;
    柱面号——第6字节的高2位+第7字节。
    第8,9,10,11字节 本分区之前已用了的扇区数。
    第12,13,14,15字节 本分区的总扇区数。

    注: 上图中的"Sector in partition 1=497664"对应的是"00 98 07 00", 查了资料, 超过1字节的数据, 实际应该对应"00 07 98 00"(好比镜像了一下)

    Total = 446Byte + 64Byte + 2Byte

  • 相关阅读:
    算法总结——二分法(binary-search)
    Codeforces Round #296 (Div. 2)——B——Error Correct System
    Codeforces Round #296 (Div. 2)——A——Playing with Paper
    广工校赛——GCD,LCM——我是好人
    广工校赛——并查集——变形金刚
    广工校赛——DP——悦动达人
    广工校赛——slamdunk正在做菜
    广工校赛——LCS——完美串
    区间DP——石子合并问题
    贪心 Codeforces Round #109 (Div. 2) B. Combination
  • 原文地址:https://www.cnblogs.com/IvanChen/p/5183998.html
Copyright © 2011-2022 走看看