LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-31-2021, 11:34 AM   #16
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,819

Rep: Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984

If you use elilo, only run eliloconfig once to register it. eliloconfig copies the initrd.gz and the vmlinunz to efi/EFI/Slackware. Occasionally eliloconfig fails to do an update properly and messes up the efibootmgr, so it is best to just copy the new initrd.gz and vmlinuz to
Code:
bash-5.1$ pwd
/boot/efi/EFI/Slackware
each kernel update.
 
Old 08-31-2021, 02:25 PM   #17
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 184

Rep: Reputation: Disabled
If you were using the huge kernel with no initrd previously, then you shouldn't need an initrd with it now.

For me, once I got my head around how UEFI works, it was much easier to understand.

When you power-on your system, the built-in UEFI system in your box looks for a FAT partition, as this is all it can read.
When it finds one, it looks for an efi binary that it can run. In the case of elilo, this is the "elilo.efi" binary.
Then it simply runs that and its job is over.

So now "elilo.efi" is in charge. It looks for its config file "elilo.conf" in the same directory.
Here is my simple elilo.conf:
Code:
delay=20
root=/dev/nvme0n1p2       # or /dev/sda2 or ...
read-only
#

image=vmlinuz
	label=vmlinuz

image=vmlinuz-old
	label=vmlinuz-old
The first "image=..." entry is the default, and it waits for 2 seconds before booting it.

It is a good idea to keep an old kernel (along with its modules) as a backup in vmlinuz-old
To upgrade your kernel, all you do is copy the new huge kernel to "vmlinuz"

Here is what the whole directory looks like:
Code:
$ tree /boot/efi/EFI/Slackware/
/boot/efi/EFI/Slackware/
├── elilo.conf
├── elilo.efi
├── vmlinuz         # current huge kernel
└── vmlinuz-old     # backup huge kernel
To upgrade the kernel, you just run
Code:
cp /boot/vmlinuz-huge /boot/efi/EFI/Slackware/vmlinuz
ps If you like the old lilo ways, you could add that to /root/.bashrc as an alias :-)
 
3 members found this post helpful.
Old 08-31-2021, 05:51 PM   #18
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by FTIO View Post
With lilo, all I had to do was download the new kernel stuff I got when the Slackware e-mail came in to my mailbox, and do an:

Code:
upgradepkg *.txz
(I had a directory just for any new packages that were being 'upgraded' and then I would delete those packages afterward from the directory)

Then I would do:

Code:
lilo
And be done.
OK, so the good news is that your process isn't going to be much different with eLILO.

After installing the new kernel packages using
Code:
upgradepkg *.txz
All you need to do is:

Code:
# cp /boot/vmlinuz-huge /boot/efi/EFI/Slackware/vmlinuz
Boom. Job done.

As others have pointed out, you don't need an initrd if you're using the huge kernel, so don't worry about it.

Note: By default, the current Slackware installer will install the generic kernel and an initrd. Copying the huge kernel into its place might cause some error messages on the screen as the initrd tries to load. Those messages can safely be ignored, but if you want to stop them you can edit /boot/efi/EFI/Slackware/elilo.conf and comment out the initrd line.
Quote:
Originally Posted by FTIO View Post
I'm also going to try lilo when 15 comes out and see how things go.
LILO doesn't work with nvme drives.

Last edited by rkelsen; 08-31-2021 at 06:12 PM.
 
4 members found this post helpful.
Old 09-01-2021, 03:24 PM   #19
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,804

Rep: Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444Reputation: 4444
Quote:
Originally Posted by rkelsen View Post
LILO doesn't work with nvme drives.
Actually, it can. There is some dependence on specific BIOS/UEFI firmware specifics but generally if the NVME drive is assigned in BIOS, it will boot from lilo. If a specific firmware doesn't boot, it isn't hard to use the MBR of a mechanical drive and "handoff" the process to NVME since very early on modern Linux kernels will see NVME just fine. I've done the latter for years on an older boxen whose firmware does not "see" NVME as an expected drive. I still use this machine with a mixture of mechanical and SSD drives, some of which boot from Legacy MBR lilo, and others as EFI with rEFInd.
 
1 members found this post helpful.
Old 09-01-2021, 07:38 PM   #20
ethelack
Member
 
Registered: Mar 2021
Location: New Zealand
Distribution: Slackware
Posts: 81

Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
P.S.
If dual booting windows with elilo is possible please let me know, I'm not going to switch back to elilo but if it is possible it would be nice to know how.
On some systems Elilo will hand back control to the computer firmwares boot manager to autoboot Windows when a dummy stanza is used. This works on my HP Elitedesk 800.


image=no_windows
label=Windows-10
read-only

Last edited by ethelack; 09-01-2021 at 08:11 PM.
 
1 members found this post helpful.
Old 09-01-2021, 09:37 PM   #21
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,154

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
Quote:
Originally Posted by rkelsen View Post
...........
LILO doesn't work with nvme drives.
Au contraire!
It won't boot a f2fs partition, but it will boot a ext4 partition on SSD drives. I have a small ext4 partition set up as /boot, and / and /home are on F2FS partitions.

