LinuxQuestions.org
Visit Jeremy's Blog.
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 12-25-2015, 01:23 PM   #1
theactionindex
LQ Newbie
 
Registered: Aug 2015
Posts: 8

Rep: Reputation: Disabled
New hard drive... kernel panic on boot?


I'm not exactly why this is happening, really, and can I hot plug it in and use it without issue, but I just really want to figure out why this is happening. I got this hard drive about a month ago and went to install it. I try to boot up Slackware, and I can't and startup crashes/kernel panics abruptly. I remove the drive, it boots up fine.

I got a picture of what it outputs before crashing, and I linking it here because it is too big to attach. I really hope I can get this issue solved because I really don't like to hot plug the drive in.

Any thoughts/anyone else had this issue before? I'm sorry if I'm not being very descriptive, just let me know if you need more information and I hope everyone is having a good holiday season!
 
Old 12-25-2015, 01:35 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,217

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
I remove the drive, it boots up fine.
What and where are you booting from when things work?

Where are you installing this second drive?

Since the second drive is Slackware, could you post the lilo.conf file please.
 
Old 12-25-2015, 01:46 PM   #3
theactionindex
LQ Newbie
 
Registered: Aug 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camorri View Post
What and where are you booting from when things work?

Where are you installing this second drive?

Since the second drive is Slackware, could you post the lilo.conf file please.
This is a desktop, and it is a sata connection, if that is what you are asking. It boots up and works when I disconnect the hard drive, but works and reads/mounts fine when I hot plug it in after I boot up

I am using elilo, since this is UEFI, and it's conf is:
Quote:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
label=vmlinuz
read-only
append="root=/dev/sda5 vga=normal ro"
When the new hard drive mounts it always is /dev/sdc1
 
Old 12-25-2015, 01:58 PM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,217

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Post your elilo.conf file. I am not familiar with UEFI, or elilo for that matter. My systems are not that new. There are lots of people here who are. I'm usre someone can tell us what is wrong with your configuration.

The one thing I see that is wrong, if this new drive is sdc, you have root set to sda5. That will not work.
 
Old 12-25-2015, 02:06 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,059

Rep: Reputation: Disabled
As the second drive is removable it is possible that if plugged-in at boot time this device be named /dev/sda, thus the root partition can't be found.

Try naming /dev/sda5 by its UUID to avoid that.

You could also run efibootmgr with this drive already plugged in. Just plug it in and run eliloconfig again.

Last edited by Didier Spaier; 12-25-2015 at 02:10 PM.
 
Old 12-25-2015, 02:07 PM   #6
theactionindex
LQ Newbie
 
Registered: Aug 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
As the second drive is removable it is possible that if plugged-in at boot time this device be named /dev/sda, thus the root partition can't be found.

Try naming /dev/sda5 by its UUID to avoid that.

You could also run efibootmgr with this drive already plugged in. Just plug it in and run eliloconfig again.
ok, I just did that. Still crashes on boot, but with a different message.

Quote:
Originally Posted by camorri View Post
Post your elilo.conf file. I am not familiar with UEFI, or elilo for that matter. My systems are not that new. There are lots of people here who are. I'm usre someone can tell us what is wrong with your configuration.

The one thing I see that is wrong, if this new drive is sdc, you have root set to sda5. That will not work.
I did post the conf file.

SDA is where my /, /home/ and /usr/local are mounted, sdc is the new hard drive is. This new hard drive is just for extra space, it is not where linux is installed to, if that is what you are thinking.

edit: I think I read your post wrong

Last edited by theactionindex; 12-25-2015 at 02:15 PM.
 
Old 12-25-2015, 02:21 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,268
Blog Entries: 24

Rep: Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195
As Didier Spaier notes, change references of /dev/sdax to their corresponding UUIDs.

I am not familiar with UEFI and elilo, but I would expect it to correspond to BIOS/lilo references.

The necessary bits are found in the lilo.conf and /etc/fstab files.

Using your elilo.conf example...

Code:
append="root=/dev/sda5 vga=normal ro" 
...would become something like...
append="root=/dev/disk/by-uuid/xxx-yyyyy-zzzzzzz vga=normal ro"
...where xxx-yyyyy-zzzzzz is the symlink to the /dev/sdax partition.

Similarly, /etc/fstab entries would become something like...

Code:
#/dev/sda5        /                ext4        defaults         1   1
/dev/disk/by-uuid/xxx-yyyyy-zzzzzz        /                ext4        defaults         1   1
Do that for each partition reference and run lilo again (in your case, eliloconfig I think) and you should be ready for this and any future drive changes.
 
Old 12-25-2015, 03:13 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,059

Rep: Reputation: Disabled
At second thought if you plug in the second hard drive when Slackware is running then your Linux partition is still known as /dev/sda5 at time of running eliloconfig, so that's what liloconfig writes again in elilo.conf, alas.

But if you try to boot with the second drive already plugged in the second is known as /dev/sdb and the root partition named /dev/sdb5 as you last pic obviously shows. To avoid that, you have two ways.

1) Read efibootmgr's man page carefully and run it directly

2) Probably easier
  • Plug in your second hard drive
  • Insert the DVD with Slackware64-14.1
  • Reboot
  • use the installer as usual but do not reformat your root partition, at time of installing the packages just press "Cancel" then accept to configure your system and install elilo
Then eliloconfig will tell you:
Quote:
An old Slackware boot entry has been found in your EFI boot menu. Would you like to remove this before installing the new Slackware boot entry? This is recommended.
Confirm, as you don't want to keep the old (and wrong) lilo entry.

You can skip all other configuration steps.

Tell us how that goes.

All this been said, I will probably propose a patch to eliloconfig, so that it directly uses the UUID instead of partition name. I must first check that it's allowed though. Maybe not that easy as elilo is abandonware...

PS If you are lucky, maybe just replacing /dev/sda5 with /dev/sdb5 in elilo.conf would be enough and would avoid all that hassle. Try that first, then reboot with the second drive plugged in.

Caveat emptor: if that works rebooting with you second drive not plugged in you will get a kernel panic again. You can't have your cake and eat it... Then you could try to write the UUID instead of /dev/sdb5 in elilo.conf.

I will make some tests myself in the coming days.

PPS I didn't pay enough attention, it seems. The last pic probably shows that you still had a wrong /etc/fstab, with /dev/sda5 used as the root of / partition.

Of course you should insure that this setting in /etc/fstab be consistent with the partition set as root in elilo.conf.

Last edited by Didier Spaier; 12-27-2015 at 12:32 PM. Reason: PPS added.
 
  


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
[SOLVED] Kernel panic during boot when second hard drive is installed ahc_fan Linux - Hardware 3 12-01-2015 04:57 PM
Switching Hard Drive Causes Kernel Panic maximusam Linux - Newbie 2 08-16-2010 07:44 AM
Kernel panic, hard drive issues dbbolton Linux - Kernel 2 06-10-2010 11:06 AM
Kernel Panic on USB Hard Drive FredGSanford Bluewhite64 7 09-24-2008 12:56 AM
New Hard Drive Causes Kernel Panic darkfire55 Linux - Hardware 4 11-28-2004 02:59 PM

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

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