LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-18-2016, 01:42 AM   #1
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Rep: Reputation: Disabled
Question Slackware kernel panics when spare hard drives are hooked up


So when i was installing Slack I was having problems with getting Lilo installed. It would just freeze on the "Installing Linux Loader" screen. It turns out that Lilo was actually trying to install to my "first" hard drive that happened to be NTFS instead of actually installing to the hard drive that I was installing Slack too. Anyways it installed fine after I unplugged both my spare hard drives. The problem is that now I can't keep my two spare hard drives plugged in without getting a kernel panic right before Slack boots all the way. They work fine if i plug them in when Slack's booted up all the way however. So do I just have to add them to some config file somewhere or something? I formatted both of them because I wasn't sure which one it tried to install Lilo too and thought that was messing everything up, but since they're both now formatted I still have the same problem so.....
Here's the kernel panic http://i.imgur.com/BiJZrqY.jpg
 
Old 07-18-2016, 11:19 AM   #2
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Edit:Duplicate question.


It sounds like the order of your devices (/dev/sda, dev/sdb, etc) changes when you connect the spare drives.

Are you using a 'huge' kernel, or a 'generic' + initrd ?

In /etc/fstab, you can adjust the /dev/sda2 (or wherever your /boot or / are) to use the unique ID (UUID) instead;
Code:
UUID="1234abcd-1234-5678-12ab-123456abcdef"       /boot            ext3  (..etc. rest of line here)
You can find the UUID's with a command like "blkid".

If you're using an encrypted root, you can use a similar method (/dev/disk/by-uuid/...) when making the initrd with the mkinitrd command.

Last edited by Hangaber; 07-18-2016 at 12:59 PM. Reason: Linked to duplicate question
 
Old 07-18-2016, 11:27 AM   #3
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
I also have just replied you on that in the other almost "twin" thread you posted here...
 
Old 07-18-2016, 05:23 PM   #4
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gda View Post
I also have just replied you on that in the other almost "twin" thread you posted here...
Sorry about that. I didn't think the mods would approve it and thought this was a more appropriate forum maybe. I'll try to be more patient with my posts being approved next time
 
Old 07-18-2016, 05:30 PM   #5
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Hangaber View Post
Edit:Duplicate question.


It sounds like the order of your devices (/dev/sda, dev/sdb, etc) changes when you connect the spare drives.

Are you using a 'huge' kernel, or a 'generic' + initrd ?

In /etc/fstab, you can adjust the /dev/sda2 (or wherever your /boot or / are) to use the unique ID (UUID) instead;
Code:
UUID="1234abcd-1234-5678-12ab-123456abcdef"       /boot            ext3  (..etc. rest of line here)
You can find the UUID's with a command like "blkid".

If you're using an encrypted root, you can use a similar method (/dev/disk/by-uuid/...) when making the initrd with the mkinitrd command.
Isn't Slack's default kernel the "huge" one? Also I think i found out why it kernel panics. In the fstab file my swap/root/boot partitions are labeled as /dev/sdaX. However my actual drive's /dev/sdbX, at least when the other drives are plugged in. So do i just change them to /dev/sdbX?
 
Old 07-18-2016, 06:11 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If you are ever going to plug them in again, you should use the UUID as @Hangaber suggested.
 
Old 07-18-2016, 06:28 PM   #7
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
If you are ever going to plug them in again, you should use the UUID as @Hangaber suggested.
Yep will do. I changed the fstab entries without thinking and had to chroot into my install on the installation cd to fix it.
 
Old 07-18-2016, 06:34 PM   #8
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Hangaber View Post
Edit:Duplicate question.


It sounds like the order of your devices (/dev/sda, dev/sdb, etc) changes when you connect the spare drives.

Are you using a 'huge' kernel, or a 'generic' + initrd ?

In /etc/fstab, you can adjust the /dev/sda2 (or wherever your /boot or / are) to use the unique ID (UUID) instead;
Code:
UUID="1234abcd-1234-5678-12ab-123456abcdef"       /boot            ext3  (..etc. rest of line here)
You can find the UUID's with a command like "blkid".

If you're using an encrypted root, you can use a similar method (/dev/disk/by-uuid/...) when making the initrd with the mkinitrd command.
Can I just take out the whole line and replace it with just the UUID? What do the 1s and 0s signify?

Edit: Okay I gotta stop being so stupid. Yes I just replace the first part. Duh.

Actually what's the PARTUUID do?

Last edited by bulletfreak; 07-18-2016 at 07:03 PM.
 
Old 07-18-2016, 07:16 PM   #9
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Okay but now it still kernel panics. I assume I need the UUIDs for the other drives too, but what do I do about the other flags? I don't know what to label just a regular storage drive as
 
