Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
It boots. I'm using it now within Slackware. So the instructions do work, except for the make install in my specific case. I'm glad I included a paragraph on manual installation (which I followed carefully yesterday). If anyone else runs into my weird problem, they can use that.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Original Poster
Rep:
I was thinking about your issues earlier on today Hazel, and while it's a bit of a long shot, and you may have already checked it; Is there any symlink called "vmlinuz" pointing to your installation kernel? Because there must be something pointing to it. Perhaps failing that, it might be an idea to contact PV and see if he can shed any light on it for you.
I'm still yet to configure and build kernel 5.10.3 myself to test make install, as I just haven't really had the time to do it today. But I'll hopefully get some time in the next couple of days and get back ya with my "findings".
No. I have a link called vmlinuz-generic but that points to my regular kernel (5.4.25) as I would have expected. AFAIR this is a kernel that I installed via installpkg from Slackware-current. /boot/vmlinuz also exists but it is a file, not a link, and the file command reports it as the new kernel. So maybe it was installed by the script after all, and the error came afterwards.
I doubt if it is any of PV's business, given that I have been deleting kernels and module directories by hand instead of doing it properly by using removepkg. It's hardly surprising if the system has ended up in a bit of a mess!
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Original Poster
Rep:
Does the timestamp on vmlinuz match the time you ran make install?
Because if the install script that make install executes doesn't look for old kernels, then the only other thing I could think of would be a symlink with the name "vmlinuz" pointing to your installation kernel.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Original Poster
Rep:
I dare say that make install did in fact install it then if the timestamp matches when you ran make install, but for some reason complained about your installation kernel anyway... strange.
Hello, I now start building the kernel.
On this page it reads:
Prerequisites for your system
To build any software, you need a set of tools for the purpose such as
a compiler to create the binary code
tools for linking, indexing and otherwise handling the resultant binaries,
informative headers for the various libraries that you wish to link to; the compiler needs these to ensure that the program is handling library functions correctly
a way of selecting and building in the many optional configuration variables that the developer has provided for you
and so forth. GNU provides a standard set of such tools for this purpose which is known as the GNU build system.
A full list of the build tools required might be rather offputting. Fortunately most Linux distributions either include these tools in a standard install, or provide them in a single installable package. For example, all distributions in the Debian family (such as Ubuntu) have a package called build-essential, which contains everything you need for most builds.
So I have to install buold-essential?
Code:
sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Is version 12.6 good version?
Everything is already there?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Original Poster
Rep:
So, I pretended I was completely new to building a kernel myself, and followed our article, step, by step. I was able, completely based on our article, to configure, build and install a bootable kernel (5.10.3), with no problems to speak of.
I also tried to recreate Hazel's problem by deleting kernel 5.5 that was originally installed when I installed OpenMandriva. But make install still worked without any error message complaining about any previous kernel. I repeated the same process with kernel 5.9, but still got no errors from make install (except the one about LILO that we already mention in the article and that was completely expected, since I use GRUB and not LILO). So not sure exactly what happened with Hazel's system, but I had no problems whatsoever with make install on my system.
I can't think of anything else that we've missed in the article, nor anything that should be added or changed.
Anymore thoughts about the article's content from anyone? Anyone found any issues with any of the steps in the article? Thoughts?
...
Last edited by jsbjsb001; 12-31-2020 at 03:12 AM.
Reason: added kernel version
sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Is version 12.6 good version?
Everything is already there?
Should be OK. Just proceed according to instructions. And please change your signature. It's offensive.
When "make install" is run it will replace /boot/vmlinuz if it exist. This should be mentioned for distros that uses a /boot/vmlinuz either as a kernel name or as a link to another kernel as slackware does.
Last edited by colorpurple21859; 12-31-2020 at 04:33 PM.
When "make install" is run it will replace /boot/vmlinuz if it exist. This should be mentioned for distros that uses a /boot/vmlinuz either as a kernel name or as a link to another kernel as slackware does.
Thanks, that's useful information. I've rewritten that paragraph. But as far as I can see, Slackware uses the name vmlinuz-generic for its link, not vmlinuz. I assume that if you install a huge kernel, it would be called vmlinuz-huge.
From my stock slackware-current, I installed slackware about three years ago when I received this laptop for a present, only use slackpkg to update no additional software installed.
Code:
jab@mylaptop:~$ ls -l /boot/vmlinuz
lrwxrwxrwx 1 root root 19 Dec 30 18:52 /boot/vmlinuz -> vmlinuz-huge-5.10.4
jab@mylaptop:~$
Last edited by colorpurple21859; 01-01-2021 at 08:13 AM.
I just checked the doinst.sh script for the generic kernel. The operative lines are:
Code:
( cd boot ; rm -rf vmlinuz-generic )
( cd boot ; ln -sf vmlinuz-generic-4.4.172 vmlinuz-generic )
( cd boot ; rm -rf vmlinuz )
( cd boot ; ln -sf vmlinuz-generic-4.4.172 vmlinuz )
So yes, there should be a vmlinuz link alongside the vmlinuz-generic one. I have a feeling that, what with all my manual fiddling, that vmlinuz link must have been left pointing to the deleted installation kernel. That would explain the error message when that kernel image couldn't be found. But I'm not sure why it still happens. The last experimental build I did was with a freshly unpacked tarball.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Original Poster
Rep:
Quote:
Originally Posted by hazel
...So yes, there should be a vmlinuz link alongside the vmlinuz-generic one. I have a feeling that, what with all my manual fiddling, that vmlinuz link must have been left pointing to the deleted installation kernel. That would explain the error message when that kernel image couldn't be found. But I'm not sure why it still happens. The last experimental build I did was with a freshly unpacked tarball.
I think that explains why make install was complaining about your installation kernel then, like I said before, it was the only reason I could think of as to why make install would even know about your installation kernel if the kernel's install script doesn't look for old kernel's itself. But that said, it still sounds like make install did in fact install the new kernel, it just overwrote the link with an actual file instead. Is there a file called "vmlinuz.old" that is a symlink to your installation kernel?
I couldn't check if Slackware does have a link in the name of "vmlinuz" myself, since I'm not a Slackware user. But I think colorpurple21859 has pretty much confirmed my suspicions about why make install was complaining about your installation kernel, at least in the first place.
Is there a file called "vmlinuz.old" that is a symlink to your installation kernel?
There may have been originally. But as I've repeated the operation a few times, the last vmlinuz.old file that I found was just the previous version of the experimental kernel.
We'll never be able to reconstruct the problem now. But I've edited the wiki a bit to say that the make install option installs the kernel as vmlinuz and renames any existing file of that name to vmlinuz.old, which may not be what you want. That makes the alternative install method (in which you choose the name) follow on rather well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.