Clonezilla - hpaluch/hpaluch.github.io GitHub Wiki
Clonezilla
UEFI - solving:
Failed to open \EFI\BOOT\mmx64.efi - Not Found
Experienced with Clonezilla-live-3.1.2-9-amd64.zip
Used solution from: https://askubuntu.com/questions/1085550/cant-install-ubuntu-18-10-on-xps-15-efi-boot-mmx64-efi-not-found
I setup GPT partition table with single FAT32 512MB EFI partition on 1GB SD card, here are details:
fdisk -l /dev/sdb
Disk /dev/sdb: 958 MiB, 1004535808 bytes, 1961984 sectors
Disk model: SD/MMC/MS PRO
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: 17510EC4-D99D-5842-89AC-0C141ECF28D4
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
Then I did
mkfs.fat -F 32 -n CZILLA-UEFI /dev/sdb1
mount /dev/sdb1 /mnt/test/
cd /mnt/test/
unzip /opt/iso/clonezilla-live-3.1.2-9-amd64.zip
# Fix UEFI error:
cd /mnt/test/EFI/boot
cp grubx64.efi mmx64.efi
sync
cd /
umount /mnt/test
Tips
Tips: shrinking disk to disk cloning
Problem: I decided to replace good (and well performing Samsung) 1TB SSD on seldom used aging computer ZotacNano with 0.5TB (crap Kingston) drive to release 1TB disk for my powerful notebook Lenovo.
What I did:
- source: removed operating systems that I don't wont to keep to free 0.5TB of space
- source: retained systems size now would fit into 0.5TB target drive, BUT: because of spacing between partitions (removed OS were there) it still requires 1TB target disk if copied literally from one disk to another
- target: manually recreate partitions on 0.5TB target disk while:
- using same partition number as on source
- using same partition type as on source
- using same amount of sectors as on source (warning: Linux
fdiskis stupid - you have to specify+(SECTORS-1)for target ! - so if partition on source disk has2048sectors you must specify and of partition as+2047(yes!) - note: now no longer space between partitions on target so they fit to 0.5TB disk
- now boot Clonezilla, select
device-to-devicecopy - when asked for partitioning select
-k- do NOT create partitions on boot drive (it will use my own partition layout)
WARNING! All cloned systems (Fedora and openSUSE LEAP 15) booted fine, but Windows 10 not, because both Drive UUID and partitions UUID changed. See "Troubleshooting" section below for fix.
Linux generally boots fine because it uses filesystem UUID that remains identical when doing disk-to-disk copy.
Troubleshooting
Troubleshooting: cloned Win 10 does not boot
Problem: Cloned disk (device to device copy, but manually create partitions on
target) with Win 10 (UEFI mode) does not boot. bcdedit /enum shows that both
device and osdevice are unknown.
Solution: found on https://serverfault.com/a/1127628. This simple command did the trick:
bcdboot c:\windows
Note: above command will add new menu entry - use bcededit /enum to find its name (it is
that entry which has device and osdevice with proper values - not unknown)
All other Internet tips failed (normal Recovery menu, bootrec /all-imaginable-options)