LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-05-2006, 08:38 AM   #1
kailun
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 48

Rep: Reputation: 15
Recompile Kernel 2.4 -> 2.6 [kernel panic] --> solved!


Hi,

I'm having some trouble setting up a new Slack install 10.2. Default install goes fine, I've partitioned into this layout:

/dev/hda1 --> / (primary)
/dev/hda5 --> swap (logical)
/dev/hda6 --> /usr (logical)
/dev/hda7 --> /home (logical)

However, I'm now trying to recompile the kernel to version 2.6.17.11. I've dones this like a million times before, but something has me stumped. The system is as follows:

AMD Athlon64 3000+
MSI K8N Neo Platinum NF4 (Rev. 1)
1024Mb DDR RAM (single stick)
ATI 7xxx Graphics card PCI
Hard drive, cdrom, (IDE) etc, etc.
Most SATA options are disabled

Everytime I try to start up a new kernel recompile, I end up with an error:

Kernel Panic - VFS: Cannot open root device "301" or unknown block(3,1)

I know that you must select anc compile in the appropriate filesystem(s), in my case it's ReiserFS - which is most definetely compiled into the kernel and NOT as a module, but I'm still receiving the same error.

Then I thought that maybe the IDE drive isn't getting found and so I added all the generic and NVidia IDE options in and now I'm getting this error:

attempt to access beyond end of device
hda2: rw=16 want=8, limit=2
Kernel panic - not syncing: I/O error reading memory image

This is from a clean compile, with the only options selected:

ReiserFS, ext2, ext3 filesystem(s) suppport
IDE options (mentioned above)
Nothing else is touched and above are compiled into the kernel.

From what I can see as it's booting up, the hard drive is recognised as /dev/hda and not sdX. Also whenever I go to execute /sbin/lilo after a fresh recompile to try again, no errors pop up, but I have noticed a boot.301 file there. If a delete it, a new one is created as a backup according to lilo.

This system is intended only to run Slackware, so no other filesystems are in place.

Does anyone have any ideas about what might be going wrong?

Thanks

Last edited by kailun; 09-06-2006 at 09:06 PM.
 
Old 09-05-2006, 09:45 AM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Can you go into your linux kernel source and do:
Code:
cat .config | grep -v '#' | grep -v '^$'

Edit:
I also notice that the last error you posted is looking at /dev/hda2; but you don't list a hda2 in your partition list. Is the root/boot options in lilo.conf looking in the right spot?

Last edited by mdarby; 09-05-2006 at 09:50 AM.
 
Old 09-06-2006, 09:06 PM   #3
kailun
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 48

Original Poster
Rep: Reputation: 15
Thank you for your offer of help, but I've finally managed to solve this problem after a lot of reading and searching.

If anyone else has come across this problem, it's to do with this line in your kernel .config file:

CONFIG_PM_STD_PARTITION="/dev/hda2"

It seems to be set by default to /dev/hda2 in kernel 2.6.17.11 at least and you have to change the "/dev/hda2" to whatever is your / (root) drive, in my case /dev/hda1. If you prefer to look through the menus, it is under:

Power management options (ACPI, APM) --> (/dev/hda2) Default resume partition

It's not listed very clearly in my opinion and is very easily missed. I have no idea why it is set like this by default and I'm pretty sure it wasn't in the previous kernels (at least the last kernel I recompiled which was 2.6.15.x)

I'd like to credit the source of this knowledge to this thread:

http://www.linuxquestions.org/questi...d.php?t=463272
 
Old 09-07-2006, 08:55 AM   #4
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
Thank you for taking time to explain in detail the solution you found to your problem.
I have been struggling with this exact kernel version, using SATA and reiserfs, so I will try this today as soon as I have time.
 
  


Reply

Tags
kernel, panic



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
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Kernel panic after recompile, have tried everything else. j4mes Slackware 10 09-22-2005 03:31 AM
Kernel panic after recompile in FC4 litlmary Fedora 3 07-28-2005 06:17 PM
Kernel recompile-kernel panic. short101 Debian 10 09-21-2004 03:57 AM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 04:32 PM

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

All times are GMT -5. The time now is 11:21 AM.

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