Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel panic when booting from pcmcia card[solved]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Mon Jun 03, 2013 10:59 am    Post subject: kernel panic when booting from pcmcia card[solved] Reply with quote

I have installed grub and gentoo to a pcmcia card, grub loads just fine and the kernel is loaded, however I get the kernel panic:
VFS: Cannot open root device "sdb1" or unknown-block(1,0)

the panic message includes the partitions found on my harddisk(sda) but not on my pcmcia card(sdb), this lead me to the conclusion that there is something missing in my kernel config

heres my kernel config file:
http://pastebin.com/vrzKEY5z

thanks

problem solved by removing the hard drive's drivers from the kernel(modularized)


Last edited by blakdeath on Wed Jun 12, 2013 9:19 am; edited 1 time in total
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Mon Jun 03, 2013 5:09 pm    Post subject: Reply with quote

enable CONFIG_PATA_PCMCIA, make it built-in, and add "rootwait" to the kernel commandline
(the card may be detected _after_ the kernel tries to mount the root device, this command
makes it wait forever for the root device to appear before attempting to mount it).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Jun 03, 2013 7:00 pm    Post subject: Reply with quote

blakdeath,

You also need PCMCIA support built into your kernel.

unknown-block(1,0) is the first RAM disk. So your error reads as if you have told the kernel to use an initrd but not provided one.
Please post your grub.conf
_________________
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
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Mon Jun 03, 2013 7:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
You also need PCMCIA support built into your kernel.

His .config shows pcmcia/cardbus enabled but is missing the IDE driver required for CF cards.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Tue Jun 04, 2013 7:11 am    Post subject: Reply with quote

Even after enabling the CONFIG_PATA_PCMCIA in the kernel did nothing i'm afraid :(, the rootwait parameter didnt help either.
here's my grub.conf:
default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux
root (hd1,1)
kernel /boot/kernel3 root=/dev/sdb1

title gentoo linux with root wait
root(hd1,1)
kernel /boot/kernel3 root=/dev/sdb1 rootwait=10


thanks for the help :D
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Tue Jun 04, 2013 11:07 am    Post subject: Reply with quote

post a full dmesg please
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Tue Jun 04, 2013 11:33 am    Post subject: Reply with quote

when I chroot, dmesg just prints out my PC's dmesg, how do I get it to print out my chroot environment's dmesg?
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Tue Jun 04, 2013 11:54 am    Post subject: Reply with quote

try netconsole if you have another networked machine:
http://www.mjmwired.net/kernel/Documentation/networking/netconsole.txt
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Tue Jun 04, 2013 12:36 pm    Post subject: Reply with quote

I only have acecess to wireless networks and I havent configured wireless networking on that machine yet, is tehre another way to do that(pherhaps via /var/log?)

thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 04, 2013 6:27 pm    Post subject: Reply with quote

blakdeath,

There is only one dmesg, its the same inside and outside the chroot.
You can save dmesg to a file and put it on a usb stick to move it to another machine to post.
_________________
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
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Tue Jun 04, 2013 6:37 pm    Post subject: Reply with quote

but I can't even boot into the system
I can only access the system via chroot
does that mean I wont be able to get the dmesg log?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 04, 2013 6:44 pm    Post subject: Reply with quote

blakdeath,

No. Boot the system however you like, the dmesg is the same inside and outside the chroot.
It may change when you change kernels hardware or whatever.

While you are posting files, post your grub.conf too please.
_________________
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
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Tue Jun 04, 2013 7:10 pm    Post subject: Reply with quote

here's my grub.conf:
default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux
root (hd1,1)
kernel /boot/kernel3 root=/dev/sdb1

title gentoo linux with root wait
root(hd1,1)
kernel /boot/kernel3 root=/dev/sdb1 rootwait=10
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 04, 2013 7:44 pm    Post subject: Reply with quote

blakdeath,

Thats OK. Don't forget your dmesg.

What is the date and time in the kernel called /boot/kernel3 ?
ls -l /boot shows it.
_________________
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
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Wed Jun 05, 2013 6:37 am    Post subject: Reply with quote

ah here's my ls -l :
lrwxrwxrwx 1 root root 1 Jun 3 09:20 boot -> .
drwxr-xr-x 2 root root 4096 Jun 4 09:14 grub
-rw-r--r-- 1 root root 4117984 Jun 3 11:41 kernel2
-rw-r--r-- 1 root root 4126784 Jun 4 06:07 kernel3



