LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-09-2019, 06:40 AM   #1
Scribtor
Member
 
Registered: Sep 2019
Distribution: Slackware64 - current
Posts: 65

Rep: Reputation: Disabled
Post 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?
 
Old 11-09-2019, 07:13 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
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.

Last edited by hazel; 11-09-2019 at 07:15 AM.
 
Old 11-09-2019, 07:56 AM   #3
Scribtor
Member
 
Registered: Sep 2019
Distribution: Slackware64 - current
Posts: 65

Original Poster
Rep: Reputation: Disabled
Unhappy

The new kernel is extracted and compiled from within /usr/src/linux-5.3.9/ and I just discovered that mkinitrd is root-only-accessible.

What should I pass to the mkinitrd as arguments so that it creates a bootable kernel with its own modules?

Afterwards, how do I differentiate in /boot/ between the "old" and "new" kernel?

The lilo.conf part seems pretty straightforward from there
 
Old 11-09-2019, 08:13 AM   #4
magicm
Member
 
Registered: May 2003
Distribution: Slackware
Posts: 237

Rep: Reputation: 152Reputation: 152
caveat: not running -current, running 14.2
see man mkinitrd.conf
 
Old 11-09-2019, 09:07 AM   #5
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
This doc is still relevant for the 5x kernel builds. A lot of your questions are answered here.
 
Old 11-09-2019, 09:26 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,682
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Quote:
Originally Posted by Scribtor View Post
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.
 
1 members found this post helpful.
Old 11-09-2019, 09:36 AM   #7
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
Quote:
Originally Posted by mlangdn View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	63
Size:	68.0 KB
ID:	31794   Click image for larger version

Name:	Untitled.png
Views:	55
Size:	251.0 KB
ID:	31795  
 
1 members found this post helpful.
Old 11-09-2019, 09:59 AM   #8
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,003

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
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:

Code:
% diff config-generic-4.19.80.x64 config
5962c5962
< CONFIG_USB_XHCI_HCD=m
---
> CONFIG_USB_XHCI_HCD=y
5964c5964
< CONFIG_USB_XHCI_PCI=m
---
> CONFIG_USB_XHCI_PCI=y
5966c5966
< CONFIG_USB_EHCI_HCD=m
---
> CONFIG_USB_EHCI_HCD=y
5969c5969
< CONFIG_USB_EHCI_PCI=m
---
> CONFIG_USB_EHCI_PCI=y
5974c5974
< CONFIG_USB_OHCI_HCD=m
---
> CONFIG_USB_OHCI_HCD=y
5976d5975
< CONFIG_USB_OHCI_HCD_SSB=y
7295c7294
< CONFIG_EXT4_FS=m
---
> CONFIG_EXT4_FS=y
7301c7300
< CONFIG_JBD2=m
---
> CONFIG_JBD2=y
7303c7302
< CONFIG_FS_MBCACHE=m
---
> CONFIG_FS_MBCACHE=y
7396c7395
< CONFIG_ISO9660_FS=m
---
> CONFIG_ISO9660_FS=y
7580c7579
< CONFIG_NLS_CODEPAGE_437=m
---
> CONFIG_NLS_CODEPAGE_437=y
7604c7603
< CONFIG_NLS_ISO8859_1=m
---
> CONFIG_NLS_ISO8859_1=y
7628c7627
< CONFIG_NLS_UTF8=m
---
> CONFIG_NLS_UTF8=y
This kernel will boot without an initrd.
Ed
 
Old 11-09-2019, 03:42 PM   #9
Scribtor
Member
 
Registered: Sep 2019
Distribution: Slackware64 - current
Posts: 65

Original Poster
Rep: Reputation: Disabled
Exclamation WorkInProgress

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)
 
Old 11-09-2019, 04:03 PM   #10
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
Quote:
Originally Posted by Scribtor View Post
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 View Post
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'.
 
1 members found this post helpful.
Old 11-09-2019, 04:10 PM   #11
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,003

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
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
 
Old 11-09-2019, 04:13 PM   #12
Scribtor
Member
 
Registered: Sep 2019
Distribution: Slackware64 - current
Posts: 65

Original Poster
Rep: Reputation: Disabled
Exclamation

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


I followed the

https://wiki.alienbase.nl/doku.php?i...kernelbuilding

to a "T"


Every time, no ntfs support, no wlan, no touchpad

Last edited by Scribtor; 11-10-2019 at 06:06 AM. Reason: Update2
 
Old 11-10-2019, 10:01 AM   #13
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,003

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Did dmesg provide any clues?
Ed
 
Old 11-10-2019, 10:12 AM   #14
Scribtor
Member
 
Registered: Sep 2019
Distribution: Slackware64 - current
Posts: 65

Original Poster
Rep: Reputation: Disabled
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.

I'm at a loss here...
 
Old 11-10-2019, 10:33 AM   #15
EdGr
Senior Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 1,003

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Post the output of dmesg. Also, don't specify an initrd in /etc/lilo.conf since you are building a kernel that does not need one.
Ed
 
  


Reply

Tags
boot loader, initrd, kernel, lilo, ramdisk



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
[SOLVED] imagemagick - converting bitmap to the same parameters as other bitmap (apart from resolution) Irbis Linux - Software 5 03-29-2019 03:38 PM
Switching from win10 to a linux distro with win10 vm kevgk Linux - Virtualization and Cloud 3 11-01-2018 05:36 AM
Lilo breaking Win10 boot (BIOS not UEFI) dalgrim Slackware 10 05-08-2016 09:57 PM
convertion of 24 bit bitmap image to 8 bit bitmap image vipulc Linux - General 2 03-10-2006 08:22 AM

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

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