Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Can go, I suppose. Should go, not. FAT partitions crude things, no place for keeping Linux kernels or initrds. Symlinks can't be used on them. They belong on a Linux native filesystem. On some distros, when /boot isn't a discrete filesystem, the kernel isn't anywhere in /boot, but just a symlink to /usr/lib/modules/<version>/vmlinuz.
I install my kernels into /boot using installpkg and create my initrds there too. Those are the master copies. Then I copy them over to the ESP for booting since, as you say, you can't use links in a vfat filesystem. I have never had any kind of corruption in these vfat copies but if I did, I could always make a new copy from the originals in /boot
I did not run initrd. I've never done that and never had to. Is that different with UEFI? I'll research how to do this
It's nothing to do with UEFI. It has to do with what kind of kernel you use. If you've never needed an initrd, I assume that you're using a huge kernel.
The generic kernel does not come with ext4 file system support compiled in. To create a useable initrd, as root, run the script at /usr/share/mkinitrd/mkinitrd_command_generator.sh It will spit out a string. Copy and pate it, make any modes you may need, and press enter. It will build an initrd.gz file for the installed kernel. If you are using it when upgrading a kernel, you need to add a -k 5.15.xx where xx is the new kernel version. Copy the output to the appropriate location on the ief partition.
It's nothing to do with UEFI. It has to do with what kind of kernel you use. If you've never needed an initrd, I assume that you're using a huge kernel.
Yes, I've used a huge kernel forever. Why would it not be picking up the huge kernel in this case? vmlinuz is symlinked to vmlinuz-huge-5.15.19.
Quote:
Originally Posted by camorri
The generic kernel does not come with ext4 file system support compiled in. To create a useable initrd, as root, run the script at /usr/share/mkinitrd/mkinitrd_command_generator.sh It will spit out a string. Copy and pate it, make any modes you may need, and press enter. It will build an initrd.gz file for the installed kernel. If you are using it when upgrading a kernel, you need to add a -k 5.15.xx where xx is the new kernel version. Copy the output to the appropriate location on the ief partition.
Whatever kernel I've been using for the past decade or so did support ext4. I'd rather not use initrd if possible -- depends on what hazel has to say -- but if I decide to do that, would I first have to mount /dev/sda2 and possibly /dev/sda3 (/boot/ufi), then chroot to where I mounted /dev/sda2, then run the script? I'm currently booted from the DVD.
The efi partition needs to be bigger, 1007kb isn’t big enough to hold anything. Maybe shrink the swap by about 200Mb for an efi partition formated as fat32 and mounted to /boot/efi
Quote:
Originally Posted by mrmazda
Can go, I suppose. Should go, not. FAT partitions crude things, no place for keeping Linux kernels or initrds. Symlinks can't be used on them. They belong on a Linux native filesystem. On some distros, when /boot isn't a discrete filesystem, the kernel isn't anywhere in /boot, but just a symlink to /usr/lib/modules/<version>/vmlinuz.
I've been building Slackware systems with the MBR for 20+ years. I've also built GPT dirves (non-booting) for RAID arrays. This is my first venture at attempting to build a UEFI boot drive with Slackware. It has not gone well thus far.
I believe I created the GPT partitions OK (but maybe not). I ran the DVD setup program. I had setup install elilo. Other than elilo vs lilo, this is the usual routine I've done dozens of times. When I exited setup and rebooted, I got some message telling me to use cfdisk to create a needed partition. I wish I had recorded the exact message, but I recall it mentioned 100K, 100M, ... 100 something. I ran cfdisk and took the defaults. I assume it stole what it needed from sda2. I've never heard of cfdisk before and this wasn't mentioned (that I recall) in 'setup'. If this is needful, I'm surprised 'setup' didn't mention it.
Perhaps colorpurple is right and it's too small? Or perhaps mrmazda is right and things shouldn't go there?
This is a new install, so I can wipe and start over. Could someone either give me a step-by-step on creating a bootable UEFI drive, or point me to a correct step-by-step on the web? I've gone throug several how-to web posts and in fact they're all different in some detail.
If all else fails I can always fall back to legacy boot. I just thought I ought to get into the 21st Century.
VFAT encompasses all FAT types that support LFNs. Normally the actual size used in absence of forcing is dependent on partition size, with 512M or so the normal minimum for FAT32, and less falls to FAT16 or even FAT12.
If you partition and format in advance of installation you can have it your way. There are circumstances that require a minimum ESP size of 260M - disk sectors of 4k without 512b emulation, in conjunction with large disk sizes, 16T IIRC. I make mine 320M, but my distro installation count per PC is usually upwards of 12.
partition 3 is to small 1007 KB = 1.007 MB, need at least 200MB and needs to be formatted as fat32
The re-installed worked! Apparently, the problem was as colorpurple said, too small an efi partition. I'm surprised that the 'setup' program says nothing about this. It does detect the EF00 partition if pre-created and asks about formating it, but no mention of the need for this partition during setup. I would think that setup could detect that the computer is booted UEFI and advise about needing the EF00 partition. As it was on my first attempt, it installed everything and it wasn't until I attempted to boot that I got some message about needing this partition and advised using cfdisk to create it. How is a new Slackware user supposed to know to do this? How did any of you know to create this partition in the first place?
Next question on this: normally after upgrading the kernel I run lilo. Now the upgrade-all procedure ends with:
Quote:
Your kernel image was updated, and lilo does not appear to be used on
your system. You may need to adjust your boot manager (like GRUB) to
boot the appropriate kernel (after generating an initrd if required).
Press the "Enter" key to continue...
So, do I just run 'elilo' instead of 'lilo'? There is no man page for elilo. I'm not touching this computer until I get this final step figured out.
Thanks all!
mrmazda: Just curious, what do you mean by "my distro installation count per PC is usually upwards of 12"?
If I remember correctly eliloconfig copies the generic kernel /boot/efi/Slackware and renames vmlinuz along with the initrd. If you want to use the huge kernel, edit /boot/efi/Slackware/elilo.conf to not load the initrd and copy the updated huge kernel to /boot/efi/Slackware/vmlinuz
If I remember correctly eliloconfig copies the generic kernel /boot/efi/Slackware and renames vmlinuz along with the initrd. If you want to use the huge kernel, edit /boot/efi/Slackware/elilo.conf to not load the initrd and copy the updated huge kernel to /boot/efi/Slackware/vmlinuz
There is no manpage for eliloconfig, but the script itself says,
Quote:
# This script installs the elilo boot loader, the kernel, and optionally
# an initrd into the EFI System Partition. A boot menu entry can also be
# installed using efibootmgr. The kernel used will be whatever the symlink
# /boot/vmlinuz points to, and if /boot/initrd.gz exists, that will be
# installed as the initrd.
#
# The EFI System Partition is expected to be mounted on /boot/efi before
# running this script.
My /boot/vmlinuz points to /boot/vmlinuz-huge-5.15.94. The EFI partition is mounted on /boot/efi.
So then, do I just run eliloconfig instead of the "legacy boot" lilo?
(You said, "If I remember correctly ..." Don't you use UEFI on your system? If so, what do you do after a kernel upgrade? Do you manually copy the new kernel to /boot/efi/EFI/Slackware?)
elilo boots the kernel that is located in /boot/efi/EFI/slackware named vmlinuz. The efi partition cannot do symlinks. IF you want to use the generic kernel the run eliloconfig for it copies the generic kernel initrd over, not the huge kernel therefore the need for an initrd. Instead of running eliloconfig. copy the huge kernel to the efi partition named as vmlinuz would be all you need to do if you want to use the huge kernel.
Last edited by colorpurple21859; 03-20-2023 at 11:31 AM.
I ran eliloconfig, but it looked like it wanted to install elilo, not simply copy the kernel. So, I canceled that and manually copied /boot/vmlinuz to /boot/efi/EFI/Slackware. The resulting vmlinuz file is the same size as /boot/vmlinuz-huge-5.15.94. I then rebooted. It came up OK and 'uname -a' says kernel 5.15.94.
One (hopefully last) point of confusion; when the computer boots it shows:
I've never used the initrd stuff, and I don't recall consciously doing anything with that on this go-round. The date on the /boot/efi/EFI/Slackware/initrd.gz file is two days ago whereas my vmlinuz file in the same directory is from today.
Did it load initrd.gz as advertised or ignore it? Am I running something to do with initrd? I don't really want to mess with initrd, so what do I need to do to just make sure I load the vmlinuz-huge?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.