Migrating from 20.04 -> 22.04 -> 24.04 on headless Ubuntu server +? hardware upgrade
Robert Heller
heller at deepsoft.com
Sun Dec 8 00:28:57 UTC 2024
At Sat, 07 Dec 2024 23:27:57 +0100 bo.berglund at gmail.com, "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> So I have this old server system which still runs Ubuntu 20.04.6 LTS server on a
> Lenovo Ideacenter minitower and I want to do these things:
>
> 1) Make it use the latest kernel for that Ubuntu version.
> For some reason it is stuck at Kernel 5.4.0-89.100-generic even though several
> later ones have been provided by the apt system. But it has not switched kkernel
> even though I have restarted it several times.
>
> $ uname -r
> 5.4.0-89-generic
>
> $ dpkg --list 'linux-image*' | grep ^ii
> ii linux-image-5.15.0-126-generic 5.15.0-126.136~20.04.1 amd64 Signed kernel
> image generic
> ii linux-image-5.4.0-200-generic 5.4.0-200.220 amd64 Signed kernel
> image generic
> ii linux-image-5.4.0-89-generic 5.4.0-89.100 amd64 Signed kernel
> image generic
> ii linux-image-generic 5.4.0.200.196 amd64 Generic Linux
> kernel image
> ii linux-image-generic-hwe-20.04 5.15.0.126.136~20.04.1 amd64 Generic Linux
> kernel image
>
> I believe I will not get the offer to do a release upgrade unless I can make it
> use a later kernel.
It may not matter what version you are actually running, so long as the
latest is "installed".
> This server is "mission-critical" so I cannot make a mistake in the upgrade
> process, I need a full disk backup before I even embark on this, but the problem
> is how to do that.
> I probably have to boot into a usb system with GParted to do the disk partition
> copies....
>
> 2) Upgrade it to 22.04 and then to 24.04 using the do-release-upgrade command
> Once I have the backup done as above and somehow can make it use the latest
> kernel, then I want to do the transfer to 24.22.4 via 22.04.4
>
> If that fails for some reason I need to bring back the original disk content to
> the drive (probably only the partitions used by 20.04.6, there are also a
> windows set of partitions, but that and the data partitions will not have
> changed.
>
> 3) Finally I want to move the entire system to a new ASUS NUC 13 i7 device to
> get rid of the Windows dependency of the Lenovo I am now using.
>
> Question:
> Can I just copy the final partitions of the converted Ubuntu to the drive in the
> NUC and start it to make it run my old server system?
Linux is generally happy to do a disk transplant (move one disk to another
machine) and will still boot. The only gotchas are kernel drivers for the
disk (not generally an issue with standard disk interface types -- eg SATA is
SATA [IDE was IDE back in the day]). There might be issues if going from old
BIOS to new EFI (I don't know -- never done that). The only other issues
would be other device driver issues (guessing Ethernet in your case is the
only issue). Modern Linux distros stopped using physical device names
(/dev/sdXn or /dev/hdXn) in /etc/fstab and now use LABEL= or UUID= instead
some time ago, certainly before Ubuntu 20.04, so that won't be an issue.
>
> Or else - how can I make the move to new hardware?
Just do it. If you are "paranoid", just do a disk-to-disk copy to a fresh
disk and install the new fresh disk copy in the new machine.
>
> I cannot install a fresh system on the NUC because I have no idea how to then
> install all of the already configured services on the new hardware platform
> fresh from start...
You *probably* should at some point reverse engineer that, but that can always
wait for later.
>
> I simply do not now remember what I have done over the years to
> install/configure these since 2017 when it was originally built...
>
> Or can a switch of hardware not be done?
The hardware switch can almost *always* be done. Unlike mess-windows, can
handle all possible transplants -- well, maybe not to a different CPU type -- eg
you probably cannot transplant a x86_64 system into a system with an ARM
processor, but that is probably obvious, but *everything* else can be
transplanted and the resulting frankinsystem should boot (maybe lacking some
devices that can be fixed later with some groveling at the shell).
I've done this repeatedly over the years.
>
>
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list