Transplanting Ubuntu 24.04.1 server to new hardware, best approach?

Liam Proven lproven at gmail.com
Mon Jan 20 15:40:11 UTC 2025


On Mon, 20 Jan 2025 at 12:55, Bo Berglund <bo.berglund at gmail.com> wrote:

> 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. :-(

I've watched your struggles with this but I do not claim to remember
all the steps.

> 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.

Not enough info to say.

I do not remember all your troubleshooting.

I think it's a remote box and you can't see the GRUB menu, correct?

Is it UEFI?

I think that the copy of Ubuntu you are connecting to and working with
is not the copy of Ubuntu that is in charge of the boot loader.

Can you post a full list of all disks, their mount points, and their
UUIDs, please?

So the output from these commands:

sudo -s
sfdisk -l
blkid
lsblk
mount

> 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.

Key question missing here: whose GRUB?

There is 1 copy of GRUB per copy of Linux. (Setting aside distros that
use other bootloaders and things.)

You can run `update-grub` as often as you like but if a different copy
of Ubuntu is in charge of the boot sector then that GRUB never runs.

If it is a UEFI machine then GRUB is in the ESP.

That is the UEFI System Partition.

Is there any chance you have more than 1 ESP?

There should only be 1 on the main boot drive.

It should be mounted at `/boot/efi/`

You need the copy of GRUB that's in your server OS to be in control of
the boot menu.

I think the old copy of GRUB in the desktop OS is the current one.

There are reinstall instructions here:

https://askubuntu.com/questions/831216/how-can-i-reinstall-grub-to-the-efi-partition

Basically, it is the same as ever:

DO NOT DO THIS YET. READ IT ALL FIRST.

To install GRUB you do:

````
sudo -s
grub-install /dev/sdX
````

where sdX is the main device node of your boot drive.

*BUT* with UEFI you _must_ have the ESP mounted first, and some other
stuff. It's not as easy as in the old BIOS days. That's why you and we
_must_ know if it's BIOS or UEFI and which ESP and which OS.

> 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...

I can't imagine how but the world is strange and I often encounter
things I can't imagine. :-)

> 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.

Uhoh.

Bad plan. You don't know what is wrong.

I _STRONGLY_ advise fixing this FIRST!

Recommendation:

1. Find what the boot problem is.
2. Fix the boot problem.
3. Get booting under control of the desired OS.
4. Learn how to install _and reinstall_ and modify GRUB.
5. Copy the OS onto blank new machine.
6. Install fresh copy of GRUB.

Don't mess around with desktop versions or unneeded dual booting.

-- 
Liam Proven ~ Profile: https://about.me/liamproven
Email: lproven at cix.co.uk ~ gMail/gTalk/FB: lproven at gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
IoM: (+44) 7624 227612: UK: (+44) 7939-087884
Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053




More information about the ubuntu-users mailing list