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.
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!
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.
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).
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.
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).
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.
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?
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.
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?
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!
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.