I made an image with dd
sudo dd if=/dev/sda of=/path_to_external_drive/backup.img
Now I wanted to recover the system after the mount of all partitions went smoothly. When I make
sudo dd if=backup.img of=/dev/sda
I don't get any error messages until I try to boot the system.
I get the following error message from sudo fdisk -l
because I wanted to see why the BIOS does not found any partition.
Partition 1 does not start on physical sector boundary
So I tried Disk Image Writer from my live stick but it says, that the image is 41 kB too large.
How can this happen and how can I fix it? Is there another way, besides buying a new SSD, to restore the system?
fdisk -l backup.img:
GPT PMBR size mismatch (976773247 != 976773167) will be corrected by w(rite).
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x635f93a2
Device Boot Start End Sectors Size Id Type
/dev/sda1 1 976773247 976773247 465.8G ee GPT
Partition 1 does not start on physical sector boundary.
gdisk -l /dev/sda:
GPT fdisk (gdisk) version 1.0.1
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/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8DC2A4AA-C369-4ED8-B876-DCE0418A1BD0
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773214
Partitions will be aligned on 2048-sector boundaries
Total free space is 4157 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 923647 450.0 MiB 2700 Basic data partition
2 923648 1128447 100.0 MiB EF00 EFI system partition
3 1128448 1161215 16.0 MiB 0C01 Microsoft reserved ...
4 1161216 669571071 318.7 GiB 0700 Basic data partition
5 669571072 960290815 138.6 GiB 8300
6 960290816 976771071 7.9 GiB 8200
dd
? Or is there some other step(s) involved you're not telling us about?fdisk
which gives that error? I would have thought that worked. Are you sure you didn't just copy /dev/sda1 to your imge? Does the rest of fdisk's output (when I've seen similar error, it has always provided more output) look sane?dd
must have taken ages to run. Next time usecat
. Diddd
complete successfully or with an error? If it was successful, the image isn't too large and you need to address the next issue (partition alignment)