INQUIRY - Migration from Legacy to UEFI (lilo / elilo) - Slackware 15.0
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495
Rep:
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.
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.
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
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.
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.
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.
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.
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?
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".
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.