Migrating from 20.04 -> 22.04 -> 24.04 on headless Ubuntu server + hardware upgrade

Bo Berglund bo.berglund at gmail.com
Sat Dec 14 17:04:39 UTC 2024


On Tue, 10 Dec 2024 23:17:51 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:

>>Gosh, that is quite complicated. What distro/version is it running now?
>>
>>
>Right now it is Ubuntu Server 20.04.6 LTS, but it is running out of "long time
>support"....
>
>And some utilities like ffmpeg are no longer being updated to the current level.
>
>I have just gotten me new hardware:
>
>ASUS NUC13ANH with 32 GB RAM, i7 CPU, 1 + 2 TB SSD drives.
>Not yet started.

INFO AFTER UPGRADE
-----------------
I have now done the first step, i.e. :

- Fully updated the 20.04.6 server installation.

- Back up by using GParted Live to copy the partitions involved with this system
  to a USB3 connected external drive. Took about 1.5 hours for some 300+ GB.

- Then with an external monitor and keyboard attached I ran the command:
  sudo do-release-upgrade to get from 20.04.6 to 22.04.1
  This took quite some time and a number of stops for confirmation.

- When done I did the same again to get from 23.04.1 to 24.04.1

- Then on the final version I had to fix problems with Apache, which
  did not start properly due to a php version problem in the conf files:

  sudo a2dismod php8.1
  sudo a2enmod php8.3
  sudo systemctl restart apache2

Now with a working upgraded system I want to move the whole thing to new
hardware, the ASUS NUC 13 box I have bought.

The idea here is the following:
- Using GParted on the new system copy all partitions used by the Ubuntu
  Server system to an USB connected drive (same as used above perhaps)

- Then on the new NUC boot using a Ventoy stick with GParted
  And copy the partitions above to the completely empty drive in the NUC.

Questions:

1) What to do with the EFI partition where grub resides?
I think I cannot just copy it over as-is because it holds references to both
Windows and the Ubuntu Desktop that exist on the source disk.
But if I do not have an EFI partition with grub data then I guess it will not be
possible to boot the NUC afterwards?

2) Do I have to run an Ubuntu Desktop installation from scratch first in order
to get the disk partitioned up?
If so can I do the partitioning as part of the Ubuntu Desktop installation?
And do I copy in the migrated partitions to the disk in advance of that or
afterwards?

3) Or is there some way to manually create the extra stuff needed for grub to
work without installing an Ubuntu that is never to be used?

I do want to have a GParted partition towards the end so I can get to GParted
without a Ventoy USB device.


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list