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

  • 相关阅读:
    PBRT笔记(3)——KD树
    PBRT笔记(2)——BVH
    PBRT笔记(1)——主循环、浮点误差
    《Ray Tracing in One Weekend》、《Ray Tracing from the Ground Up》读后感以及光线追踪学习推荐
    在Node.js中使用ffi调用dll
    Node.js c++ 扩展之HelloWorld
    在Qt中配置TBB以及简单实用
    对《将Unreal4打包后的工程嵌入到Qt或者桌面中》一文的补充
    QtQuick大坑笔记之Http的Get与Post操作(带cookie)
    QtQuick自定义主题以及控件样式指引
  • 原文地址:https://www.cnblogs.com/IvanChen/p/5183998.html
Copyright © 2011-2022 走看看