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.
howdy folks ... as title says ... nice kernel panic trying to use generic, btw I have like 10 entries on grub(managed by my first distro) how to deal it ?
It's recommended that you switch to Slackware's generic kernel. This is easy to do but there are a few steps to follow.
What is the difference between a “generic” kernel and the “huge” kernel which has been installed as the default kernel?
The “huge” kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name “huge”). When this kernel boots it will use up a lot your RAM (relatively speaking… with 1 GB of RAM you will not really be troubled by a few MB less RAM).
The “generic” kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand. This will make your kernel's memory consumption lower and the boot process a bit faster. The smaller size allows for the use of an initial RAM disk or “initrd”. An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.
For now, you need to remember that a “huge” kernel will not support an intial RAM disk, but the “generic” kernel will. We go for maximum flexibility and use a “generic” kernel.
You will need to create an initial RAM disk (“initrd” for short). The initrd functions as a temporary root file system during the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root: # /usr/share/mkinitrd/mkinitrd_command_generator.sh
Be sure to continue reading the rest of the document.
The Slackware Doc Project is a very good resource for Slackware users, both new & old.
Hope this helps.
Have fun & enjoy!
Last edited by onebuck; 07-25-2016 at 10:22 AM.
Reason: typo
Last time I had this kind of problem, my GRUB configuration file was missing the name of one of the initrd files. The purpose of all I am going to ask is to verify if for the failing distribution, the "initrd" line in your GRUB configuration file for this distribution contains all of the necessary initrd required for booting.
I would like to take a look at the configuration file
Code:
/boot/grub/grub.cfg
of the distribution on which GRUB is installed. It is pretty huge. The part we are interested in is located near the bottom. There will be blocks that begin with a line starting with
Code:
menuentry
followed by the label used in the GRUB menu for one of your distributions. If would like to see the blocks about Slackware.
Moreover, I will need to see the contents of the /boot directory on your Slackware partition to see the names of the initrd files located in it.
Finally, are you using an Intel CPU? If so, you may also need an extra file, named "intel-ucode.img", located in the /boot directory of your Slackware partition. I say "may" because I do not require it on Ubuntu, but I do on Manjaro and Arch. It should be available in your distribution's repositories if you require it.
Even if the OP is using GRUB2 a initrd must be created for the Slackware generic kernel because necessary drivers are not included.. You would have a initrd entry line in the grub.cfg such as;
Code:
initrd /boot/initrd.img-generic
That must be created by the use of the script '/usr/share/mkinitrd/mkinitrd_command_generator.sh' naming the initrd image file unique to the '/boot' directory
You will need to create an initial RAM disk (“initrd” for short). The initrd functions as a temporary root file system during the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root: # /usr/share/mkinitrd/mkinitrd_command_generator.sh
Last time I had this kind of problem, my GRUB configuration file was missing the name of one of the initrd files. The purpose of all I am going to ask is to verify if for the failing distribution, the "initrd" line in your GRUB configuration file for this distribution contains all of the necessary initrd required for booting.
I would like to take a look at the configuration file
Code:
/boot/grub/grub.cfg
of the distribution on which GRUB is installed. It is pretty huge. The part we are interested in is located near the bottom. There will be blocks that begin with a line starting with
Code:
menuentry
followed by the label used in the GRUB menu for one of your distributions. If would like to see the blocks about Slackware.
Moreover, I will need to see the contents of the /boot directory on your Slackware partition to see the names of the initrd files located in it.
Finally, are you using an Intel CPU? If so, you may also need an extra file, named "intel-ucode.img", located in the /boot directory of your Slackware partition. I say "may" because I do not require it on Ubuntu, but I do on Manjaro and Arch. It should be available in your distribution's repositories if you require it.
I'm pretty sure with you help I'm going to get ahead with this ...
of the distribution on which GRUB is installed. It is pretty huge. The part we are interested in is located near the bottom. There will be blocks that begin with a line starting with
Code:
menuentry
followed by the label used in the GRUB menu for one of your distributions. If would like to see the blocks about Slackware.
Moreover, I will need to see the contents of the /boot directory on your Slackware partition to see the names of the initrd files located in it.
Finally, are you using an Intel CPU? If so, you may also need an extra file, named "intel-ucode.img", located in the /boot directory of your Slackware partition. I say "may" because I do not require it on Ubuntu, but I do on Manjaro and Arch. It should be available in your distribution's repositories if you require it.
Code:
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
else
search --no-floppy --fs-uuid --set=root hhhhhhhhhhhhhhhhhhhhhhhhh
fi
linux /boot/vmlinuz root=/dev/sda3
initrd /boot/initrd.gz
}
submenu 'Advanced options for Slackware Linux (Slackware 14.2) (on /dev/sda3)' $menuentry_id_option 'osprober-gnulinux-advanced-ññññññññññññññññññññññññ' {
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
else
search --no-floppy --fs-uuid --set=root rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
fi
linux /boot/vmlinuz root=/dev/sda3
initrd /boot/initrd.gz
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
else
search --no-floppy --fs-uuid --set=root zzzzzzzzzzzzzzzzzzzzzzzzzz
fi
linux /boot/vmlinuz root=/dev/sda3
initrd /boot/initrd.gz
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic--zzzzzzzzzzzzzzzzzzzzzzzzzz' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 xxxxxxxxxxxxxxxxxxxxxxxxxx
else
search --no-floppy --fs-uuid --set=root xxxxxxxxxxxxxxxxxxxxxxxx
fi
linux /boot/vmlinuz-generic root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.4.14--==========================' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 ddddddddddddddddddddddddddddddddddddd
else
search --no-floppy --fs-uuid --set=root 41509d49-9b27-43b0-8a66-b9b1460424d0
fi
linux /boot/vmlinuz-generic-4.4.14 root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-smp--===============================' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 //////////////////////////////
else
search --no-floppy --fs-uuid --set=root/////////////////////////7
fi
linux /boot/vmlinuz-generic-smp root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-smp-4.4.14-smp--&&&&&&&&&&&&&&&&&&&&&&&&&' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
else
search --no-floppy --fs-uuid --set=root $$$$$$$$$$$$$$$$$$$$$$$$$$$$
fi
linux /boot/vmlinuz-generic-smp-4.4.14-smp root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge--###################################3' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 ################################
else
search --no-floppy --fs-uuid --set=root xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
fi
linux /boot/vmlinuz-huge root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-4.4.14--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 xxxxxxxxxxxxxxxxxxxxxxxxxx
else
search --no-floppy --fs-uuid --set=root xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
fi
linux /boot/vmlinuz-huge-4.4.14 root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-smp--5555555555555555555555555' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 4444444444444444444444444444444
else
search --no-floppy --fs-uuid --set=root 333333333333333333333333333333
fi
linux /boot/vmlinuz-huge-smp root=/dev/sda3
}
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-smp-4.4.14-smp--11111111111111111111111' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 22222222222222222222222222222222
else
search --no-floppy --fs-uuid --set=root 1111111111111111111111
fi
linux /boot/vmlinuz-huge-smp-4.4.14-smp root=/dev/sda3
}
}
It wasn't that difficult to modify someone else's script (that's all that I did) to create something that would generate grub entries that more-or-less worked with Slackware.
At least it's worked for all of my grub-booted machines.
The more vmlinuz files/symlinks you have in /boot/, the more entries grub will generate.
The grub scripts you're using also have to figure out if there's a matching initrd for each vmlinuz.
From the output you posted above, there are 9 vmlinuz files or symlinks in /boot/ and it looks like all the generic kernels are missing a line for the initrd.
(Or, the initrd's exist, but the grub script is looking for filename patterns that don't quite match them.)
Code:
vmlinuz
vmlinuz-generic (no initrd?)
vmlinuz-generic-4.4.14 (no initrd?)
vmlinuz-generic-smp (no initrd?)
vmlinuz-generic-smp-4.4.14-smp (no initrd?)
vmlinuz-huge
vmlinuz-huge-4.4.14
vmlinuz-huge-smp
vmlinuz-huge-smp-4.4.14-smp
On my system, I go with the naming convention of "vmlinuz-<huge|generic>-<version>" and likewise, "initrd-generic-<version>.gz".
As an example, under /boot/ I currently have;
I slightly modified my "/etc/grub.d/10_linux" to look for "initrd-generic-${version}.gz".
Adding a line at line 202, my lines 201-203 now look like this;
Code:
"initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
"initrd-generic-${version}.gz" \
"initrd.gz"; do
Of course, I wouldn't have to do that if I kept to a naming convention that grub is looking for, such as "initramfs-genkernel-${version}".
You may have to check the grub scripts in a similar way on the system you are generating the grub.conf with to see exactly what filenames they're looking for.
In Slackware, I used the mkinitrd_command_generator.sh script to generate a suitable mkinitrd line and plopped that into a simple script such as;
Looking at your /boot directory, the only existing initrd file is "initrd.gz" for the "vmlinuz" kernel. The "vmlinuz" file seems to be a link. Which kernel does it point to? You can use "ls -l" to see.
As explained by Hangaber above (great answer by the way!), you will need to produce an initrd for the generic kernel, as there is none. Then, if it matches the pattern GRUB is looking for, it will be added automatically to your grub.cfg file once you update it using
Code:
grub-mkconfig -o /boot/grub/grub.cfg
For testing, you can also manually add it to the "initrd" line so it looks like
Code:
initrd /boot/NameOfTheInitrdFile
I recommend not touching the blocks about your antiX partition, as messing something up there would prevent you from being able to boot into it.
Also, from what I see the Slackware entry on the main GRUB menu, which corresponds to the very first block you posted, does not use the generic kernel (unless the link points to it). Only the third, fourth, fifth and sixth entries of the "Advanced options" menu use it. It is in those blocks that an "initrd" line needs to be added once the file has been generated, just under the "linux" line. If I use the fourth entry in the "Advanced options" as an example, using the GRUB standard convention explained by Hangaber, this would give
Code:
menuentry 'Slackware Linux (Slackware 14.2) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.4.14--==========================' {
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 ddddddddddddddddddddddddddddddddddddd
else
search --no-floppy --fs-uuid --set=root 41509d49-9b27-43b0-8a66-b9b1460424d0
fi
linux /boot/vmlinuz-generic-4.4.14 root=/dev/sda3
initrd /boot/initramfs-genkernel-4.4.14
}
If your initrd file is named otherwise, the name on the "initrd" line will be different.
Also, is the main GRUB menu entry also spitting out a kernel panic even though it is using the "initrd.gz" file? If so, there may be something else going on. It depends on which kernel the "vmlinuz" link points to.
Last edited by Ragnathok; 07-26-2016 at 11:05 AM.
Reason: Noticed vmlinuz is a link
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.