[SOLVED] Slackware kernel panics when spare hard drives are hooked up
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.
I suppose you should put there the device on which the slackware partition is installed (not the partition but the whole device!). In that way you will install lilo on the MBR of the disk (potentially dangerous if you have other OS running on your system)...
So try to change that line in:
Code:
boot=/dev/disk/by-id/ID_SLACK_DEVICE
where ID_SLACK_DEVICE is the symbolic link (in the directory /dev/disk/by-id) pointing to /dev/sdb (assuming your Slackware root partition is installed in /dev/sdbX).
I don't think you are using an initrd, as it has to be declared in lilo.conf - normally below the "image=" entry.
Eg, from my system (no UUIDs here):
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/root_vg/root_lv
append = " vt.default_utf8=0 resume=/dev/sdb2 rootflags=barrier=1"
label = Linux64
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
You can also do "ls -l /boot/vmlinuz" to see which kernel is in use. I suspect it's linked to the "huge" kernel (needs no initrd), rather than "generic" (which does need an initrd).
NB: You might be able to get around this issue entirely by making sure your BIOS has the first boot device set to your normal boot drive when the spare disks are hooked up.
Then UUIDs and an initrd may not be required.
Edit: Have a read of the docs in /boot/README.initrd for some more details about initrd.
NB: You might be able to get around this issue entirely by making sure your BIOS has the first boot device set to your normal boot drive when the spare disks are hooked up.
Then UUIDs and an initrd may not be required.
I'm not sure this will fix the problem. I have never made specific tests I have to say but according to my general understanding the names assigned by linux to the scsi devices have nothing to do with the boot priority defined in the bios...
I'm
not sure this will fix the problem. I have never made specific tests I
have to say but according to my general understanding the names assigned
by linux to the scsi devices have nothing to do with the boot priority
defined in the bios...
Yep I had the drive that has Slackware installed on it set as first in my bios this whole time.
I'm not sure this will fix the problem. I have never made specific tests I have to say but according to my general understanding the names assigned by linux to the scsi devices have nothing to do with the boot priority defined in the bios...
I should have been more specific:
In the BIOS of my ageing workstation you can set the storage controller detection order. Therefore my internal drives are always detected before anything external plugged into the eSATA ports.
Indeed this is wrong! The syntax of the fstab file is different from the one of lilo.conf file!
In the fstab file you should use:
Code:
UUID="xxx..." mountpoint filesystem_type options
Anyway did you run lilo without error? Did you configure lilo to use initrd?
So my fstab file would've been fine like it was? Nope, Lilo still gives me that error at line 7. Maybe it's because I left the "by-id" in and didn't change it
This is also wrong and different from what I suggested to do!
Let's try to go on in a little bit more systematic way proceeding step by step.
Let's try to fix lilo issue first.
You need to configure lilo to use initrd. So as first step you need to generate an initrd image.
This can be done very easily using the following script:
Actually this command does not generated any initrd image but just suggests you the command to issue to generate it.
On my system this is the output of that command:
Code:
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda3 -m usb-storage:xhci-hcd:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
As you can see the last line (actually the only not commented line) is the command you should run to generate the initrd image.
So just run that command as it is written there. If everything goes smooth you should have your image at /boot/initrd.gz.
Now you need to modify the lilo.conf file. Your file should be like this:
Code:
# Start LILO global section
# Append any additional kernel parameters:
append=""
boot = /dev/disk/by-id/XXXXXXX
#compact # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-generic
initrd = /boot/initrd.gz
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3"
label = Linux
read-only
# Linux bootable partition config ends
As you can see now lilo is configured to use the generic kernel and the initrd image generated in the previous step.
There should be only two lines that STILL need your attention:
The first is:
Code:
boot = /dev/disk/by-id/XXXXXXX
To get what put instead of XXXXXX just type the following command:
So the ID of the device named sda is ata-ST2000DM001-1ER164_Z4Z4Y023. That's the ID you have to put in boot directive of lilo.conf file. Of course in your case you have more then one device: just be sure to select the ID corresponding to the device containing your slackware root directory. Selecting the ID you are sure to refer always to the right device even if its name change.
Just be sure that this UUID is the one corresponding to the partition containing your root slackware directory using the command blkid.
Finally run lilo. If you got error in doing that please report here the error messages, the used lilo.conf file and the output of the following commands blkid, ls -l /dev/disk/by-id, ls -l /boot.
bash-4.3$ sudo lilo
Warning: LBA32 addressing assumed
Warning: Partition 2 on /dev/sda is not marked Active.
Warning: partition type 0x00 on device 0x0802 is a dangerous place for
a boot sector.
I will assume that you know what you're doing and I will proceed.
Warning: Device 0x0800: Inconsistent partition table, 2nd entry
CHS address in PT: 0:0:0 --> LBA (-1)
LBA address in PT: 0 --> CHS (0:0:1)
Fatal: Either FIX-TABLE or IGNORE-TABLE must be specified
If not sure, first try IGNORE-TABLE (-P ignore)
Lilo.conf:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" "
boot = /dev/disk/by-id/wwn-0x8744595459414315009x-part2
#compact # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
append= "root=UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
label = Linux
read-only
# Linux bootable partition config ends
I ran that command to generate a intrd image so IDK. I should be using the generic kernel too. Alright I messed up the boot part and just fixed it, but I can't find the whole UUID for the disk. It just gives me one for every partition instead.
Edit: I fixed the root line. Sorry for the misunderstanding. But I still don't know why it says I'm still using the huge kernel. I'm guessing I don't have to manually update that myself since you didn't mention it.
Last edited by bulletfreak; 07-21-2016 at 06:27 PM.
As I covered in that post, UUIDs are only available for partitions, not for disks. For your fstab, you'll reference your UUIDs as showed in that post.
For your lilo.conf, you'll need to use your disk-id for the boot portion, and your UUID for the root, but you don't need to use an append line for the root, just simply root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d" (replacing that with your UUID).
Unfortunately, I didn't cover the initrd in that post, but if you run /usr/share/mkinitrd/mkinitrd_command_generator.sh, it should output something similar to:
At this point, your fstab and lilo.conf should be fully converted to UUID, and the only thing left is to ensure you're using the generic kernel and loading the initrd. To do this, add a new section above your default section (it's better to make a new section to keep your old one intact in case things don't boot, and you add it above the other to make it the default choice when booting), and make sure it includes an image line that points to a generic kernel with an initrd entry below it, followed by your root device as a UUID, a label (make sure it's different than your original entry), and finally a read-only line. Then run lilo (although, lilo -t might be helpful to ensure you don't have typos) to save your setup and then reboot.
Hopefully this helps clear things up, but I'll be back in the morning (EDT) to see if there are any additional questions. If you run into issues, please post any errors along with your complete /etc/lilo.conf, /etc/fstab, and the output of ls -la /dev/disk/by-id/ and ls -la /dev/disk/by-uuid.
It seems like it might've worked, however I get this error:
Code:
bash-4.3$ sudo lilo -t
Warning: LBA32 addressing assumed
Added Slack-UUID + *
The boot sector and the map file have *NOT* been altered.
One warning was issued.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.