here's my dmesg:
http://pastebin.com/jKr2T0nc
my pccard is sdb

thanks
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Wed Jun 05, 2013 9:05 am    Post subject: Reply with quote

oh it's a USB CF Card reader! you need to make CONFIG_USB_STORAGE=y (built-in).
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Wed Jun 05, 2013 12:33 pm    Post subject: Reply with quote

I already have that option built in :(
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Wed Jun 05, 2013 12:56 pm    Post subject: Reply with quote

plug the card reader in, boot the kernel you want to use, but set the rootfs to the
harddisk instead of the cf card. then send the dmesg. also be aware that any
usb sticks you plug in might change the drive devnode of the cardreader.

the dmesg you posted only shows that you plugged the cardreader over an hour after boot.
that doesn't help finding the problem in the slightest.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Wed Jun 05, 2013 2:06 pm    Post subject: Reply with quote

sorry about that
here's the new dmesg:
http://pastebin.com/hmHr6Zjf
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jun 05, 2013 7:22 pm    Post subject: Reply with quote

blakdeath,

Some BIOSes report the boot drive as (hd0,0) regardless of which drive it actually is this makes installing grub correctly a problem because the drive swap BIOS names between the grub install and being used to boot.

Lets do some checking ...

Go to boot from your USB stick. When the grub menu appears, press e for edit.
Grub will show you
Code:
title Gentoo Linux
root (hd1,1)
kernel /boot/kernel3 root=/dev/sdb1


Choose the root (hd1,1) line and make it read
Code:
root (hd
press the tab key. Grub will list all the drives known to the BIOS by their BIOS names.
Probably just 0 and 1 for you.
Choose 1, and make the line read
Code:
root (hd1,
now press tab. Grub will list all the partitions on the selected drive, or fill in the only one.
From the number of partitions on the drive, can you tell which drive you are looking at ?

If all looks well, change the drive letter in root=/dev/sdb1 to sda1 and allow the boot to contine
None of this harms your on disk grub.conf.
_________________
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
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Thu Jun 06, 2013 8:07 am    Post subject: Reply with quote

well I followed those instructions and grub showed me that teh card is (0,0)
I adjusted teh grub accordingly (kernel, & root=) and adjusted the fstab as well (/dev/sda1 on /)
this is my current kernel panic:
http://www.4shared.com/photo/bF3jS40u/CAM00111.html

and If I use rootwait=10 I get:
http://www.4shared.com/photo/zp8W2PEN/CAM00112.html

thanks, I appreciate your help
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Thu Jun 06, 2013 11:55 am    Post subject: Reply with quote

hmm, while the kernel output is scrolling down, did you ever see the
cardreader being detected? Right now only the sata disk is known to the kernel.

rootwait doesn't take any parameters btw, just "linux.git root=/dev/sdb1 rootwait"
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Thu Jun 06, 2013 12:07 pm    Post subject: Reply with quote

yeah I noticed it wasn't detected, only my hard disk was detected and sda1(an ntfs partition) is attempted, there is no sdb at all
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 395

PostPosted: Thu Jun 06, 2013 12:19 pm    Post subject: Reply with quote

I just used one of machine's initrd, and the system successfully boots, this is a temporary solution, I'd like to boot without an initrd, this indicates that something might be missing in the kernel though

here's my dmesg when using an initrd
http://pastebin.com/yJN8JYuC
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Thu Jun 06, 2013 12:32 pm    Post subject: Reply with quote

Interestingly, it IS detected:

Code:
[    6.461146] scsi 4:0:0:0: Direct-Access     Lexar    ExpressCard      1100 PQ: 0 ANSI: 0 CCS
[    6.462595] sd 4:0:0:0: Attached scsi generic sg2 type 0
[    6.462884] sd 4:0:0:0: [sdb] 7864320 512-byte logical blocks: (4.02 GB/3.75 GiB)
[    6.463630] sd 4:0:0:0: [sdb] Write Protect is off
[    6.463633] sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 00
[    6.464379] sd 4:0:0:0: [sdb] No Caching mode page present
[    6.464381] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[    6.467877] sd 4:0:0:0: [sdb] No Caching mode page present
[    6.467880] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[    6.468386]  sdb: sdb1


do you use a filesystem on the card which is not built-in?
EDIT scratch that, I see it's ext4 which is built-int

please show the contents of the initrd, and lsmod output when you have booted from the card!
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
Goto page 1, 2  Next
Page 1 of 2

 
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