当前位置: 首页 > news >正文

武昌网站建设价格多少网络推广怎么学

武昌网站建设价格多少,网络推广怎么学,网站建设大德通,wordpress和zblog收录文章目录 GUID以及分区表MBR分区方案GPT 分区方案GPT分区表结构 GPT分区表LBALBA0(MBR兼容部分)LBA1LBA 2-33python生成GPT分区表gpt分区表实例 gpt分区表查看查看百问网T113-s3固件查看友善之臂nanopi-m1-plus官方固件查看荣品RV1126固件查看f1c200s固件…

文章目录

  • GUID以及分区表
    • MBR分区方案
    • GPT 分区方案
    • GPT分区表结构
  • GPT分区表LBA
    • LBA0(MBR兼容部分)
    • LBA1
    • LBA 2-33
    • python生成GPT分区表
    • gpt分区表实例
  • gpt分区表查看
    • 查看百问网T113-s3固件
    • 查看友善之臂nanopi-m1-plus官方固件
    • 查看荣品RV1126固件
    • 查看f1c200s固件
    • 查看V3s的SD启动卡

原文:http://www.pedestrian.com.cn/embedded/gpt/gpt_partition.html

 GPT分区表中有一个比较重要的概念是LBA, 翻译为中文可解释为逻辑区块地址。是描述存储设备上数据所在区块的通用机制,一般用在硬盘或者SD卡这种记忆设备,我们俗称扇区。

  • MBR:主引导记录(Master Boot Record)
  • GPT:GUID分区表(GUID Partition Table)
  • GUID:全局唯一标识符(Globally Unique Identifier),是一种由算法生成的二进制长度为16字节(128位)的数字标识符。通常表示成32个16进制数字(0-9,A-F)组成的字符串,GUID 的格式为“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”。例如:6F9619FF-8B86-D011-B42D-00C04FC964FF 即为有效的 GUID 值。

GUID以及分区表

MBR分区方案

 传统的分区方案是将分区信息保存在磁盘的第一个扇区中的64个字节中,每个分区项占16个字节。由于MBR扇区只有64个字节用于分区表,所以只能记录4个分区信息,这就是硬盘主分区数目 不能超过4个的原因,后来为了支持更多的分区引入了扩展分区及逻辑分区的概念,但每个分区项仍用16个字节存储。

 MBR分区有一个比较大的缺陷是不能支持超过2T容量的磁盘,因为这一方案用4个字节存储分区的总扇区数,最大能表示2的32次方的扇区个数,按每个扇区512字节计算,每个分区最大不能超过2T。

计算机硬盘分区:
 MBR(Main Boot Record 主引导记录区)位于整个硬盘的0磁道0柱面1扇区。在512字节的主引导扇区中,MBR只占用了其中的446个字节,另外的64个字节交给了 DPT(Disk Partition Table硬盘分区表),最后两个字节“55,AA”是分区的结束标志。这个整体构成了硬盘的主引导扇区。

主引导扇区由三个部分组成:主引导记录(MBR,Master Boot Record)、硬盘分区表(DPT,Disk Partition Table)、引导记录标志(或者说结束标志)(BRID,Boot Record ID)。

在这里插入图片描述

主引导扇区大小是512字节,其中MBR占据446个字节,DPT占据64字节,BRID占据两个字节。
在这里插入图片描述

相对来说复杂一些。

嵌入式Linux SD启动卡:

地址描述长度(Byte)
0代码区440(最大446)
440选用磁盘标志4
444一般为空值: 0x00002
446标准MBR分区规划(第一个主分区入口)16
462标准MBR分区规划(第二个主分区入口)16
478标准MBR分区规划(第三个主分区入口)16
494标准MBR分区规划(第四个主分区入口)16
510MBR有效标志2

全志V3s的SD卡固件
在这里插入图片描述

数据起始字节数长度描述
08 4F 8A 2B4404标志
00 004442空值
下图红色框区域44616分区表
下图绿色框区域46216分区表
55 AA5102标志

在这里插入图片描述
16字节分区表描述

