LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-19-2023, 10:30 AM   #16
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492

Quote:
Originally Posted by mrmazda View Post
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
 
Old 03-19-2023, 12:19 PM   #17
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
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
 
Old 03-19-2023, 12:24 PM   #18
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Quote:
Originally Posted by mfoley View Post
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.
 
Old 03-19-2023, 01:36 PM   #19
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
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.
 
Old 03-19-2023, 02:16 PM   #20
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by hazel View Post
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 View Post
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.

Last edited by mfoley; 03-19-2023 at 02:17 PM.
 
Old 03-19-2023, 09:03 PM   #21
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by colorpurple21859 View Post
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 View Post
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.

Last edited by mfoley; 03-19-2023 at 09:07 PM.
 
Old 03-19-2023, 09:11 PM   #22
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
Number Start (sector) End (sector) Size Code Name
1 2048 12584959 6.0 GiB 8200 Linux swap
2 12584960 1953525134 925.5 GiB 8300 Linux filesystem
3 34 2047 1007.0 KiB EF00
partition 3 is to small 1007 KB = 1.007 MB, need at least 200MB and needs to be formatted as fat32

Last edited by colorpurple21859; 03-19-2023 at 09:13 PM.
 
1 members found this post helpful.
Old 03-19-2023, 10:12 PM   #23
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
OK, starting over, will make EF00 partition 200M.

BTW - 'setup' wants to format the EF00 partition as vfat, not fat32.

Last edited by mfoley; 03-19-2023 at 10:29 PM.
 
Old 03-19-2023, 10:51 PM   #24
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,877
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
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.
 
Old 03-20-2023, 08:35 AM   #25
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by colorpurple21859 View Post
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"?

Last edited by mfoley; 03-20-2023 at 08:36 AM.
 
Old 03-20-2023, 09:25 AM   #26
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
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
 
Old 03-20-2023, 10:38 AM   #27
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by colorpurple21859 View Post
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?)

Last edited by mfoley; 03-20-2023 at 10:42 AM.
 
Old 03-20-2023, 11:28 AM   #28
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
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.
 
Old 03-20-2023, 11:52 AM   #29
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,612

Original Poster
Rep: Reputation: 180Reputation: 180
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:
Code:
ELILO v3.16 for EFI/x86_64
.
Loading kernel vmlinuz... done
Loading file initrd.gz...done
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?
 
Old 03-20-2023, 12:14 PM   #30
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Do not run eliloconfig, copy the huge kernel over manually. Edit /boot/efi/EFI/Slackware/elilo.conf to remove the initrd line.

Last edited by colorpurple21859; 03-20-2023 at 12:16 PM.
 
1 members found this post helpful.
  


Reply

Tags
uefi booting



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UEFI Class 3 :: To use UEFI, or not to use UEFI? jheengut Slackware 19 12-30-2020 09:24 AM
[SOLVED] Install non-UEFI system from a UEFI USB? andrew.46 Slackware 10 04-08-2020 11:28 PM
Mobo only supports uefi boot - how do I boot off a non-uefi cd? Ulysses_ Linux - Hardware 3 02-25-2016 08:06 PM
Help Creating UEFI A MENU For My Bootable (BIOS/UEFI) CDROM ssenuta Linux - Hardware 0 08-27-2012 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration