LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-11-2022, 09:04 AM   #1
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Slackware "specific" Kernel stuff questions


So.. I'm returning to Slackware after using a bunch of distroes since Debian Sarge/Etch era. So, there are some things in regards to compiling and installing the Kernel that is different in Slackware (lilo, symlinks) than in many other distroes.

I'm seeking some clarity on those things, if someone would care to explain them to me.

First there is the symlink /usr/src/linux. What is the background and purpose of this? As oppose to just the regular folders "linux-$VERSION"?

Second is related to it, the symlinks in /boot. Same question.. And what are they for actually? How are you suppose to use them?

I remember these symlinks from back in the days, but I've forgotten how to work with them properly and what exactly they are for. Help?

And then the last question, in regards to Lilo and "make install" for those who use Grub instead of Lilo. I use Grub and not Lilo, but when I run make install it "fails" and says I don't have Lilo. I know that. It's not that I'm lazy and/or can't do "make install" manually. But my question is, what is it that makes some Kernel buildscripts and arch/x86/Makefile "decide" that I have Lilo? I ask that, because it seems like it is the Kernel build itself that decides that I have Lilo, even though I don't. I'm trying to find something to edit, but I don't understand what
It's just that it would be nice to be able to do "make install".

If anyone had some clarifying information on these topics it would be highly appreciated. Thanks!


Last edited by zeebra; 02-11-2022 at 09:09 AM.
 
Old 02-11-2022, 09:20 AM   #2
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
I use Grub and not Lilo, but when I run make install it "fails" and says I don't have Lilo. I know that. It's not that I'm lazy and/or can't do "make install" manually. But my question is, what is it that makes some Kernel buildscripts and arch/x86/Makefile "decide" that I have Lilo? I ask that, because it seems like it is the Kernel build itself that decides that I have Lilo, even though I don't.
This is not Slackware specific. It's in the kernel.org source code:
https://git.kernel.org/pub/scm/linux...oot/install.sh

Trying to run lilo is in the end of the file.

'make help' gives the explanation:
Code:
  install               - Install kernel using (your) ~/bin/installkernel or
                          (distribution) /sbin/installkernel or install to 
                          $(INSTALL_PATH) and run lilo

Last edited by Petri Kaukasoina; 02-11-2022 at 09:28 AM.
 
1 members found this post helpful.
Old 02-11-2022, 09:33 AM   #3
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
The symlinks are there so you can refer to them in /etc/lilo.conf and not have to edit /etc/lilo.conf after kernel upgrades - all you have to do is rerun lilo. Personally, I don't use the symlinks; I refer to the actual files in my boot config files (I use elilo).