偏移长度(字节)意义
00H1分区状态:00–>非活动分区;80–>活动分区;其它数值没有意义
01H1分区起始磁头号(HEAD),用到全部8位
02H2分区起始扇区号(SECTOR),占据02H的位0-5;该分区的起始磁柱号(CYLINDER),占据02H的位6-7和03H的全部8位
04H1文件系统标志位
05H1分区结束磁头号(HEAD),用到全部8位
06H2分区结束扇区号(SECTOR),占据06H的位0-5;该分区的结束磁柱号(CYLINDER),占据06H的位6-7和
08H4分区起始相对扇区号
0CH4分区总的扇区数

在这里插入图片描述

软件winhex中在ANSI ASCII区域下拉菜单中选择“分区表(模板)”,可以获取该部分一些信息。
在这里插入图片描述
有两个分区信息。

不是绝对的是在百问网T113-s3的固件里面(如下)地址440~445就没有数据。
在这里插入图片描述
总结

  • ARM开发板的启动卡的MBR,前0~440字节区域都是0,计算机MBR的这块区域有大量的数据和代码。
  • MBR的446~510字节区域,ARM开发板和计算机的都是一样的。四个16字节的分区描述区域(DPT)。

GPT 分区方案

 GUID分区表(简称GPT)是源自EFI标准的一种新的磁盘分区表结构的标准。相较于mbr有以下优点:

  1. 支持2TB 以上的磁盘。
  2. 分区表自带备份,在磁盘的收尾部分分别保存了一份相同的分区表,其中一份被破坏后可通过另一份恢复。
  3. 增加CRC校验机制。
  4. GPT使用一个16字节的全局唯一标识符(guid)来标识分区类型,这使分区类型不容易冲突
  5. 每个分区可以有一个名称。

GPT分区表结构

  • LBA:逻辑区块地址
    在这里插入图片描述

从上图可以看到的是,GPT 的结构是有着 主备两部分的,

  • 上面有Primary GUID Partition(主区),下面有Backup GUID Partition(备用区)。
  • 跟现代的MBR一样,GPT也使用LBA(Logical Block Address,逻辑区块地址)取代了早期的CHS寻址方式。传统MBR信息仅存储于LBA 0,而GPT使用了34个LBA,GPT头存储于LBA 1,接下来才是分区表本身。
  • GPT的每一个分区都可以独立存在,没有所谓的扩展、逻辑分区的概念,即所有分区都是主分区。

GPT分区表LBA

下图是百问网T113-s3(双核ARM A7)的固件:
在这里插入图片描述

  • 可以看出红框内就是一个典型的MBR数据块,这个应该就是LBA0(MBR兼容部分)。
  • 绿框内的前八个字节是"EFI PART",代表这是一个LBA区域。

LBA0(MBR兼容部分)

 在GPT分区表的最开头处,由于兼容性考虑仍然存储了一份传统的MBR,这个MBR叫做保护性
MBR(protective MBR)。在这个MBR中只有一个标识为0xEE的分区,以此来表示这块磁盘使用GPT分区表。

LBA1

分区表头(LBA1)定义了磁盘的可用空间以及组成分区的大小和数量,分区表头结构的详细信息如下

起始字节偏移量内容
08签名(“EFI PART”)
84修订
124分区表头的大小
164分区表头(92字节)的CRC32校验,在计算时先把这个字段写作0处理
204保留,必须是0
248当前LBA(这个分区表头的位置)
328备份LBA(另一个分区表头的位置)
408第一个可用于分区的LBA(主分区表的最后一个LBA+1)
488最后一个可用于分区的LBA(备份分区表的第一个LBA‐1)
5616磁盘GUID(在类unix系统中也叫UUID)
728分区表项的起始LBA(在主分区中是2)
804分区表的数量(windows是128,没用这么多页先占用空间)
844一个分区表项的大小
884分区表项的CRC32校验(计算的是所有分区表项的校验和即128*128字节)
92420保留,剩余字节必须是0(420是针对512字节的LBA磁盘)

LBA 2-33

LBA2‐33的位置存放的是分区表项,分区表项的结构如下

起始字节偏移量内容
016分区类型GUID
1616分区GUID
328起始LBA(小端格式)
408末尾LBA
488属性标签
5272分区名

GUID为固定值,以下列举常见几种

在这里插入图片描述在这里插入图片描述

分区属性:低位4字节表示与主分区类型无关的属性,高位4字节表示与主分区类型有关的属性

