the linux MBR partition is located in the beginning of a hard drive, occupying the first 446 bytes of the physical drive. It contains the master boot record, partition table, and boot loader code. Knowing how to parse the partition table can come in handy when trying to manage your system’s disks.
10年积累的成都网站设计、网站制作经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先做网站设计后付款的网站建设流程,更有金塔免费网站建设让你可以放心的选择与我们合作。
The master boot record (MBR) of the Linux partition contains a crucial piece of information — the partition table. This table is a list of four 16-byte entries that describe the location and size of four primary partitions on the disk. Each entry contains an 8-bit partition status field, a 3-byte partition type field, and a 4-byte LBA start field. The first partition in the table is always considered active and its status field will be set to ‘0x80’. The remaining three partitions have their status set to ‘0x00’.
The partition type field identifies the type of filesystem used on the partition. Common partition types include ‘0xaa’ for BSD, ‘0x81’ for Linux, ‘0xc1’ for Windows, and ‘0xf2’ for OS/2. The last field, the LBA start field, is a 4-byte, little-endian number that identifies the start of the partition in blocks of 512 bytes.
To parse the partition table and obtain the partition information, a Linux user should use a tool such as fdisk. fdisk will read the MBR and display the partition information. It also provides an interface for manipulating the entries in the partition table.
To list the partition information, run the command `fdisk -l`. The output should look similar to:
“`
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 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
Disklabel type: dos
Disk identifier: 0x000d8423
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 39065599 39063552 18.6G 83 Linux
/dev/sda2 39065600 90591994 51526395 24.5G 5 Extended
/dev/sda3 90591999 195352575 84760377 40.5G 8e Linux LVM
/dev/sda5 39065664 90591994 51526321 24.5G 8a Linux
This output shows the device, the partition type (e.g. Linux, Windows, etc), the start and end sectors, the size of the partition, and the partition id.
Parsing the Linux MBR partition allows a user to manage their system's disks and identify partitions. A good tool to use is fdisk, which will read the MBR and display the partition information. With this information, a user can make an educated decision on how to manage the system disks.
成都网站设计制作选创新互联,专业网站建设公司。
成都创新互联10余年专注成都高端网站建设定制开发服务,为客户提供专业的成都网站制作,成都网页设计,成都网站设计服务;成都创新互联服务内容包含成都网站建设,小程序开发,营销网站建设,网站改版,服务器托管租用等互联网服务。
分享题目:解析Linux MBR分区的深奥之处(linux分区mbr)
网站URL:http://www.shufengxianlan.com/qtweb/news13/97663.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联