[kwlug-disc] Followup to transplanting linux system

Mikalai Birukou mb at 3nsoft.com
Fri May 1 21:18:33 EDT 2020


> If you have (proper!) references to filesystems/partitions by UUID in 
> grub and fstab, dd should work for you.
> I would expect modern grub to do this already.
> All you need to do is make sure fstab is using UUIDs.
>
> I have dd'd running systems to new disks.
> So long as you are not updating packages/config during the transfer, 
> the new image should run just fine.
>
The system was Ubuntu 18.04 desktop. It is server, cause it runs itself, 
Gitlab Runner with head. I did try dd from this running system into new 
disk. Bootup started, but somewhere in the middle system startup 
freezes. rsync instead ...
>
> If the new drive image has substantial low level configuration changes 
> (eg. BIOS vs EFI boot), you can
> wipe out / on the new image and rsync in the existing root filesystem.
>
rsync worked nice with -avEHAX flags. But you have to exclude stuff from 
rsync. Ubuntu has tons of mounted systems, and those mount points should 
be excluded from rsync. mount will show all those points, that need to 
be excluded. This was a lesson for me. Ensure that /etc/fstab 
corresponds to new system.

And afterwards usual grub-update from a running system helped to fix 
everything with grub.

Another lesson is that grub's cli is nice. And configfile command, or 
something like this runs grub's config that does boot.

Thanks for the input..





More information about the kwlug-disc mailing list