Old 07-18-2016, 07:53 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Yeah, you gotta change /etc/lilo.conf to use the block id as well.

If you are using an initrd, then that also has to use it.
 
Old 07-18-2016, 08:17 PM   #11
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Yeah, you gotta change /etc/lilo.conf to use the block id as well.

If you are using an initrd, then that also has to use it.
So my other drives don't need to be added then?

Here's my lilo.conf: # LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" "
boot = UUID="9878-F2F4"

#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
root = UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
label = Linux
read-only
# Linux bootable partition config ends


Here's my fstab:
UUID="79a98cab-01d1-45af-823e-53bc49bab151" swap swap defaults 0 0
UUID="20ea75bd-2a4a-4632-acad-52e5257856c3" / ext4 defaults 1 1
UUID="9878-F2F4" /boot/efi vfat defaults 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0


Does everything look good?

Last edited by bulletfreak; 07-18-2016 at 08:27 PM.
 
Old 07-19-2016, 01:00 AM   #12
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
So I guess I have a initrd. Problem is I don't know what I'd even have to change. I honestly don't know. I have both the Generic and Huge kernel sitting in my boot folder. It's really confusing honestly.
 
Old 07-19-2016, 03:13 AM   #13
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
If in your stable hardware configuration, you will boot *always* with the spare devices attached, the procedure I suggested in the other thread should fix the problem without using UUID in your configuration files...

If, on the other hand, you need to boot with or without spare devices plugged in there are two options: using UUID as suggested above or defining your custom name for the device containing slackware root (using eudev persistent rules).

According to my experience in cases like that (as far as I understood you made a fresh installation of slackware without special configurations), the only configuration files you need to modify are /etc/fstab and /etc/lilo.conf (and don't forget to run lilo after having changed the lilo.conf otherwise your changes will be not installed - anyway be careful in doing that!).

Finally, it seems to me you use UEFI mode to boot your system. As far as I know LILO doesn't work in pure UEFI mode (it works only in Legacy Boot mode). So I suppose you should use ELILO... Anyway I cannot help too much on that because the first thing I did on my system was to switch to Legancy Boot mode in the BIOS (as in my case I don't have Windows or other OS requiring UEFI).

Last edited by gda; 07-20-2016 at 12:01 PM.
 
Old 07-19-2016, 05:17 AM   #14
bulletfreak
Member
 
Registered: Jul 2016
Distribution: Slackware-64 -Current
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gda View Post
If in your stable hardware configuration, you will boot *always* with the spare devices attached, the procedure I suggested in the other thread should fix the problem without using UUID in your configuration files...

If, on the other hand, you need to boot with or without spare devices plugged in there are two options: using UUID as suggested above or defining your custom name for the device containing slackware root (using eudev persistent rules).

According to my experience in cases like that (as far as I understood you made a fresh installation of slackware without special configurations), the only configuration files you need to modify are /etc/fstab and /etc/lilo.conf (and don't forget to run lilo after having changed the lilo.conf otherwise your changes will be not installed - anyway be careful in doing that!).

Finally, it seems to me you use UEFI mode to boot your system. As far as I know LILO doesn't work in pure UEFI mode (it works only in Legacy Boot mode). So I suppose you should use ELILO... Anyway I cannot help too much on that because the first think I did on my system was to switch to Legancy Boot mode in the BIOS (as in my case I don't have Windows or other OS requiring UEFI).
My bios are set to UEFI/Legacy. Yep I just made a normal install without any special parameters. I tried to run lilo as you suggested after updating lilo.conf and it gives me this error:

Syntax error at or above line 7 in file '/etc/lilo.conf'

That line's where i defined a UUID for /boot. Hmmm
 
Old 07-19-2016, 05:33 AM   #15
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
That line seems strange also to me...

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).

Probably also the line

Code:
root = UUID="20ea75bd-2a4a-4632-acad-52e5257856c3"
should be changed in:

Code:
append= "root=UUID=20ea75bd-2a4a-4632-acad-52e5257856c3"
Finally as far as I know when using UUID's, initrd needs to be used.

Last edited by gda; 07-19-2016 at 05:57 AM.
 
  


Reply



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
Slackware kernel panics after trying to use harddrives bulletfreak Slackware 1 07-18-2016 10:03 AM
raid 5 question about spare drives 8000 Linux - Server 1 10-19-2013 11:12 PM
Debian RAID 10 spare drives vs active drives Nemus Linux - Server 2 06-13-2011 10:14 AM
Hard drive failure + Kernel reinstall = panics and odd behavior Storm16 Linux - Kernel 4 07-16-2006 06:51 AM
How could this have happened to me?! Hard locks and kernel panics for no good reason! jamespetts Linux - General 8 08-05-2004 07:45 AM

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

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