So you can just ignore the symlinks (I don't make use of them).

If you want to run "make install" you can write your own /sbin/installkernel. See here (and following posts):
https://www.linuxquestions.org/quest...0/#post6324666
 
1 members found this post helpful.
Old 02-11-2022, 09:38 AM   #4
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Petri Kaukasoina View Post
This is not Slackware specific.
But how is that possible, when I can build the exact same Kernel the exact same way on for example Mageia? And it doesn't expect me to have Lilo, and so don't fail to do make install when I don't have Lilo..

I just don't get this, something triggers the Kernel build to expect I have Lilo, but what?
Like Kernel build decide I'm using Slackware, and since I'm using Slackware it assumes I have Lilo.

I don't know, what else could it be?
 
Old 02-11-2022, 09:44 AM   #5
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by drumz View Post
The symlinks are there so you can refer to them in /etc/lilo.conf and not have to edit /etc/lilo.conf after kernel upgrades - all you have to do is rerun lilo. Personally, I don't use the symlinks; I refer to the actual files in my boot config files (I use elilo).

So you can just ignore the symlinks (I don't make use of them).
Ahh, that makes sense. I actually like the symlinks frankly. It's easier if generic is always the latest generic and I don't have to use long names to configure the bootloader. And in case I'm fumbling in the blind it's easy to fall back to that name. And if you have a bunch of kernels and versions in /boot, the symlinks also stand out.

But I didn't know what they were for exactly, but what you say makes alot of sense (also in Grub).
 
Old 02-11-2022, 09:48 AM   #6
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
First there is the symlink /usr/src/linux. What is the background and purpose of this? As oppose to just the regular folders "linux-$VERSION"?
I don't have /usr/src/linux* installed, as I don't keep any other source code installed either after build. And I build my kernel under my own home directory as user, not root. But I guess /usr/src/linux is there for historic reasons. If I remember right, /usr/include/asm and /usr/include/linux used to be symbolic links to corresponding directories under /usr/src/linux.
 
Old 02-11-2022, 09:49 AM   #7
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by drumz View Post
Please examine the script ./arch/x86/boot/install.sh (found in the kernel source directory) to see if it does what you want. If not, create your own /sbin/installkernel to override it.
That's the one I meant actually!
How is that generated exactly, and why does it have so many references to Lilo? or better yet, what and where are the variables that decides what goes in there?
 
Old 02-11-2022, 09:50 AM   #8
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
But how is that possible, when I can build the exact same Kernel the exact same way on for example Mageia? And it doesn't expect me to have Lilo, and so don't fail to do make install when I don't have Lilo..
Either they have patched the kernel (that Slackware does not do) or they have installed /sbin/installkernel to override the default lilo invocation.
 
1 members found this post helpful.
Old 02-11-2022, 09:55 AM   #9
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
That's the one I meant actually!
How is that generated exactly, and why does it have so many references to Lilo? or better yet, what and where are the variables that decides what goes in there?
It is not generated. Linus Torvalds wrote it in 1995. There are lots of references to lilo in the kernel source tarball. For example:
https://git.kernel.org/pub/scm/linux...ide/README.rst

It tells among other things:

Code:
   If you boot Linux from the hard drive, chances are you use LILO, which
   uses the kernel image as specified in the file /etc/lilo.conf.  The
   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
   /boot/bzImage.  To use the new kernel, save a copy of the old image
   and copy the new image over the old one.  Then, you MUST RERUN LILO
   to update the loading map! If you don't, you won't be able to boot
   the new kernel image.
 
   Reinstalling LILO is usually a matter of running /sbin/lilo.
   You may wish to edit /etc/lilo.conf to specify an entry for your
   old kernel image (say, /vmlinux.old) in case the new one does not
   work.  See the LILO docs for more information.
   
   After reinstalling LILO, you should be all set.  Shutdown the system,
   reboot, and enjoy!
 
1 members found this post helpful.
Old 02-11-2022, 09:58 AM   #10
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Petri Kaukasoina View Post
I don't have /usr/src/linux* installed, as I don't keep any other source code installed either after build. And I build my kernel under my own home directory as user, not root. But I guess /usr/src/linux is there for historic reasons. If I remember right, /usr/include/asm and /usr/include/linux used to be symbolic links to corresponding directories under /usr/src/linux.
Well, that's another discussion alltogether. But my thinking is that if I'm going to run the Kernel and let is control everything on my computer, then how can I not trust the build process? If I can't trust the kernel to compile as root, then I probably also can't trust to run it. Besides I'd rather not have a mess in my /home, and I quite like /usr/src
 
Old 02-11-2022, 10:01 AM   #11
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Petri Kaukasoina View Post
It is not generated. Linus Torvalds wrote it in 1995. There are lots of references to lilo in the kernel source tarball. For example:
https://git.kernel.org/pub/scm/linux...ide/README.rst

It tells among other things:
But I don't have Lilo on another distro and it does make install without giving me Lilo error.

I'm pretty sure if I looked at arch/x86/boot/install.sh when doing it in a non-lilo distro, that there will be few or no references to Lilo in there.


Quote:
Originally Posted by Petri Kaukasoina View Post
Either they have patched the kernel (that Slackware does not do) or they have installed /sbin/installkernel to override the default lilo invocation.
But I'm talking about the same custom Kernel from kernel.org that I build and install myself.

Last edited by zeebra; 02-11-2022 at 10:04 AM.
 
Old 02-11-2022, 10:03 AM   #12
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I guess the real question is, what is it and how is it exactly that arch/x86/boot/install.sh is generated. What affects it?

Last edited by zeebra; 02-11-2022 at 10:05 AM.
 
Old 02-11-2022, 10:03 AM   #13
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
But I don't have Lilo on another distro and it does make install without giving me Lilo error.
On the other system, do you have file /sbin/installkernel? Look inside it.
 
1 members found this post helpful.
Old 02-11-2022, 10:08 AM   #14
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,938

Rep: Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568Reputation: 1568
Quote:
Originally Posted by zeebra View Post
I'm pretty sure if I looked at arch/x86/boot/install.sh when doing it in a non-lilo distro, that there will be few or no references to Lilo in there.
OK, if you have, say, a windows machine available (I guess it's a non-lilo distro), you can use it to look again at this url to Linus's source git, if you think arch/x86/boot/install.sh somehow changes when you look it from Slackware: https://git.kernel.org/pub/scm/linux...oot/install.sh
 
1 members found this post helpful.
Old 02-11-2022, 10:10 AM   #15
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834

Original Poster
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by Petri Kaukasoina View Post
On the other system, do you have file /sbin/installkernel? Look inside it.
I dunno, I'm only running Slackware at the moment. But how would that override make?

It's not a problem or anything like that. I can install a custom Kernel in Slackware any time. I'm just trying to figure it out, out of curiosity and to know how it works.
 
  


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
Debian 8-NFS-Deny access to specific IP to specific "share" directory george102 Linux - Server 0 06-13-2016 04:45 AM
2 specific Sendmail questions about "delay_checks" and "Connect:" in access.db fast-reflexes Linux - Server 0 08-05-2010 09:33 AM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 04:37 PM
Expert needed: Internet connection blues (vector-specific stuff) mymojo VectorLinux 1 12-07-2003 10:23 AM

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

All times are GMT -5. The time now is 12:09 PM.

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