Last edited by cwizardone; 09-01-2021 at 09:42 PM.
 
Old 09-02-2021, 03:32 AM   #22
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by FTIO View Post
Hiya gang,

Sorry to bring this up again, but I guess I've just gotten too old or something is just not clicking in the brain anymore enough that I just can't seem to wrap my head around being able to do the whole kernel upgrade thing and the initd along with it.
Well, sometimes the old fashion way is just better and easier. Using a /boot partition for example, not using an initrd, and configuring your own kernel for your machine. Not only does it compile ALOT faster if you get rid of all the stuff that is irrelevant to your hardware, but you can build in any "hard requirements" instead of having them as modules. For example encryption, if you want to use enrypted / or anything else you supposedly need an initrd for. Your boot will be faster without an initrd as well, and there will be less points of failure in the boot sequence.

And eh, I don't want to be that guy, but eh, Grub is quite an easy bootloader to handle most of the time. Perhaps it could ease your burden? Maybe read up on some basics of grub and give it a try?
In particular if you mess up grub, or something during boot, it's very easy to get it booting by editing the grub boot entries at boot if something is not quite right.

And ofcourse, always keep a working sequence in the bootloader alongside any new one, so you can boot the working one in case of any troubles with the new one(s).

Ps. initrd is a great tool for distribution of generic Kernels for a variety of users and hardware

Last edited by zeebra; 09-02-2021 at 03:34 AM.
 
Old 09-03-2021, 12:39 PM   #23
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Original Poster
Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Originally Posted by hazel View Post
Whether you need an initrd or not has nothing to do with your bootloader but exclusively with your kernel. In Slackware it's particularly simple. Most people who use the huge kernel don't need an initrd because all the drivers they need are inside the kernel already. If you use the generic kernel, then you need to put those drivers in an initrd, which you make with the mkinitrd compound each time you install a new kernel. But first you use Patrick's script in /usr/share/mkinitrd, which will scan your hardware and tell you exactly what modules you need to specify in that command.

When I first started using Linux, everyone booted from an ide hard drive and the root partition on that drive would always have an ext2 filesystem on it, so those drivers were built into stock kernels and you didn't need an initrd. Nowadays you do on most distros because they build everything as modules. But you still don't on Slackware if you use the huge kernel.
AHA!! *THIS* seems to have 'clicked' for me for some reason and was pretty much what I needed to read I believe. It's always some little thing, seen or read in some way that is, sometimes minutely, different from all the others that are saying basically the same thing (I hope that all made sense!).

So, with elilo, if I get one of the 'security' e-mails about needing to 'upgrade' the kernel, I simply do the 'upgrade <kernel stuff>' like I've always done with lilo if I continue to use the huge kernel, and don't even need to do 'elilo' after? Is this correct?
 
Old 09-03-2021, 12:49 PM   #24
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Original Poster
Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Originally Posted by rkelsen View Post
OK, so the good news is that your process isn't going to be much different with eLILO.

After installing the new kernel packages using
Code:
upgradepkg *.txz
All you need to do is:

Code:
# cp /boot/vmlinuz-huge /boot/efi/EFI/Slackware/vmlinuz
Boom. Job done.

As others have pointed out, you don't need an initrd if you're using the huge kernel, so don't worry about it.

Note: By default, the current Slackware installer will install the generic kernel and an initrd. Copying the huge kernel into its place might cause some error messages on the screen as the initrd tries to load. Those messages can safely be ignored, but if you want to stop them you can edit /boot/efi/EFI/Slackware/elilo.conf and comment out the initrd line.

LILO doesn't work with nvme drives.
WOOHOO! This and the post from Loomx I believe have done the trick to making things finally click together. I seem to be the worst case of needing *MANY* examples with certain subjects before one finally helps me understand what most others picked up the first instant, heh.

Thank you *ALL* for putting up with me and this seemingly never-ending dilemma I had and getting me the answer(s) I needed!
 
Old 09-03-2021, 12:53 PM   #25
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,663
Blog Entries: 19

Rep: Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484Reputation: 4484
Quote:
Originally Posted by FTIO View Post
So, with elilo, if I get one of the 'security' e-mails about needing to 'upgrade' the kernel, I simply do the 'upgrade <kernel stuff>' like I've always done with lilo if I continue to use the huge kernel, and don't even need to do 'elilo' after? Is this correct?
Yes. There's no /sbin/elilo program that you need to run to reconfigure ELILO as there is to reconfigure LILO. That's because LILO uses physical addresses and has to be reset to the addresses of the new kernel and initrd. ELILO uses the vfat filesystem to find these by name. If you change the name of the kernel, you'll need to edit that into elilo.conf but you won't need to run a special reconfiguration program afterwards. And if you use a constant name for all your kernels, you won't even need to do an edit. Just copy the new kernel to the esp, overwriting the old one (better make a safety copy first!), and you're good to go

Last edited by hazel; 09-03-2021 at 01:14 PM.
 
