[SOLVED] Slackpkg_current kernel + 5.x kernel + win10 in LILO, Bonus change Lilo boot bitmap image
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.
Slackpkg_current kernel + 5.x kernel + win10 in LILO, Bonus change Lilo boot bitmap image
As the tile suggests, I want to learn how to create, and run, at least two kernels, in parallel on my machine.
I already have my LILO setup to dual-boot Win10 and Slackware(current) but I wanna try having a more recent kernel, both for reasons of backup, as well as to try whether or not some of my other devices can be better and/or in more detail configured.
The state of things is the following:
I downloaded from kernel.org the 5.3.9 tarball, put it in /usr/src/ and ran a "make" for the kernel. After an hour or so, kernel compile seems to be done, but the kernel.org instructions fail to reach me on how to add a second kernel in parallel to a working one.
The idea is to have, whatever kernel is current for Slackware, at the time of writing, 4.19.82 and to have the other 5.3.9. with all its modules and separate ramdisk and whatever else is required, selectable and bootable in LILO.
While on the topic of messing around with LILO,
How to change the default "slack.bmp" image that is loaded at boot-time to a picture I might prefer better?
First you'll have to use mkinitrd to create an initrd image for the new kernel. You can use the existing /boot/initrd-tree but be sure to use the -k option to name your new kernel version. That way the script will know where to get the correct kernel modules from. Make sure you give it a new name too, because you don't want it to overwrite the existing image.
Adding an extra kernel to LILO is easy. Just create an extra stanza in lilo.conf with the path to your new kernel and initrd image. Make sure you specify the same root partition on the kernel command line. Then run /sbin/lilo.
What should I pass to the mkinitrd as arguments so that it creates a bootable kernel with its own modules?
If you look in /usr/share/mkinitrd, you will find a useful diagnostic script that you can run. It will interrogate your hardware and then print out a list of the command line options you need to pass to mkinitrd. The mkinitrd man page is also very useful.
mkinitrd does not create a bootable kernel. It's job is to create the initial root device that goes with the kernel. The process for creating a kernel is:
1. Unpack the source.
2. Copy over the current configuration file (stored in /boot) as .config.
3. Configure with make menuconfig or similar.
4. Make
5. Copy over the bzImage file from /arch/x86_64/boot to /boot/vmlinuz-generic-x.y.z.
6. Make modules_install
Quote:
Afterwards, how do I differentiate in /boot/ between the "old" and "new" kernel?
You don't have to. Just make sure that the new kernel and the new initrd have distinctive names. Then make a new stanza in lilo.conf based on the existing one but with the new kernel and initrd names in it and a new label.
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935
Rep:
Quote:
Originally Posted by mlangdn
This doc is still relevant for the 5x kernel builds. A lot of your questions are answered here.
I was posting that link too, I follow it to build 5.3.x and 5.4-rcx kernels.
About Lilo background image, open an image in Gimp and resize it to 640x480.
The image will most likely be distorted, you can edit it to look more natural.
Then convert it to indexed color with dither, then export it as bmp checking
the option 'Do not check color...' or Lilo won't recognize it as a valid image.
For menu and timer position, take a look at one of the .dat files in /boot.
'lilo -E image.bmp' edits the values and saves directly to the bmp file or the
companion .dat file.
There isn't need to edit lilo.conf to add a new bmp file every time,
you can run lilo with -B option.
As an alternative to initrd, you can build into the kernel the modules that it needs to boot on your hardware (this is mainly the filesystem). Here are my changes to the config file:
Bonus part I figured out, once I came to terms that "dither" and "Do not check color" options refer to within gimp, and also with exporting to bmp and not saving in gimp format. Never been a true lover of imaging-manipulation programs
(I have a buddy who usually does this for me, but not today)
As far as the kernel 5.3.9. is concerned, I managed to achieve the following:
I unpacked the source .xz from kernel archives website to my /usr/src/ and then "make menuconfig" and after making sure I checked the neccessary filesystem modules and also all the networking options, compiled the kernel, copied it over to /boot, created the initrd with the help of slackdocs link @mlangdn mentioned, using the built-in script to aid me in the process, and then configured lilo to use all this afterwards.
I managed to boot the newly-named "k" kernel, but alas, no ntfs3g modules are present for my two ntfs partitions
(one for the dual-boot win10, and another to use as exchange space between OSes --- linux can only access windisk as root, and win can't and shouldn't access linux partition under any circumstance)
and also, without any wlan capability or touchpad enabled ((generic usb mouse works, but not the touchpad))
(IMHO, the most likely culprit is missing modules, but I fail to see where and/or what I did wrong)
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935
Rep:
Quote:
Originally Posted by Scribtor
Bonus part I figured out, once I came to terms that "dither" and "Do not check color" options refer to within gimp, and also with exporting to bmp and not saving in gimp format. Never been a true lover of imaging-manipulation programs
Excuse me I wasn't clear. I tried to do all that with ImageMagick but I couldn't find how to do it.
Quote:
Originally Posted by Scribtor
As far as the kernel 5.3.9. is concerned, I managed to achieve the following:
I unpacked the source .xz from kernel archives website to my /usr/src/ and then "make menuconfig" and after making sure I checked the neccessary filesystem modules and also all the networking options, compiled the kernel, copied it over to /boot, created the initrd with the help of slackdocs link @mlangdn mentioned, using the built-in script to aid me in the process, and then configured lilo to use all this afterwards.
I managed to boot the newly-named "k" kernel, but alas, no ntfs3g modules are present for my two ntfs partitions
(one for the dual-boot win10, and another to use as exchange space between OSes --- linux can only access windisk as root, and win can't and shouldn't access linux partition under any circumstance)
and also, without any wlan capability or touchpad enabled ((generic usb mouse works, but not the touchpad))
(IMHO, the most likely culprit is missing modules, but I fail to see where and/or what I did wrong)
Did you copy a Slackware kernel config file to source kernel tree? Then run 'make oldconfig'.
The safest thing to do is to start with the generic kernel config file, change the modules needed to boot from "m" to "y", and run "make oldconfig". The resulting kernel should have the modules needed to boot built-in, and load everything else from /lib/modules.
Ed
I opened my bmp in gimp, scaled it to 640x480, selected to export to bmp, and there is a similarly-named option for color checking and dithering of the image. Since my image is centered, I can easily use and have used the .dat file for slack.bmp from /boot (there isn't a slack.dat but I'm unsure which one of the other examples use the same layout for boot menu options)
as for the kernel, i've just rechecked the instructions, and am trying to recompile the 5.3.9. kernel using the zgrep of the "working" system config to the dir of the kernel to be built. Will update once the "cooking" is done, if there's progress.
UPDATE 1: Tried with the "make oldconfig" but still, I end up with a kernel that has no ntfs,touchpad,wlan drivers
Compiling a manually configured kernel with most of the options to either "y" or "M". Will update if it yields different results
UPDATE 2: Now I get even more serious issues, both when using a secondary initrd.gz and when using the initrd generated for the 4.19.82 kernel. I even got a few times a kernel panic event, but fortunately, I wasn't able to disrupt my "old" kernel so I deleted all the extra files from /boot
Didn't check, but from what I gathered, for some reason or other, my "make modules_install" as if never happens because when I once had to regenerate initrd and when I did that for 4.19.82, shell echoed a few more lines where those modules I need, fs ext4, touchpad and network drivers, were mentioned during the build. It could be I'm still not doing something right.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.