在执行此操作之前,我使用 dd 将 500gb 硬盘驱动器克隆到 256gb SSD 我编辑了分区,以便使用 GParted 取消分配最后的 280gb(大致)。
最终 dd 在 240gb 时用完了空间,计划是它不会复制未分配的空间并且克隆将完成。
不幸的是,GPT 表不正确,我不知道如何整理。
GParted 讨厌它并告诉我它会使用一个未分配的整个驱动器的备份表。
GPT Fdisk 告诉我有 5 个错误,但是对于“p”,它确实表示所有分区都在那里。(这可能是提醒它是 Windows 驱动器的好时机)
我用的DDsudo dd if=/dev/sda of=/dev/sdc status=progress
结果 :dd: writing to '/dev/sdc': No space left on device 468862125+0 records in 468862124+0 records out 240057407488 bytes (240 GB, 224 GiB) copied, 21466.2 s, 11.2 MB/s
GPT fdisk:Warning! Disk size is smaller than the main header indicates!
然后它说 MBR Protective 和 GPT Damaged Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header.
。Warning! One or more CRCs don't match. You should repair the disk!
在“v”上: 注意:备份分区表的 CRC 无效。该表可能已损坏。当您保存分区时,该程序将自动创建一个新的备份分区表。
问题:辅助标头的自指针表明它不在磁盘末尾。如果您已将磁盘添加到 RAID 阵列,请使用专家菜单上的“e”选项来调整辅助标头和分区表的位置。
问题:磁盘太小,无法容纳所有数据!(磁盘大小为 468862124 个扇区,需要为 976773168 个扇区。)专家菜单上的“e”选项可能会解决此问题。
问题:GPT 声称磁盘比实际大!(声称最后一个可用扇区是 976773134,但备份头是 976773167,磁盘大小是 468862124 个扇区。专家菜单上的“e”选项可能会解决这个问题
保护性 MBR 中的分区对于磁盘来说太大了!建议创建新的保护性或混合 MBR。
确定了 5 个问题!^
帮助将不胜感激
sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Model: ST500LM034-2GH17
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 43B49B18-460C-4EDB-B63D-195389ABF232
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 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 589831021 sectors (281.3 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1085439 529.0 MiB 2700 Basic data partition
2 1085440 1290239 100.0 MiB EF00 EFI system partition
3 1290240 1323007 16.0 MiB 0C01 Microsoft reserved ...
4 1323008 273028223 129.6 GiB 0700 Basic data partition
5 273029120 274431999 685.0 MiB 2700
6 274434048 296837119 10.7 GiB 0700 Basic data partition
7 297041920 387151871 43.0 GiB 0700 Basic data partition
$ sudo gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.3
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! One or more CRCs don't match. You should repair the disk!
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.
****************************************************************************
Disk /dev/sdc: 468862124 sectors, 223.6 GiB
Model: high speed
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 43B49B18-460C-4EDB-B63D-195389ABF232
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 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 589831021 sectors (281.3 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1085439 529.0 MiB 2700 Basic data partition
2 1085440 1290239 100.0 MiB EF00 EFI system partition
3 1290240 1323007 16.0 MiB 0C01 Microsoft reserved ...
4 1323008 273028223 129.6 GiB 0700 Basic data partition
5 273029120 274431999 685.0 MiB 2700
6 274434048 296837119 10.7 GiB 0700 Basic data partition
7 297041920 387151871 43.0 GiB 0700 Basic data partition