Old 09-03-2021, 03:06 PM   #26
gauchao
Member
 
Registered: Dec 2009
Location: Veneto
Distribution: Slackware64
Posts: 366

Rep: Reputation: 143Reputation: 143
Quote:
As others have pointed out, you don't need an initrd if you're using the huge kernel, so don't worry about it.
I have a Slackware64-current (kernel 5.14.0) running with eLILO. After every kernel upgrade I am used to mkinitrd and then cp the initrd + vmlinuz* from /boot to /boot/efi/EFI/Slackware.

My elilo.conf, however, points to the huge-kernel, not the generic (vmlinuz being a symbolic link to vmlinuz-huge under /boot) - here is my elilo.conf:

Quote:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
label=vmlinuz
initrd=initrd.gz
read-only
append="root=/dev/sda3 vga=normal ro"
Everything is working fine. Do I need initrd? Is it being used? Or the initrd should be used only in conjuntion with the generic kernel?

Last edited by gauchao; 09-03-2021 at 04:50 PM.
 
Old 09-03-2021, 07:44 PM   #27
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by gauchao View Post
Everything is working fine. Do I need initrd? Is it being used? Or the initrd should be used only in conjuntion with the generic kernel?
From the looks of it, I'd say that you're using the huge kernel and therefore don't need an initrd. You only need to use an initrd if your kernel doesn't have filesystem support built in (as per the generic kernel, which has no filesystem support built in at all).

If you want to be double-sure, then copy /boot/vmlinuz-huge to /boot/efi/EFI/Slackware/vmlinuz

I'm not 100% sure of what happens with the vmlinuz symlink, but the vmlinuz-huge one always points to the huge kernel. That's why I suggested it to FTIO above.

EDIT: If you're running the huge kernel and you see these types of messages on the screen:
Code:
insmod /lib/modules/5.xx.xx/kernel/fs/jbd2/jbd2.ko
[x.xxxxx] jbd2: exports duplicate symbol jbd2__journal_restart (owned by kernel)
modprobe: ERROR: could not insert 'jbd2': Exec format error
It's because the initrd is trying to load modules which are built into the huge kernel. You can safely ignore these messages, but to stop them from appearing you can remove the initrd line from /boot/efi/EFI/Slackware/elilo.conf

Last edited by rkelsen; 09-03-2021 at 08:56 PM.
 
3 members found this post helpful.
Old 09-04-2021, 07:34 AM   #28
gauchao
Member
 
Registered: Dec 2009
Location: Veneto
Distribution: Slackware64
Posts: 366

Rep: Reputation: 143Reputation: 143
Thank you, rkelsen. I guess I am running huge-kernel. From dmesg I can read the messages you wrote, but without an error warning. See below:

Quote:
[ 4.221395] Run /init as init process
[ 4.221620] with arguments:
[ 4.221620] /init
[ 4.221621] with environment:
[ 4.221621] HOME=/
[ 4.221621] TERM=linux
[ 4.221621] BOOT_IMAGE=dev000:\EFI\Slackware\vmlinuz
[ 4.221622] vga=normal
[ 4.232400] udevd[333]: starting eudev-3.2.10
[ 4.409307] jbd2: exports duplicate symbol jbd2__journal_restart (owned by kernel)
[ 4.437224] mbcache: exports duplicate symbol __mb_cache_entry_free (owned by kernel)
[ 4.465968] jbd2: exports duplicate symbol jbd2__journal_restart (owned by kernel)
[ 5.515352] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 6.900902] loop: module loaded
[ 7.281014] udevd[774]: starting eudev-3.2.10
 
Old 09-04-2021, 08:17 AM   #29
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,375

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
Everything is working fine. Do I need initrd? Is it being used? Or the initrd should be used only in conjuntion with the generic kernel?
A stock slackware install doesn't need an initrd with a huge kernel. However there are exceptions to this rule. If you use "root=UUID=<root partition uuid> instead of "root=/dev/<root-dev-partition> in the bootloader kernel options, yes an initrd is needed with the huge kernel. I have also seen on some hardware setups that an initrd is needed with the huge kernel, but these setups are rare and usually require the generic kernel with an initrd.

Last edited by colorpurple21859; 09-04-2021 at 08:30 AM.
 
3 members found this post helpful.
Old 09-04-2021, 06:46 PM   #30
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by gauchao View Post
Thank you, rkelsen. I guess I am running huge-kernel. From dmesg I can read the messages you wrote, but without an error warning. See below:
Yes, you're running the huge kernel. The errors only appear on screen while the system is booting, but the lines in your dmesg output show that the initrd is trying to load. It's no big deal, you can ignore it.
 
1 members found this post helpful.
  


Reply



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
rEFInd and GRUB messups of NuTyX under BtrFS hd_scania NuTyX 6 02-02-2021 04:54 AM
[SOLVED] Booting huge kernel with Grub or rEFInd gives kernel panic. Daedra Slackware 9 12-14-2020 08:56 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
lilo x elilo x grup2 x UEFI afreitascs Slackware 5 09-09-2012 10:55 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:27 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