Transplanting Ubuntu 24.04.1 server to new hardware, best approach?

Bo Berglund bo.berglund at gmail.com
Mon Jan 20 12:53:04 UTC 2025


I have an Ubuntu server running on a Lenovo Idea-centre minitower and I have
recently managed to run a do-release-upgrade on it to get from 22.04.6 to
24.04.1.

The upgrade process seems to have worked but has not solved my problems with the
grub boot menu, which does not update reflecting the new preferred kernel so it
starts with an older kernel all the time. :-(

The grub problem comes probably from the fact that this box came with Windows
and the grub was created when I initially installed Ubuntu Desktop on it as
multi-boot with Windows (which I don't ever use) and I guess there is a problem
there.

When the Ubuntu Desktop was installed I used GParted to make space for the
server I wanted the box to run and then I moved the server partitions from the
older hardware system to the Lenovo disk.

Once that was done I could update grub using the desktop ubuntu and then boot to
the server which is the main system for it. At that time both Ubuntus and
Windows appeared in the grub menu.

It seems like the only OS that can properly update grub is the Desktop Ubuntu,
but it is no longer appearing in the boot menu so it can not be started...


Now some years later I am planning to repeat the transplant onto yet another
hardware platform, this time an ASUS NUC 13 PRO with Core i7 processor and SSD
drives etc. No OS at all right now.

What I am seeking advice/confirmation for is the following plan:
----------------------------------------------------------------

1. Install the latest LTS version of Ubuntu Desktop with manual partitioning so
that empty space is present for the following steps.
The EFI partition will also be created along with putting /home on a separate
partition from the system.

Once that is working with a single operating system on board I move to step 2:

2. Use GParted to copy in the old server's used partitions (main, home, data) to
the NUC drive. The copy will preserve the UUID, I believe, and since /etc/fstab
is set up to mount based on the UUID of the partitions I assume that it will
still find the correct data.

3. When the server's partitions are on the new drive I will do a grub update
inside the desktop Ubuntu:

sudo update-grub

This should update grub by including also the now present server system, right?

4. After this I need to also do the following, which I am uncertain about how:

- Set the grub menu to default to the last running operating system
- Set the menu timeout to 5 seconds (the menu is usually not accessed)

5. I believe I also need to set the LAN network address to the IP of the old
Ubuntu server box, because the IP is used in a number of places like on the
router to redirect external incoming traffic to the correct handler.

Must this be done on the LAN router (I have a 1000/1000 fiber connection via an
ASUS RT-AX86 PRO router)?

Or do I have to use whatever DHCP IP it gets from the router and reconfigure all
port forward items on the router instead?


Is there something I have forgotten in all of this?
Or gotten wrong?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list