BIT解释
0系统分区
1EFI隐藏分区
2传统的BIOS的可引导分区标志
60只读
62隐藏
63不自动挂载,也就是不自动分配盘符

python生成GPT分区表

使用python脚本生成gpt分区表

gen_gpt.py

#!/usr/bin/env python2import binascii
import uuid
from struct import pack, unpackimport sysOS_TYPES = {0x00: 'Empty',0xEE: 'GPT Protective',0xFF: 'UEFI System Partition'
}PARTITION_TYPE_GUIDS = {'024DEE41-33E7-11D3-9D69-0008C781F39F': 'Legacy MBR','C12A7328-F81F-11D2-BA4B-00A0C93EC93B': 'EFI System Partition','21686148-6449-6E6F-744E-656564454649': 'BIOS boot partition','0FC63DAF-8483-4772-8E79-3D69D8477DE4': 'Linux filesystem data','4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709': 'Root partition (x86-64)','0657FD6D-A4AB-43C4-84E5-0933C84B4F4F': 'Swap partition','7C3457EF-0000-11AA-AA11-00306543ECAC': 'Apple APFS'
}def decode_guid(guid_as_bytes):return uuid.UUID(bytes_le=guid_as_bytes)def nts_to_str(buf):s = buf.decode('utf-16')return s.split('\0', 1)[0]def decode_gpt_partition_type_guid(guid):if isinstance(guid, uuid.UUID):guid = str(guid)guid = guid.upper()return PARTITION_TYPE_GUIDS.get(guid, "?")def decode_gpt_partition_entry_attribute(attribute_value):r = []if (attribute_value & 0x1):r.append("Requitted Partition")if (attribute_value & 0x2):r.append("No Block Io Protocal")if (attribute_value & 0x4):r.append("Legacy BIOS Bootable")return rdef decode_gpt_partition_entry(data):(partition_type_guid,unique_partition_guid,starting_lba,ending_lba,attributes,partition_name) = unpack('< 16s 16s Q Q Q 72s', data[0:128])return GPTPartitionEntry(partition_type_guid,unique_partition_guid,starting_lba,ending_lba,attributes,partition_name)def encode_gpt_partition_entry(gpt_partition_entry):  data = pack('<16s 16s Q Q Q 72s',gpt_partition_entry.partition_type_guid_raw,gpt_partition_entry.unique_partition_guid_raw, gpt_partition_entry.starting_lba,        gpt_partition_entry.ending_lba,        gpt_partition_entry.attributes_raw,gpt_partition_entry.partition_name_raw)return datadef encode_gpt_partition_entry_array(gpt_partition_entries, size, count):data  = bytearray()for i in range(0, count):d = encode_gpt_partition_entry(gpt_partition_entries[i])data.extend(d)if len(d) < size:data.extend(bytearray(size - len(d)))return bytes(data)def calculate_partition_entry_array_crc32(data):return binascii.crc32(data) & 0xffffffffclass GPTPartitionEntry():def __init__(self,partition_type_guid,unique_partition_guid,starting_lba,ending_lba,attributes,partition_name):self.partition_type_guid_raw = partition_type_guidself.partition_type_guid = decode_guid(partition_type_guid)self.partition_type = decode_gpt_partition_type_guid(self.partition_type_guid)self.unique_partition_guid_raw = unique_partition_guidself.unique_partition_guid = decode_guid(unique_partition_guid)self.starting_lba = starting_lbaself.ending_lba = ending_lbaself.attributes_raw = attributesself.attributes = decode_gpt_partition_entry_attribute(attributes)self.partition_name_raw =  partition_nameself.partition_name = nts_to_str(partition_name)def is_empty(self):return all(x == 0 for x in self.partition_type_guid_raw)class GPTheader():def __init__(self,signature,revision,header_size,header_crc32,reserved,my_lba,alternate_lba,first_usable_lba,last_usable_lba,disk_guid,partition_entry_lba,number_of_partition_entries,size_of_partition_entry,partition_entry_array_crc32):self.signature = signatureself.revision = revisionself.header_size = header_sizeself.header_crc32 = header_crc32self.reserved = reservedself.my_lba = my_lbaself.alternate_lba = alternate_lbaself.first_usable_lba = first_usable_lbaself.last_usable_lba = last_usable_lbaself.disk_guid = disk_guidself.partition_entry_lba = partition_entry_lbaself.number_of_partition_entries = number_of_partition_entriesself.size_of_partition_entry = size_of_partition_entryself.partition_of_entry_array_crc32 = partition_entry_array_crc32 def is_valid(self):return self.signature == 'EFI PART'.encode('ascii')def calculate_header_crc32(self):header_crc32_input = pack('<8s 4s I I 4s Q Q Q Q 16s Q I I I',self.signature,self.revision,self.header_size,0,self.reserved,self.my_lba,self.alternate_lba,self.first_usable_lba,self.last_usable_lba,self.disk_guid,self.partition_entry_lba,self.number_of_partition_entries,self.size_of_partition_entry,self.partition_entry_array_crc32)return binascii.crc32(header_crc32_input) & 0xffffffffdef encode_gpt_header(gpt_header):data = pack('< 8s 4s I I 4s Q Q Q Q 16s Q I I I',gpt_header.signature,gpt_header.revision,gpt_header.header_size,gpt_header.header_crc32,gpt_header.reserved,gpt_header.my_lba,gpt_header.alternate_lba,gpt_header.first_usable_lba,gpt_header.last_usable_lba,gpt_header.disk_guid,gpt_header.partition_entry_lba,gpt_header.number_of_partition_entries,gpt_header.size_of_partition_entry,gpt_header.partition_entry_array_crc32)return datadef decode_gpt_header(gpt_header):(signature,revision,header_size,header_crc32,reserved,my_lba,alternate_lba,first_usable_lba,last_usable_lba,disk_guid,partition_entry_lba,number_of_partition_entrires,size_of_partition_entry,partition_entry_array_crc32) = unpack('< 8s 4s I I 4s Q Q Q Q 16s Q I I I',data[0:92])gpt_header = GPTheader(signature,revision,      header_size,      header_crc32,reserved,my_lba,alternate_lba,first_usable_lba,last_usable_lba,disk_guid,partition_entry_lba,      number_of_partition_entries,size_of_partition_entry,partition_entry_array_crc32)return gpt_headerdef create_empty_gpt_entry():partition_type_guid = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"unique_partition_guid = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"starting_lba = 0ending_lba = 0attributes = 0partition_name = "\x00\x00".encode('utf-16')[2:]print(partition_name)entry = GPTPartitionEntry(partition_type_guid, unique_partition_guid,starting_lba,ending_lba,attributes,partition_name)return entrydef create_gpt_entry(start_lba, end_lba, name):partition_type_guid = uuid.uuid4().bytesunique_partition_guid = uuid.uuid4().bytesstarting_lba = start_lbaending_lba = end_lbaattributes = 0partition_name = name.decode("utf-8").encode('utf-16')[2:]entry = GPTPartitionEntry(partition_type_guid,unique_partition_guid,starting_lba,ending_lba,attributes,partition_name)return entrydef complete_gpt_entries(entrylist):an = create_empty_gpt_entry()for i  in range(len(entrylist), 0x80, 1):entrylist.append(an)def create_gpt_header(current_lba):signature = b"EFI PART"revision = b"\x00\x00\x01\x00"header_size = 0x5cheader_crc32 = 0reserved = b"\x00\x00\x00\x00"my_lba = current_lbaalternate_lba = 0first_usable_lba = 34last_usable_lba = 0disk_guid = uuid.uuid4().bytespartition_entry_lba = 2number_of_partition_entries = 0x80size_of_partition_entry = 0x80partition_entry_array_crc32 = 0hdr = GPTheader(signature, revision, header_size, header_crc32, reserved, my_lba,alternate_lba, first_usable_lba, last_usable_lba, disk_guid,partition_entry_lba, number_of_partition_entries, size_of_partition_entry,partition_entry_array_crc32)return hdrclass MBRfilling():def __init__(self, boot_indicator, start_head, start_sector, start_cylinder, partion_type, end_head, end_sector, end_cylinder, partition_reset, partition_sectors):self.boot_indicator = boot_indicatorself.start_head = start_headself.start_sector = start_sectorself.start_cylinder = start_cylinderself.partion_type = partion_typeself.end_head = end_headself.end_sector = end_sectorself.end_cylinder = end_cylinderself.partition_reset = partition_resetself.partition_sectors = partition_sectorsdef encode_mbr_pack(mbr_pack):data = pack('< B B B B B B B B I I',mbr_pack.boot_indicator, mbr_pack.start_head, mbr_pack.start_sector, mbr_pack.start_cylinder,mbr_pack.partion_type, mbr_pack.end_head, mbr_pack.end_sector, mbr_pack.end_cylinder, mbr_pack.partition_reset, mbr_pack.partition_sectors)return datadef mbr_partition_pack(sectors):boot_indicator = 0x00start_head = 0x00start_sector = 0x02start_cylinder = 0x00partion_type = 0xeeend_head = 0xffend_sector = 0xffend_cylinder = 0xffpartition_reset = 0x0001partition_sectors = sectorsmbr_pack = MBRfilling(boot_indicator, start_head, start_sector, start_cylinder, partion_type,end_head, end_sector, end_cylinder, partition_reset, partition_sectors)data = encode_mbr_pack(mbr_pack)return datadef create_mbr():mbr_data = bytearray()    mbr_data.extend(bytearray(0x1be))mbr_partition_data = mbr_partition_pack(0x01dacbff)mbr_data.extend(mbr_partition_data)mbr_data.extend(bytearray(48))end_data = pack('< B B', 0x55, 0xaa)mbr_data.extend(end_data)return mbr_data    def create(back_lba, alternate_lba, entrylist):complete_gpt_entries(entrylist)entriesdata = encode_gpt_partition_entry_array(entrylist, 0x80, 0x80)hdr = create_gpt_header(1)hdr.alternate_lba = alternate_lba hdr.last_usable_lba = alternate_lba - 33hdr.partition_entry_array_crc32 = calculate_partition_entry_array_crc32(entriesdata)hdr.header_crc32 = hdr.calculate_header_crc32()gptdata = encode_gpt_header(hdr)mbrdata = create_mbr()#gpt mainmaindata = bytearray()#mbr#maindata.extend(bytearray(0x200))maindata.extend(mbrdata)#gpt headermaindata.extend(gptdata)maindata.extend(bytearray(0x200 - len(gptdata)))#gpt rablemaindata.extend(entriesdata)hdr.my_lba = alternate_lba hdr.alternate_lba = 1hdr.partition_entry_array_crc32 = calculate_partition_entry_array_crc32(entriesdata)hdr.header_crc32 = hdr.calculate_header_crc32()gptdata = encode_gpt_header(hdr)#gpt backupbackdata = bytearray()backdata.extend(entriesdata)#gpt headerbackdata.extend(gptdata)backdata.extend(bytearray(0x200 - len(gptdata)))#gpt tablereturn (bytes(maindata), bytes(backdata))def parse_conf(path, entrylist):maxsize = 0partition_num = 0with open(path, "rb") as f:items = f.readlines()for item in items:(ispart, name, fstype, starts, stops, crop) = item.split(b':')if int(ispart) == 1:partition_num = partition_num + 1if name.find('/') != -1:name = name[:name.find(b'/')]entry = create_gpt_entry(int(starts[:-1]), int(stops[:-1]), name)entrylist.append(entry)maxsize = stops[:-1]return (int(maxsize)+33, int(partition_num))if __name__ == '__main__':if len(sys.argv) != 4:print("Error: args number is not 3")print("Usage: sys.argv[0] gpt.conf main_img")sys.exit(1)path = sys.argv[1]main_img = sys.argv[2]back_img = sys.argv[3]entrylist = [](alternate_lba, back_lba)  = parse_conf(path, entrylist)print(alternate_lba)print(back_lba)(main_data, back_data) = create(back_lba, alternate_lba, entrylist)create_mbr()with open(main_img, "wb") as f:f.write(main_data)with open(back_img, "wb") as f:f.write(back_data)

