Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic when upgrading to 3.2 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sat Mar 17, 2012 10:34 pm    Post subject: Kernel panic when upgrading to 3.2 [SOLVED] Reply with quote

Hi all,

I've just tried updating to the 3.2 kernel and got a panic- Unable to mount root fs on unknown-block (2,0). As far as I can tell, I've got the file system and hard disk controller drivers built into the kernel, but it doesn't seem to help.

Here is the output of
Code:
lspci -k
and my
Code:
/usr/src/linux/.config
file is at http://pastebin.com/embed_js.php?i=mEQL77iq

Code:

00:00.0 RAM memory: nVidia Corporation MCP67 Memory Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
00:01.0 ISA bridge: nVidia Corporation MCP67 ISA Bridge (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
00:01.1 SMBus: nVidia Corporation MCP67 SMBus (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
00:01.2 RAM memory: nVidia Corporation MCP67 Memory Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
00:01.3 Co-processor: nVidia Corporation MCP67 Co-processor (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
00:02.0 USB Controller: nVidia Corporation MCP67 OHCI USB 1.1 Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: ohci_hcd
00:02.1 USB Controller: nVidia Corporation MCP67 EHCI USB 2.0 Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: ehci_hcd
00:04.0 USB Controller: nVidia Corporation MCP67 OHCI USB 1.1 Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: ohci_hcd
00:04.1 USB Controller: nVidia Corporation MCP67 EHCI USB 2.0 Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: ehci_hcd
00:06.0 IDE interface: nVidia Corporation MCP67 IDE Controller (rev a1)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: pata_amd
00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
    Subsystem: ASUSTeK Computer Inc. Device 1339
    Kernel driver in use: HDA Intel
00:08.0 PCI bridge: nVidia Corporation MCP67 PCI Bridge (rev a2)
00:09.0 IDE interface: nVidia Corporation MCP67 AHCI Controller (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 16a7
    Kernel driver in use: ahci
00:0a.0 Ethernet controller: nVidia Corporation MCP67 Ethernet (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 1697
    Kernel driver in use: forcedeth
00:0c.0 PCI bridge: nVidia Corporation MCP67 PCI Express Bridge (rev a2)
    Kernel driver in use: pcieport
00:0d.0 PCI bridge: nVidia Corporation MCP67 PCI Express Bridge (rev a2)
    Kernel driver in use: pcieport
00:12.0 VGA compatible controller: nVidia Corporation C67 [GeForce 7000M / nForce 610M] (rev a2)
    Subsystem: ASUSTeK Computer Inc. Device 1692
    Kernel driver in use: nouveau
    Kernel modules: nouveau
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
05:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
    Subsystem: Device 1a3b:1026
    Kernel driver in use: ath5k
    Kernel modules: ath_pci


Last edited by seapotato on Sun Mar 18, 2012 7:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sat Mar 17, 2012 11:45 pm    Post subject: Reply with quote

seapotato

try adding root=/dev/sda? rootfstype=ext? to your grub kernel line - naturally replace the ? with the appropriate values

This has worked for others....
Back to top
View user's profile Send private message
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Sun Mar 18, 2012 9:36 am    Post subject: Reply with quote

as you see the boot screen, press 'e' on there and edit the line.

By default grub uses /dev/ram0 for the root kernel image so you need to change this to your /boot partition.

my grub.conf is as follows for 3.2:

Code:
title GENTOO 3.2.8
root (hd0,0)
kernel /boot/kernel root=/dev/sda2 real_root=/dev/sda2


/dev/sda1 is my /boot folder, /dev/sda2 is my / folder which contains everything else.
_________________
It said "Requires Windows XP or better"
So I installed gentoo.
Back to top
View user's profile Send private message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sun Mar 18, 2012 10:16 am    Post subject: Reply with quote

Thanks for the responses. I tried adding rootfstype=ext3 to grub so that my grub config for 3.2 now reads
Code:

title Gentoo Linux 3.2.1-r2
root (hd0,0)
kernel /boot/kernel-3.2.1-gentoo-r2 root=dev/sda3 rootfstype=ext3


It still panics, but now it complains about the unknown block being (0,0) rather than (2,0).
Back to top
View user's profile Send private message
Splink
Apprentice
Apprentice


Joined: 09 Feb 2005
Posts: 295

PostPosted: Sun Mar 18, 2012 10:56 am    Post subject: Reply with quote

Ok first of all what I would do is post your fdisk configuration for your drive.

If you have a sda, sdb and sdc then grub might be thinking you have linux installed on sdc1 hence which it is referencing hd2,0.

bear in mind that /dev starts at 1 on partition types but grub uses 0 to start, so hd2,0 will actually be /dev/sdc1, so if /dev/sdc is where linux is installed then grub will just need to know which disk it is on.

If all this is ok, then grub should be able to boot. If it cant see where its /boot folder and is not even loading any part of the kernel then it is referencing a wrong partition.

Could you post your fstab out and do a fdisk -l of the disk which you have linux installed on.

It should look something like:

Code:
 fdisk /dev/sda -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x97646c29

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      224909      112454+  83  Linux
/dev/sda2          224910   307435904   153605497+  83  Linux
/dev/sda3       307435905   610550324   151557210   83  Linux
/dev/sda4       610550325   625137344     7293510   82  Linux swap / Solaris

_________________
It said "Requires Windows XP or better"
So I installed gentoo.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Mar 18, 2012 11:20 am    Post subject: Reply with quote

Splink wrote:
as you see the boot screen, press 'e' on there and edit the line.

By default grub uses /dev/ram0 for the root kernel image so you need to change this to your /boot partition.

my grub.conf is as follows for 3.2:

Code:
title GENTOO 3.2.8
root (hd0,0)
kernel /boot/kernel root=/dev/sda2 real_root=/dev/sda2


/dev/sda1 is my /boot folder, /dev/sda2 is my / folder which contains everything else.


just one minor nit - unless youre using an initramfs, having 'real_root' is superfluous, and 'root' is all that's necessary

real_root is for initramfs users, and it's an instruction that tells the initramfs - whose root will be a ramdisk - what to switch root to once the prep work is done
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Mar 18, 2012 11:29 am    Post subject: Reply with quote

seapotato,

can you please do this, and tell me what the resultant output is

Code:

# mount /boot
# cd /usr/src/linux
# scripts/extract-ikconfig /boot/kernel-3.2.1-gentoo-r2 |grep SATA_AHCI


0,0 == hdd controller support not found
so the big question is, why
2,0 is an error if you specify an initramfs, which says that no root could be found within an initramfs (i.e. youve specified root=/dev/ram0, but there's no root there)

I see your kernel config, SATA_AHCI support is in there, which is correct for your hardware, im just wondering if (maybe?) copying the kernel over didnt go as planned. That or maybe a thumb drive in the system is causing things to go wacky
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sun Mar 18, 2012 2:27 pm    Post subject: Reply with quote

/etc/fstab is

Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/p$

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda3               /               ext3            noatime         0 1
/dev/sda2               none            swap            sw              0 0



Output of fdisk is

Code:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbbc58b91

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   83  Linux
/dev/sda2               6         137     1060290   82  Linux swap / Solaris
/dev/sda3             138       14593   116117820   83  Linux



cach0rr0, when I follow your instructions, sure enough, I get an error. The output is
Code:

extract-ikconfig: Cannot find kernel config
Back to top
View user's profile Send private message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sun Mar 18, 2012 2:40 pm    Post subject: Reply with quote

I just realized I'm an idiot and I get the error because I didn't set CONFIG_IKCONFIG=y. I'm rebuilding the kernel now and will post the output
Back to top
View user's profile Send private message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sun Mar 18, 2012 2:46 pm    Post subject: Reply with quote

Here is the output of ikconfig

Code:

CONFIG_SATA_AHCI=y
CONFIG_SATA_AHCI_PLATFORM=y


So as far as I understand it, the kernel config is correctly set up for my hard drive, and ikconfig confirms the compiled kernel correctly built in support for my hd. Not sure what else it could be other than possibly a conflict?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sun Mar 18, 2012 5:31 pm    Post subject: Reply with quote

seapotato wrote:
Code:
title Gentoo Linux 3.2.1-r2
root (hd0,0)
kernel /boot/kernel-3.2.1-gentoo-r2 root=dev/sda3 rootfstype=ext3
Typically, root= specifies the absolute path to the block device.
Back to top
View user's profile Send private message
seapotato
n00b
n00b


Joined: 28 Jan 2011
Posts: 30

PostPosted: Sun Mar 18, 2012 7:06 pm    Post subject: Reply with quote

Thanks! I can't believe I didn't notice that. I must have read the grub config file about 5 times :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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