Cloning a Rocky disk image and restore to a new machine by using Clonezilla Live

I am trying to backup my Rocky Linux 9 disk image and restore it to an other newer machine with same size SSD by using Clonezilla Live 3.0.3-22.

My Rocky 9 Linux was installed by default partition (divided into 3 partition: sda1 mounted to /boot/efi; sda2 mounted to /boot; sda3 there are 3 logic partitions such as: /, /home and swap)

[root@rocky9pg15m ~]# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 238.5G  0 disk 
├─sda1        8:1    0   600M  0 part /boot/efi
├─sda2        8:2    0     1G  0 part /boot
└─sda3        8:3    0 236.9G  0 part 
  ├─rl-root 253:0    0    70G  0 lvm  /
  ├─rl-swap 253:1    0   7.8G  0 lvm  [SWAP]
  └─rl-home 253:2    0 159.1G  0 lvm  /home

When I use Clonezilla live to backup it’s disk image to my SSH server successfully.(follow instruction of Restore disk image)

But when I tried to restore it to my an other machine (similar hard ware and same disk size) from SSH server.

Restore step as:

English UTF-8
Keep default keyboard
Start Clonezilla
device-image
SSH_server ...........
use beginner mode
restoredisk
[restore to local disk] sda 256GB_MT-256
k0 - use the partition table from the image
yes, check the image before restore
[go .......]

The new machine only boot to emergency mode.

When I run lsblk I found some thing missing in that table:

[root@rocky9pg15m ~]# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 238.5G  0 disk 
├─sda1        8:1    0   600M  0 part /boot/efi
├─sda2        8:2    0     1G  0 part /boot
└─sda3        8:3    0 236.9G  0 part 
  ├─rl-root 253:0    0    70G  0 lvm  /
  └─rl-swap 253:1    0   7.8G  0 lvm  [SWAP]

if compare with original partition table, seems logic partition rl-home missed in the restored disk.

if we run command [journalctl -xb], we found there are quite few warning and error message popped up.

........
ACPI: NMI not connected to LINT 1!
........
MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
........
ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
........
device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
........
pmd_set_huge: Cannot satisfy [mem 0xf8000000-0xf8200000] with a huge-page mapping due to MTRR override
........
/dev/sda3 excluded: device is not in devices file
........
warning: no autoactivation for /dev/sda3: system.devices t10_ATA_______[origin disk label]____current t10_ATA_______[new disk label] (??????seems disk label not match???????)
.......
dev-mapper-rl\x2dhome.device: Job dev-mapper-rl\x2dhome.device/start timed out
Timed out waiting for device /dev/mapper/rl-home
........
[other error related to /home]
........ 
Failed to get new runlevel, utmp update skipped.
........

Does any one have any idea about it? I mean clone a running Linux system to other new machine by using Clonezilla Live.

If any one do, please advise!

@miko2050 did you get any luck with your image restoration? Having the same problem using Rescuezilla. System getting stuck with error: Problem loading X.509 certificate -126 and booting into emergency mode. /home partition not present after restoring the image.

If this helps try this:

  1. Boot with a RL9 ISO, go to rescue mode
  2. The Rescue environment will mount the file system to /mnt/systemroot
  3. sudo chroot /mnt/sysemroot
  4. dracut -f /boot/initframs-“your-kernel version here” “your kernel version here again
  5. Reboot

I created a VM to create a drive agnostic master image, once I tried to clone I kept messing up, the above saved it, it’s as if clonezilla does something to initramfs… On a VM the restore worked and on baremetal I had to do the above…

Once the fixed was applied, I cloned that OS and restored to other systems flawlessly.

1 Like