gen_gpt.py 会解析分区表配置文件生成主分区表以及备份分区表
配置文件的示例如下
gpt配置文件

gpt_partition.conf

1:uboot/vfat:none:34s:262144s:1
1:system:ext4:262145s:31116254s:1

可使用如下命令生成分区表

python gen_gpt.py gpt_partition.conf main_partition.img back_partition.img

gpt分区表实例

主分区表

liefyuan@ubuntu:~/work/gpt$ hexdump main_partition.img 
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
00001c0 0002 ffee ffff 0001 0000 cbff 01da 0000
00001d0 0000 0000 0000 0000 0000 0000 0000 0000
*
00001f0 0000 0000 0000 0000 0000 0000 0000 aa55
0000200 4645 2049 4150 5452 0000 0001 005c 0000
0000210 9229 830f 0000 0000 0001 0000 0000 0000
0000220 cbff 01da 0000 0000 0022 0000 0000 0000
0000230 cbde 01da 0000 0000 8c98 f34d 36ef 5645
0000240 8799 e483 2578 f760 0002 0000 0000 0000
0000250 0080 0000 0080 0000 fb56 8758 0000 0000
0000260 0000 0000 0000 0000 0000 0000 0000 0000
*
0000400 a05e fbd4 a7f9 8e40 6cbd 9ecd cf49 9ba0
0000410 2db5 fb66 40aa 9543 8a86 be7d 45ae 366c
0000420 0022 0000 0000 0000 0000 0004 0000 0000
0000430 0000 0000 0000 0000 0075 0062 006f 006f
0000440 0074 0000 0000 0000 0000 0000 0000 0000
0000450 0000 0000 0000 0000 0000 0000 0000 0000
*
0000480 0ed5 4faf 8ed7 504b 3a8f 2ddc 0f60 5482
0000490 aa68 0ab5 dbda 6f4c b290 51f3 fe6a 23dd
00004a0 0001 0004 0000 0000 cbde 01da 0000 0000
00004b0 0000 0000 0000 0000 0073 0079 0073 0074
00004c0 0065 006d 0000 0000 0000 0000 0000 0000
00004d0 0000 0000 0000 0000 0000 0000 0000 0000
*
0004400

