Restoring image from 512bytes sectors (HDD) to 4K sectors (SSD)

×

Statusmeldung

You are not a member of this team. If you want to be part of this team, click on 'Subscribe to this team'.

Good morning,
I'm trying to restore an image to a MacBook Air and I'm having issues with the Clonezilla image restoration.
The hard drive of the destination laptop is an SSD disk

I'm using the latest antiX version, the one that with the scripts "autodeplo".

1) The first issue was that, when executing the script, it does not display the laptop disk in the list "Select the DISK you want to have ERASED".
I looked at the script and it only identifies "sdX" drives, not "nvmeX" drives.
I propose editing the script "labdoo_sanitize_main.sh", line 69, and change [grep sd] with [grep "sd\|nvme"].

2) Anyway, I have tried to restore the image using Clonezilla directly.
The issue here is that Clonezilla says the destination disk does not have enough sectors to restore the image:
/dev/nvme0n1p1: No free sectors available
Failed to add #1 partition: No space left on device
The destination disk, however, has more than enough space for the image I'm restoring.
I have tried retoring with Clonezilla option "-icds" without success.
I think the issue is the sector size (512 bytes vs 4K)
Is there any trick to be able to restore the 512 bytes sector image to the destination disk with 4K sectors?
If not, maybe we would need to have specific images built from disks with 4K sectors.

Any suggestion here?
Thanks!
M

Kommentare

Bild des Benutzers Rhein-Ruhr-Hub
Gespeichert von Rhein-Ruhr-Hub am So, 07/17/2022 - 11:09

Hi M,
the autodeploy script of Labtix is managed by Javier https://platform.labdoo.org/users/jprisab. May-be he can help best.
Have you tried the one-click installer of Labtix? Labtix 2.6 can clone 20.04 and 22.04 images. Navigate to image folder in zzzFM file manager, right mouse click on folder and choose installation script.
I installed many Apple Macbook Air that way. Only few need a special set-up (mainly those with a display menu bar). Those we gave away with MacOS.
Good luck,
Ralf
Labdoo.org (Germany)

Bild des Benutzers tinplate
Gespeichert von tinplate am So, 07/17/2022 - 16:07

Hi Ralf,
Thanks for your response.
I have tried proceeding as you suggest:
1) I make sure to have the "UEFI" directory in the root folder of the images disk
2) I launch the installation from zzzFM by right-clicking the image folder to be restored.

The installation fails again :(
I 'm attaching the output log.
I think the main issue in the log file is:

Size of original disk: 488397168 sectors.
Size of target disk : 61279344 sectors.
The ratio for target disk size to original disk size is .1254703098.
"EFI System partition" found. Not to expand this partition.
The calculated size of /dev/nvme0n1p2 is < 0!

Here the problem is, again, the number of sectors:
the number of sectors of the target disk is about 8 times smaller that the original disk's.
I guess this is because the sector size in the laptop disk is 4K instead of 512 bytes.

Does this make sense?
Any suggestion?

Thanks,
Marcos