Make a Clonezilla image from a source machine and save it to a File Server Then restore the Clonezilla image from the File Server to the target machine.
Have to take care the secure boot when boot system from Clonezilla tools/images, because they are not signed. Disable the secure boot for Clonezilla process, and re-enable secure boot after finish Clonezilla steps.
¶ Make a Clonezilla Image from a Source Machine and Save it to a File Server
Decompress a downloaded Endless OS image to the RAW image. Here is the partition table of the Endless OS RAW image:
$ fdisk -l eos-master-amd64-amd64.230319-231635.base.img
Disk eos-master-amd64-amd64.230319-231635.base.img: 10.64 GiB, 11428855808 bytes, 22321984 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: gpt
Disk identifier: 5DD07621-DCEE-8C48-9C11-7393C662D5CA
Device Start End Sectors Size Type
eos-master-amd64-amd64.230319-231635.base.img1 2048 129023 126976 62M EFI System
eos-master-amd64-amd64.230319-231635.base.img2 129024 131071 2048 1M BIOS boot
eos-master-amd64-amd64.230319-231635.base.img3 131072 22321950 22190879 10.6G Linux root (x86-64)
- Boot a QEMU VM including the Endless OS RAW image as a hard drive and make the VM boot from the DRBL's LiveCD by command:
qemu-system-x86_64 -smp 2 -m 4096 -drive format=raw,file=<path to Endless OS RAW image> -cdrom <path to DRBL LiveCD ISO> -boot d
- Choose the boot option with KMS
- Choose Language - Choose en_US.UTF8 English for example
- Keyboard configuration - Keep, or change the layout according to the keyboard
- Get into the graphical environment - Choose 0 to start X-window automatically
- Click the "Clonezilla live" icon to start Clonezilla
- Select mode - device-image
- Mount Clonezilla image directory - I choose ssh_server as the File server for example
- Network Config - According to you network environment. Most of using dhcp
- Mount sshfs - IP:
<SSH server IP>
, Port: <SSH server listening port>
, Account: <user>
, Absolute path on the SSH server: for example /home/<user>/clonezillaimgs
- Check sshfs again - OK
- Ask the user's password for ssh - Type the password
- Check the ssh server's disk usage - Press "Enter"
- Beginner/Expert mode - Expert mode
- Source type - Savedisk
- Folder name under the mounted sshfs: Rename, or the default one is good enough
- Choose the local disk as the source - Choose the disk you want to clone. It is the Endless OS RAW image
- Choose the clone way - Choose -q1 using dd to clone the disk directly
- Clonezilla extra parameters - Default is good enough
- The image compress mode - Choose the one you like
- Split the image file into multiple volumes file -
4096
. Because, Endless OS images include FAT partition
- FSCK - Choose sfsck to skip check
- Check the image is restorable - Choose scs to skip checking the saved image
- Encrypt the image - Choose senc to skip the encryption
- Action when everything is down - poweroff
- Check the clonezilla command and parameters - Press "Enter", then press "y" to clone the disk as a Clonezilla image. Then, it takes time to make the Clonezilla image from the source disk.
- Power off the system on the VM finally
- The target machine must have an Ethernet port at least and connect to the network. Clonezilla checks it for the network accessibility. If there is no onboard Ethernet port, an USB to Ethernet adapter can be the replacement.
- Boot the target machine with the LiveCD/LiveUSB. The system boot step is same as the steps 1 ~ 5 in "Make a Clonezilla image from a source machine and save it to a File Server".
- Click the "Clonezilla live" icon to start Clonezilla
- Select mode - device-image
- Mount Clonezilla image directory - I choose ssh_server as the File server for example
- Network Config - According to you network environment. Most of using dhcp
- Mount sshfs - IP:
<SSH server IP>
, Port: <SSH server listening port>
, Account: <user>
, Absolute path on the SSH server for the Clonezilla image: for example /home/<user>/clonezillaimgs
- Check sshfs again - OK
- Beginner/Expert mode - Expert mode
- Select action - restoredisk to restore the Clonezilla image from the File server to target machine's disk
- Choose the image file to restore - Choose the Clonezilla image generated from "Make a Clonezilla image from a source machine and save it to a File Server"
- Choose the target disk - Choose the target disk for restoring the Clonezilla image
- Clonezilla extra parameters - Deselect -g auto. Endless OS image has already included the GRUB. Keep other options' default value.
- Create partition tables mode - Choose Use the partition table from the image
- Check the Clonezilla image - Choose scs to skip the checking the image before restoring
- Action when everything is done - poweroff
- Check the cloanezilla command and parameters - Press "Enter", and again. It will ask check multiple times before restore the Clonezilla image to the disk
- Reboot the system and unplug the LiveCD/LiveUSB finally
- Don't forget enable the secure boot!
The target machine should boot the fresh Endless OS!