备份分区表

liefyuan@ubuntu:~/work/gpt$ hexdump back_partition.img 
0000000 a05e fbd4 a7f9 8e40 6cbd 9ecd cf49 9ba0
0000010 2db5 fb66 40aa 9543 8a86 be7d 45ae 366c
0000020 0022 0000 0000 0000 0000 0004 0000 0000
0000030 0000 0000 0000 0000 0075 0062 006f 006f
0000040 0074 0000 0000 0000 0000 0000 0000 0000
0000050 0000 0000 0000 0000 0000 0000 0000 0000
*
0000080 0ed5 4faf 8ed7 504b 3a8f 2ddc 0f60 5482
0000090 aa68 0ab5 dbda 6f4c b290 51f3 fe6a 23dd
00000a0 0001 0004 0000 0000 cbde 01da 0000 0000
00000b0 0000 0000 0000 0000 0073 0079 0073 0074
00000c0 0065 006d 0000 0000 0000 0000 0000 0000
00000d0 0000 0000 0000 0000 0000 0000 0000 0000
*
0004000 4645 2049 4150 5452 0000 0001 005c 0000
0004010 072f 2af5 0000 0000 cbff 01da 0000 0000
0004020 0001 0000 0000 0000 0022 0000 0000 0000
0004030 cbde 01da 0000 0000 8c98 f34d 36ef 5645
0004040 8799 e483 2578 f760 0002 0000 0000 0000
0004050 0080 0000 0080 0000 fb56 8758 0000 0000
0004060 0000 0000 0000 0000 0000 0000 0000 0000
*
0004200

