根据评论进行测试

根据评论进行测试

在我的 Raspbian (Jessie) 系统sudo sfdisk -lV /dev/mmcblk0(来自 util-linux 2.25.2 的 sfdisk)上向我展示

Disk /dev/mmcblk0: 3923936 cylinders, 4 heads, 16 sectors/track
Units: cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk0p1        128    2143    2016      64512    e  W95 FAT16 (LBA)
                start: (c,h,s) expected (128,0,1) found (0,130,3)
                end: (c,h,s) expected (1023,3,16) found (8,138,2)
/dev/mmcblk0p2       2144  329823  327680   10485760   83  Linux
                start: (c,h,s) expected (1023,3,16) found (8,138,3)
                end: (c,h,s) expected (1023,3,16) found (1023,254,63)
/dev/mmcblk0p3     329824  591967  262144    8388608   83  Linux
                start: (c,h,s) expected (1023,3,16) found (1023,254,63)
                end: (c,h,s) expected (1023,3,16) found (1023,254,63)
/dev/mmcblk0p4     591968  3497439  2905472   92975104    7  HPFS/NTFS/exFAT
                start: (c,h,s) expected (1023,3,16) found (1023,254,63)
                end: (c,h,s) expected (1023,3,16) found (1023,254,63)
sfdisk: Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
sfdisk: start of partition 1 has impossible value for head: 130 (should be in 0-3)

但是,在我的 VirtualBox Debian(延伸/测试)客户系统上运行 Windows 10 主机,通过旧的 USB 2.0 读卡器sudo sfdisk -lV /dev/sdc(来自 util-linux 2.29.1 的 sfdisk)插入 SDXC 卡时,显示

Disk /dev/sdc: 119.8 GiB, 128579534848 bytes, 251131904 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: 0x102c03ad

Device     Boot    Start       End   Sectors  Size Id Type
/dev/sdc1           8192    137215    129024   63M  e W95 FAT16 (LBA)
/dev/sdc2         137216  21108735  20971520   10G 83 Linux
/dev/sdc3       21108736  37885951  16777216    8G 83 Linux
/dev/sdc4       37885952 223836159 185950208 88.7G  7 HPFS/NTFS/exFAT
Remaining 27295744 unallocated 512-byte sectors.

我使用此 USB 适配器从最新的 Raspbian 映像创建了 SD 卡,并在稍后添加了更多分区。

为什么 Raspbian 报告的内容有所不同?c,h,s和是什么impossible value意思?看起来不太对劲。我应该担心吗?

答案1

我应该担心吗?

不。这通常与 Linux 无关。除非您注意到您的系统无法启动,因为引导装载程序依赖于 (c,h,s) 值。

新版本sfdisk删除了任何处理 (c,h,s) 的代码。从联机帮助页中,我了解到 DOS 向后兼容模式已被删除。

例如https://karelzak.blogspot.co.uk/2014/10/new-sfdisk.html

如果您仍然依赖旧的默认圆柱体,那么更新时要小心。坦率地说,LBA 寻址从 ATA-3 (1997) 起就是强制性的,并且从一开始就受到 Linux 的支持。

(LBA 模式的分区类型已可用微软视窗95 圆柱体边界的重要性似乎已被抛弃视窗Vista和较新的)。

答案2

根据评论进行测试

我在 Raspberry 上测试了带有备份 SD 卡的 USB 适配器,并看到了相同的警告:

raspberrypi:~$ sudo sfdisk -lV /dev/sdb

Disk /dev/sdb: 1015 cylinders, 32 heads, 62 sectors/track
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/113/51 (instead of 1015/32/62).
For this listing I'll assume that geometry.
Units: cylinders of 2950656 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      2+    349-    347-    999552    7  HPFS/NTFS/exFAT
                start: (c,h,s) expected (2,90,13) found (1,1,1)
                end: (c,h,s) expected (349,77,18) found (125,112,51)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
sfdisk: Warning: partition 1 does not start at a cylinder boundary
sfdisk: Warning: partition 1 does not end at a cylinder boundary
sfdisk: partition 1: start: (c,h,s) expected (8,4,9) found (1,1,1)
sfdisk: end of partition 1 has impossible value for head: 112 (should be in 0-31)

显示另一个带有单个 vfat 分区的 USB 记忆棒

Disk /dev/sdb: 1015 cylinders, 32 heads, 62 sectors/track
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/113/51 (instead of 1015/32/62).
For this listing I'll assume that geometry.
Units: cylinders of 2950656 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      2+    349-    347-    999552    7  HPFS/NTFS/exFAT
                start: (c,h,s) expected (2,90,13) found (1,1,1)
                end: (c,h,s) expected (349,77,18) found (125,112,51)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
sfdisk: Warning: partition 1 does not start at a cylinder boundary
sfdisk: Warning: partition 1 does not end at a cylinder boundary
sfdisk: partition 1: start: (c,h,s) expected (8,4,9) found (1,1,1)
sfdisk: end of partition 1 has impossible value for head: 112 (should be in 0-31)

我还测试了另外两个简单的 USB 读卡器(不幸的是,它们都不支持 SDHC 和 SDXC),它们都显示了相同的结果。

我想知道其他人看到了什么

sudo sfdisk -lV /dev/mmcblk0

相关内容