LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   INQUIRY - Migration from Legacy to UEFI (lilo / elilo) - Slackware 15.0 (https://www.linuxquestions.org/questions/slackware-14/inquiry-migration-from-legacy-to-uefi-lilo-elilo-slackware-15-0-a-4175728851/)

bitfuzzy 09-11-2023 07:41 AM

INQUIRY - Migration from Legacy to UEFI (lilo / elilo) - Slackware 15.0
 
Migrating an existing Windows installation from Legacy to UEFI is well documented and a fairly simple process.

Does anyone know if there is any documentation for Slackware covering the process?
I'd be particularly interested in switching from Lilo to eLilo

Thanks

Ken

timsoft 09-11-2023 11:04 AM

when ever I have changed I've started fresh with a new drive, or copied user data and config to a temporary drive first, as you'll want to change to a gpt partition, and create a uefi system partition; and moving the primary partitions up has it's risks. You may be able to use gparted, but I've always gone for the simplest safest option of fresh install on cleanly partitioned drive. It's a good excuse to go up to the latest version of slackware, and often you're doing it on older hardware, and can replace a spinning drive with a (now cheaper) ssd, so get a speed benefit as well.

henca 09-11-2023 03:24 PM

I would say that the amount of work depends upon your current partition table. If your current partition table is the good old MBR style you will basically need to repartition your drive from scratch.

If your current partition table is GPT you will only need to add a FAT32 partition of EFI-type if you don't already have one. Once you have such a partition you can start configuring your boot loader of choice.

regards Henrik

rkelsen 09-11-2023 04:33 PM

Yeah the partition is the hardest part. If you've got the partition set up, you can use Slackware's "eliloconfig" script to do the rest.

Loomx 09-11-2023 07:48 PM

Converting from MBR to GPT partition table is fairly straightforward, and if you make a backup of the MBR first (using dd) it should be quite low risk.

You do need to make sure you have a small amount of free space at the *end* of your disk, as a GPT backup is stored there. 1MB is more than enough for this.

Then you need to add an EFI partition formatted fat32. Don't forget to add this to your /etc/fstab
Running `eliloconfig' will take care of setting up elilo and configuring the efibootmgr.
I've done this with a number of computers with no issues

BrianW 09-11-2023 08:00 PM

I'd suggest mimicking the original setup & conversion in a virtual machine first if possible. I struggled with elilo on my current machine for some reason I still can't comprehend (don't have time or ambition to dig into it too far); elilo is pretty simple from my few successful attempts at UEFI, but this go around hasn't been great.

colorpurple21859 09-11-2023 08:56 PM

As has already been mentioned need a fat32 partition flagged esp, mounted at /boot/efi. Most systems require the drive to be gpt for uefi mode, however I think it largely depends on the manufacture implementation of uefi.
I don't think liloconfig will work if booted in legacy mode, however it is possible to configure elilo manually.
Grub-install will work in legacy mode with the correct options, but won't be able to register the entry with the bios/firmware.

Emerson 09-11-2023 11:10 PM

Linux gdisk can convert the partition table, no data lost.

breaker 09-11-2023 11:10 PM

Having to have an EFI system partition formatted FAT32 is one of the annoying things about UEFI. I use lvm, so the only reason I would need a partition table would be for the ESP. The disk under lvm doesn't care about having / not having a partition table.

I made a USB thumb drive FAT32 and put my ELILO boot files there and then added a firmware entry to point there, which was good for testing purposes and negated the need for a HDD partition. It should work using the "default" UEFI boot path.

I forget the exact tinkering to do this, but I thought I would mention. I did this on a 2011 Acer desktop with UEFI.

GazL 09-16-2023 03:36 AM

Though LVM doesn't need a partition table, on PC hardware my preference is to always have one for the sake of consistency and compatibility — even when one only has a single partition.

A small benefit of having the gpt partition table is you also get the option to assign PARTLABELs, which can be a useful aid to identifying what the disk/partition contains.


Anyway, back on topic: as others have already said, there's really no "magic" to EFI booting.

bitfuzzy 09-16-2023 11:15 AM

Thank you everyone for the replies, they have been informative.

I've got a couple of systems (Slackware 15.0) which have Windows 10 guests setup on them for occasional use, and in order to upgrade to Windows 11 UEFI and secure boot are required.

I haven't done any testing yet, but in theory (based on what I've read) it should be possible to setup a secure boot/UEFI guest on a legacy host.
I'm skeptical, but should this work migrating shouldn't be necessary. However should it prove to be a waste of time or unstable I'll have to migrate the boxes.

Any "hiccups" with secure boot and elilo I should be aware of?

henca 09-16-2023 05:05 PM

Quote:

Originally Posted by bitfuzzy (Post 6454077)
I've got a couple of systems (Slackware 15.0) which have Windows 10 guests setup on them for occasional use, and in order to upgrade to Windows 11 UEFI and secure boot are required.

If you are running your Windows guest in some virtual machine like qemu on the Slackware 15.0 host there is no need to boot Slackware with UEFI. All you need to do is to emulate UEFI boot with your virtual machine running the guest operating system. When it comes to qemu, the keyword to google for is "ovmf".

regards Henrik

rkelsen 09-16-2023 08:11 PM

Quote:

Originally Posted by bitfuzzy (Post 6454077)
I've got a couple of systems (Slackware 15.0) which have Windows 10 guests setup on them for occasional use, and in order to upgrade to Windows 11 UEFI and secure boot are required.

A per henca's post above, if you're talking about virtual machines, then you only need to set up those things in your hypervisor software.
Quote:

Originally Posted by bitfuzzy (Post 6454077)
Any "hiccups" with secure boot and elilo I should be aware of?

Secure boot doesn't play nicely with Linux. You may not be able to boot into Linux with it enabled.

pghvlaans 09-16-2023 08:28 PM

For Windows 11 VMs, you'd want swtpm and edk2-ovmf on SBo.

bitfuzzy 09-18-2023 07:22 AM

Quote:

Originally Posted by pghvlaans (Post 6454170)
For Windows 11 VMs, you'd want swtpm and edk2-ovmf on SBo.

I'm using Virtualbox for my VMs. Correct me if I'm wrong, but these would only be needed if I were using Qemu

Correct?


All times are GMT -5. The time now is 05:13 AM.