gpt分区表查看

一般fdisk适用于MBR分区,而gdisk使用GPT分区.gdisk命令常用格式如下

gdisk 设备文件名(绝对路径)

示例如下

$ gdisk system.img
GPT fdisk (gdisk) version 1.0.5
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! Error 25 reading partition table for CRC check!
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): print
Disk system.img: 526336 sectors, 257.0 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): CB0A9716‐409B‐FD40‐8DD9‐5FB082604799
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 62160862
Partitions will be aligned on 2048‐sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB FFFF system_A
2 2099200 4196351 1024.0 MiB FFFF system_B
3 4196352 62160862 27.6 GiB FFFF user
Command (? for help):

查看百问网T113-s3固件

主芯片是全志T113-s3,32位,双核ARM A7

liefyuan@ubuntu:~/work/img-test$ gdisk 100ask-t113-pro_sdcard.img 
GPT fdisk (gdisk) version 1.0.3Partition table scan:MBR: hybridBSD: not presentAPM: not presentGPT: presentFound valid GPT with hybrid MBR; using GPT.Command (? for help): print
Disk 100ask-t113-pro_sdcard.img: 1154152 sectors, 563.6 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 6BDDD82D-66B5-4034-95C6-FB3F1EF3C922
Partition table holds up to 128 entries
Main partition table begins at sector 2048 and ends at sector 2079
First usable sector is 35392, last usable sector is 1154118
Partitions will be aligned on 64-sector boundaries
Total free space is 7 sectors (3.5 KiB)Number  Start (sector)    End (sector)  Size       Code  Name1           35392           39487   2.0 MiB     8300  boot-resource2           39488           39743   128.0 KiB   8300  env3           39744           39999   128.0 KiB   8300  env-redund4           40000          105535   32.0 MiB    8300  boot5          105536          629823   256.0 MiB   8300  rootfs6          629824         1154111   256.0 MiB   8300  shareCommand (? for help): 
liefyuan@ubuntu:~/work/img-test$ fdisk 100ask-t113-pro_sdcard.img Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.A hybrid GPT was detected. You have to sync the hybrid MBR manually (expert command 'M').Command (m for help): printDisk 100ask-t113-pro_sdcard.img: 563.6 MiB, 590925824 bytes, 1154152 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: gpt
Disk identifier: 6BDDD82D-66B5-4034-95C6-FB3F1EF3C922Device                       Start     End Sectors  Size Type
100ask-t113-pro_sdcard.img1  35392   39487    4096    2M Linux filesystem
100ask-t113-pro_sdcard.img2  39488   39743     256  128K Linux filesystem
100ask-t113-pro_sdcard.img3  39744   39999     256  128K Linux filesystem
100ask-t113-pro_sdcard.img4  40000  105535   65536   32M Linux filesystem
100ask-t113-pro_sdcard.img5 105536  629823  524288  256M Linux filesystem
100ask-t113-pro_sdcard.img6 629824 1154111  524288  256M Linux filesystemCommand (m for help): 

