Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel panic when booting with sata connector in
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
new_fish
n00b
n00b


Joined: 18 Jul 2014
Posts: 23

PostPosted: Fri Jul 18, 2014 4:40 pm    Post subject: kernel panic when booting with sata connector in Reply with quote

Hi everybody, I'm a new Gentoo user and i have to say that I'm really happy with the huge amount of new things I'm learning everyday...
I've used other linux distros before, although I'm still a novice, but this is really another planet.... anyway back on topic....

Right now my system is fully working, is stable, is fast and I'm still configuring all the things i need, but the problem is that i'm having some issues with a kernel panic.
My system is installed in an hard disk connected via a IDE cable and i have another HD with another OS installed in it, but this is connected via a SATA cable.
Now, if i boot up the system with SATA HD disconnected all works fine, but if i boot up with both cable connected i get a kernel panic.
I was using the same configuration with another distro before and all was working good... i just want to pick the right HD at startup (by pressing F8 ) and the bootloader of the selected HD will do the rest.

I think i configured my kernel properly, all the drivers are compiled but maybe i missed something... after all i'm still a noob :roll:

I don't know how to proceed right now, since i don't know how to get the error (dmesg isn't showing it) i took a picture of the panic...

http://www.4shared.com/photo/hAWP_nCwce/20140718_155326.html

Yes, i know this is a pretty noobish way of doing things...

Is there anyone that can point me on the right direction?
Oh, and if you need some other info, and i think so, i'll post them...

Thanks a lot
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Fri Jul 18, 2014 7:01 pm    Post subject: Reply with quote

Did you use genkernel to create your kernel?
Which bootloader are you using? grub? grub2? lilo? syslinux? ??
picture of the panic is an excellent idea.
boot the livecd/usb, mount the gentoo partitions,
Code:
lspci -k | wgetpaste
wgetpaste /mnt/gentoo/usr/src/linux/.config
wgetpaste /mnt/gentoo/boot/grub/grub.conf
wgetpaste /mnt/gentoo/boot/grub/grub.cfg
wgetpaste /mnt/gentoo/etc/lilo.conf
post the url's returned depending on bootloader used two or more will not return a url and can be skipped
This may be as simple as the kernel calling the gentoo hard drive /dev/sdb when both drives are connected instead of /dev/sda as it inevitably does when the gentoo drive is the only drive.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
new_fish
n00b
n00b


Joined: 18 Jul 2014
Posts: 23

PostPosted: Sat Jul 19, 2014 1:01 pm    Post subject: Reply with quote

Oh my god, what a lack of details... sorry :oops:

Well, thank you DONAHUE, after reading your post i finally managed to get it working... actually it was a naming issue, although i can't understand why it behave like this.

Here are the details:

lspci -k is here
Kernel compiled manually, i prefer this way so i can better understand my system.
Kernel config is here
Grub2 is my bootloader
Grub2 config is here

So the problem, as you said, is that when only one drive is connected it takes /dev/sda* name, however when i connect the SATA drive (which seems to come first at detection time) it takes /dev/sdb*.
I don't know if i was overthinking or I'm just not smart enough, lol.
I mean, for me was simply wrong to use sdb because when i boot from the livecd with both HD connected, sda is used to identify IDE HD and sdb is used to identify SATA HD... so, why the livecd environment is different from the one i just built?

Anyway, thank you very much for your help.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Sat Jul 19, 2014 2:51 pm    Post subject: Reply with quote

Quote:
so, why the livecd environment is different from the one i just built?
A good question that I have never been able to answer. I've been through it before including having kernel updates flip the names on a mix of ide and sata drives.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7072

PostPosted: Sat Jul 19, 2014 4:01 pm    Post subject: Reply with quote

It has always been first seen first served.
Livecd boot from cd, and then load all possible controller module it could in order to recognize drives.

if livecd get your ata controller first, ata disk will be sda, and sata will then be sdb...
Once you boot your own kernel, things change, as people must buildin controller in order to make it boot, so when buildin, the first controller loaded might be sata and so sata drive get sda, pushing ata drive to sdb.

Your solve is really easy : make sure your boot drive (ata) controller driver is buildin your kernel and build your sata drivers as module.
This way, sata present or not, the kernel will have no choice than seeing the ata controller first and gives sda to the ata drive.
The sata will be seen later when its module will be load, and so its drive will get sdb
Back to top
View user's profile Send private message
new_fish
n00b
n00b


Joined: 18 Jul 2014
Posts: 23

PostPosted: Sat Jul 19, 2014 4:50 pm    Post subject: Reply with quote

Awesome, this is something I'll surely try as soon as possible, thanks for the advice.

By the way, is there a method to refer to HD drives by ID or by mac address or something similar, something fixed?
This way we don't need to know what is the first drive because HD1 will always have the same ID.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7072

PostPosted: Sat Jul 19, 2014 7:21 pm    Post subject: Reply with quote

There's boot by UUID, but you have to ask someone else about implementing that.
And you have mount by UUID, label... anything udev could handle, the list is there : /dev/disk
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43395
Location: 56N 3W

PostPosted: Sat Jul 19, 2014 7:59 pm    Post subject: Reply with quote

new_fish,

Partitions have a UUID, Filesystems have a UUID and may have a label.
Do not confuse the Partition UUID with the filesystem UUID

The kernel supports booting using Partition UUIDs, even with MSDOS partition tables.
Google will tell you the syntax. Nothing extra is required.

To boot by Filesystem UUID on filesystem Label, you need some user space tools to mount your root filesystem.
Thats what an initramfs is for.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum