[X86] Backing up

I have OpenWrt 21.02.3 setup every thing running great.

What methods do you guys use to take an image so that it can be restored onto a different drive.

My usual go to is Acronis true image and it works great with most things, backing up Volumio SD cards windows installs, Kodi linux installs. etc
But..... With openWRT it seems to successfully take an image, also write it back to a different drive OK.
Although the resulting drive does not load up and hangs. Within the last few line theres a message "waiting for root device PARTUUID........." which i`m guessing is the problem

Any suggestions much appreciated

use root=/dev/sda2 (or whereever your root FS resides) instead root=PARTUUID=, in grub.

1 Like

Thanks That did the trick.
Just need to work out how to make it persistant as everytime I reboot it reverts back to root=PARTUUID=.......

What's wrong with the good old dd? :slight_smile:

I recently needed to clone, repeatedly, a device on which I did quite a bit of setup work (including resizing the root partition and a workaround for the failure to load i915 firmware). Here's what I did.

Part A. Backup

Connect an appropriately sized USB drive and do:

mkdir /mnt/external
mount /dev/sdb1 /mnt/external
dd if=/dev/sda | gzip -9 > /mnt/external/myImage.img.gz

In my case, a 64 GB SSD was imaged onto a 32 GB USB stick with no complaints.

Part B. Restore

Boot the router from a USB stick. Once done, connect the USB drive containing the image and do:

mkdir /mnt/extra
mount /dev/sdc1 /mnt/extra
zcat /mnt/extra/myImage.img.gz > /dev/sda

Once done, halt, remove the USB drives, and boot the router normally.

Note that in the backup phase, there was only one USB drive connected, so the SSD was /dev/sda and the USB drive was /dev/sdb. In the restore phase, the SSD was still /dev/sda and the USB drive from which the router booted was /dev/sdb, so the drive containing the image had to become /dev/sdc.

Obviously, this is just one of many possible scenarios, but I hope you get the idea...

1 Like

/dev/sdX sounds pretty persistant ?

Not sure exactly what you mean.

But.... sorted anyway by editing /boot/grub/grub.cfg and makining the changes in there.

Thanks for your help

Misunderstood your post, never mind the last comment.