查看友善之臂nanopi-m1-plus官方固件

主芯片是全志H3,32位,四核ARM A7

liefyuan@ubuntu:~/work/img-test$ gdisk nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img 
GPT fdisk (gdisk) version 1.0.3Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not present***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************Warning! Secondary partition table overlaps the last partition by
1626041 blocks!
You will need to delete this partition or resize it in another utility.Command (? for help): print
Disk nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img: 958568 sectors, 468.1 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): D221F4BC-40C0-4E19-93ED-A5C1FE413A2A
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 958534
Partitions will be aligned on 2048-sector boundaries
Total free space is 49118 sectors (24.0 MiB)Number  Start (sector)    End (sector)  Size       Code  Name1           49152          131071   40.0 MiB    0700  Microsoft basic data2          131072         2516991   1.1 GiB     8300  Linux filesystem3         2516992         2584575   33.0 MiB    8300  Linux filesystemCommand (? for help): ^C
liefyuan@ubuntu:~/work/img-test$ fdisk nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Command (m for help): print
Disk nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img: 577.9 MiB, 605933568 bytes, 1183464 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: 0x00000000Device                                                       Boot   Start     End Sectors  Size Id Type
nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img1        49152  131071   81920   40M  b W95 FAT32
nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img2       131072 2516991 2385920  1.1G 83 Linux
nanopi-m1-plus_sd_ubuntu-tft-xenial_4.14_armhf_20210425.img3      2516992 2584575   67584   33M 83 LinuxCommand (m for help): ^C

查看荣品RV1126固件

主芯片瑞芯微RV1126,32位,双核ARM A7

