View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Mon Jun 03, 2013 10:59 am Post subject: kernel panic when booting from pcmcia card[solved] |
|
|
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 Adel Ahmed on Wed Jun 12, 2013 9:19 am; edited 1 time in total |
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Mon Jun 03, 2013 5:09 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Mon Jun 03, 2013 7:00 pm Post subject: |
|
|
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 |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Mon Jun 03, 2013 7:16 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 04, 2013 7:11 am Post subject: |
|
|
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 |
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Tue Jun 04, 2013 11:07 am Post subject: |
|
|
post a full dmesg please |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 04, 2013 11:33 am Post subject: |
|
|
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 |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 04, 2013 12:36 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Tue Jun 04, 2013 6:27 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 04, 2013 6:37 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Tue Jun 04, 2013 6:44 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Jun 04, 2013 7:10 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Tue Jun 04, 2013 7:44 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Wed Jun 05, 2013 6:37 am Post subject: |
|
|
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 |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Wed Jun 05, 2013 9:05 am Post subject: |
|
|
oh it's a USB CF Card reader! you need to make CONFIG_USB_STORAGE=y (built-in). |
|
Back to top |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Wed Jun 05, 2013 12:33 pm Post subject: |
|
|
I already have that option built in |
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Wed Jun 05, 2013 12:56 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Wed Jun 05, 2013 7:22 pm Post subject: |
|
|
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 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 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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Thu Jun 06, 2013 11:55 am Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Jun 06, 2013 12:07 pm Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Thu Jun 06, 2013 12:19 pm Post subject: |
|
|
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 |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Thu Jun 06, 2013 12:32 pm Post subject: |
|
|
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 |
|
|
|