liefyuan@ubuntu:~/work/img-test$ fdisk update-pro-rv1126-5-720-1280-20220505.img Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xb57e8937.Command (m for help): print
Disk update-pro-rv1126-5-720-1280-20220505.img: 820.9 MiB, 860753920 bytes, 1681160 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: 0xb57e8937Command (m for help): ^C
Do you really want to quit? liefyuan@ubuntu:~/work/img-test$ gdisk update-pro-rv1126-5-720-1280-20220505.img 
GPT fdisk (gdisk) version 1.0.3Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Partition table scan:MBR: not presentBSD: not presentAPM: not presentGPT: not presentCreating new GPT entries.Command (? for help): print
Disk update-pro-rv1126-5-720-1280-20220505.img: 2136216 sectors, 1.0 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 893418C0-ABD5-4E1A-98F0-6AF69C7C472A
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2136182
Partitions will be aligned on 2048-sector boundaries
Total free space is 2136149 sectors (1.0 GiB)Number  Start (sector)    End (sector)  Size       Code  NameCommand (? for help): ^[[^H^H^H^H^C

查看f1c200s固件

主芯片全志F1c200s,32位,ARM11

liefyuan@ubuntu:~/work/img-test$ fdisk sysimage-sdcard.img Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Command (m for help): print
Disk sysimage-sdcard.img: 109 MiB, 114294784 bytes, 223232 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: 0x00000000Device               Boot Start    End Sectors  Size Id Type
sysimage-sdcard.img1         16   2047    2032 1016K  0 Empty
sysimage-sdcard.img2 *     2048  18431   16384    8M  c W95 FAT32 (LBA)
sysimage-sdcard.img3      18432 223231  204800  100M 83 LinuxCommand (m for help): ^C
liefyuan@ubuntu:~/work/img-test$ gdisk sysimage-sdcard.img 
GPT fdisk (gdisk) version 1.0.3Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not present***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.Command (? for help): print
Disk sysimage-sdcard.img: 223232 sectors, 109.0 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 1CBF2B75-23D9-4529-AD2B-5A15A4833D26
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 223198
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)Number  Start (sector)    End (sector)  Size       Code  Name2            2048           18431   8.0 MiB     0700  Microsoft basic data3           18432          223231   100.0 MiB   8300  Linux filesystemCommand (? for help): ^C

目前手上的这些开发板的固件,分区类型都不是很清晰啊!

查看V3s的SD启动卡

分区:
在这里插入图片描述在这里插入图片描述

liefyuan@ubuntu:/media/liefyuan$ sudo fdisk /dev/sdbWelcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.Command (m for help): print
Disk /dev/sdb: 29.1 GiB, 31243370496 bytes, 61022208 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: 0x28b6d4cfDevice     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048    34815    32768   16M  6 FAT16
/dev/sdb2       34816 61022207 60987392 29.1G 83 LinuxCommand (m for help): ^C 
liefyuan@ubuntu:/media/liefyuan$ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.1Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not present***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.Command (? for help): print
Disk /dev/sdb: 61022208 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3883B406-E1D8-4041-9BA1-1CA32D678B1A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61022174
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)Number  Start (sector)    End (sector)  Size       Code  Name1            2048           34815   16.0 MiB    0700  Microsoft basic data2           34816        61022207   29.1 GiB    8300  Linux filesystem
http://www.ritt.cn/news/23254.html

相关文章:

  • 网站建设怎么用ftp上传到web西安网络优化大的公司
  • php 网站 整合 数据库百度推广哪种效果好
  • 免费的企业网站cms国内最好的seo培训
  • app开发哪家好公司谷歌优化技巧
  • 延吉 网站开发seo排名推广
  • ninety ajax wordpressseo学校
  • wordpress2018抖音seo推广外包公司好做吗
  • 网站制作创业电商培训机构推荐
  • 检查部门网站建设微信客户管理
  • 罗庄区建设局网站百度投稿平台
  • 建设网站架构服务器需要多少钱中文域名注册官网
  • 长沙制作公园仿竹围栏供货商关键词优化如何
  • 自己怎么做云购网站吗宁波seo服务
  • 国际网站怎么做优化东莞建设企业网站公司
  • wordpress视频模版山东seo网络推广
  • 网站域名出售创建网站的流程
  • 成都比较好的网站设计公司做网络推广有哪些平台
  • 高品质的佛山网站建设大连seo
  • 网站源码php软文代发平台
  • 齐诺网站建设东莞网站建设做网站网络推广工作室
  • 网站内容上传要求关键词收录
  • 附近的网站设计制作价格优化软件有哪些
  • 网站权重7怎么做网站建设与管理
  • 网站建设标语东莞关键词自动排名
  • 常州网站建设技术托管广州网络推广seo
  • ionic做网站短视频排名seo
  • 网站建设产品手册网站推广沈阳
  • 移动端的网站怎么做的精准拓客软件哪个好
  • 免费网站建设排行表爱站官网
  • 什么是php网站开发网络营销ppt怎么做