LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-06-2004, 09:56 AM   #1
snufferz
Member
 
Registered: Feb 2004
Distribution: Gentoo
Posts: 39

Rep: Reputation: 15
Kernel Panic with 2.6.5


Im trying to compile a custom 2.6.5 kernel (this is my first attempt at compiling a kernel) but i cant seem to be able to boot into it. It gives me "VFS: Cannot open root, device "hdg2" or unown block (2,0)".
My grub config is :
# Modified by YaST2. Last modification on Sun May 2 10:32:40 2004


color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: WindowsXP###
title WindowsXP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1

###Don't change this comment - YaST2 identifier: Original name: linux###
title Linux
kernel (hd0,1)/boot/vmlinuz root=/dev/hdg2 vga=0x318 splash=native desktop hdd=ide-scsi hddlun=0
#showopts
initrd (hd0,1)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
root (hd2,0)
chainloader +1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
root (fd0)
chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
kernel (hd0,1)/boot/vmlinuz root=/dev/hdg2 showopts ide=nodma apm=off acpi=off vga=normal nosmp noapic maxcpus=0 3
initrd (hd0,1)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: Memory Test###
title Memory Test
kernel (hd0,1)/boot/memtest.bin

###Don't change this comment - YaST2 identifier: Original name: Test Kernel (2.6.5)###
title Test Kernel (2.6.5)
kernel (hd0,1)/boot/bzImage-2.6.5-rotem root=/dev/hdg2
initrd (hd0,1)/boot/initrd-2.6.5-rotem

I dont know what to do :-(
Thx in advance
 
Old 05-06-2004, 12:53 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Do you still have your previous kernel running?
If so boot into that. Or use the rescue disk to get into linux. While selecting modules and builtins be carefull to check ext2 and/or ext3. Depends on what kind of filesystem you use on /boot partition. It can't load because the filesystem can't be recognized by the kernel as a module at that early stage of booting. However this is just one of the common mistakes made at compiling the kernel. Try this and tell us what happens.
 
Old 05-06-2004, 01:04 PM   #3
eveclatrel
LQ Newbie
 
Registered: May 2004
Location: USA
Distribution: Slackware 9.1
Posts: 1

Rep: Reputation: 0
You should go under Filesystems and then the Partitioning section in the config. I've noticed that it doesn't by default enable multiple partition tables. Select the Windows Logical Volume Manager and/or MSDOS Partition(Anything that looks windows-like). Also make sure that you've got reiserfs enabled, I've done that too, since it's not a default option. I've gotten the same error from that problem under a few different distros. Best of luck!
 
Old 05-06-2004, 01:36 PM   #4
snufferz
Member
 
Registered: Feb 2004
Distribution: Gentoo
Posts: 39

Original Poster
Rep: Reputation: 15
I did compile with support for ext2 and ext3 and reiserfs. One thing that I might be missing is that im booting off an ide channel that is on a pci card. Would it help iff I attatched my .config?
 
Old 05-07-2004, 03:47 PM   #5
snufferz
Member
 
Registered: Feb 2004
Distribution: Gentoo
Posts: 39

Original Poster
Rep: Reputation: 15
Come on i need help with this please.
 
Old 05-07-2004, 07:49 PM   #6
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
I was having all kinds of problems getting my custom kernels to boot,but I was editing the menu list by hand and then I ran grub-update and it fixed everything,but I don"t have suse and mayby yast does that anyway,david
 
Old 05-08-2004, 03:58 AM   #7
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Try to install with everything and then work backwards to what only you need
 
Old 05-21-2004, 10:32 PM   #8
tsingming
LQ Newbie
 
Registered: Apr 2004
Location: China
Distribution: Debain(sarge with kernel 2.6.6)
Posts: 8

Rep: Reputation: 0
I am a chinese, maybe you didn't understand what's i say
first change the directory the kernel source, for example:
#cd linux-2.6.6
#make menuconfig
select "Dvice Drivers->ATA/ATAPI/MFM/RLL support->"
you hat to select this "ATA/ATAPI/MFM/RLL support"
#make
#make modules
#make modules_instal
#make install
configure the boot manager
#reboot
Good lucky!
If not succes! please mail to youxia_2008@yahoo.com.cn
Remember send me the .config file to me!
 
Old 05-22-2004, 01:24 AM   #9
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Just one question. How did you get to hdg2?

That means you have 7 harddisks. Is that correct? If not, give a post of your fdisk -l command.
 
Old 05-22-2004, 09:27 AM   #10
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
I compiled 2.6.6 kernel with these commands:

make menuconfig
make
su -c "make modules_install"
make install (with root)

I have noticed the lack of initrd.img (kernel 2.6.6) file of my system. I surely have initrd.img-2.4.25-1-386 file but no initrd.img-2.6.6 or something like that. Do I need initrd.img with the new kernel and if it's so how can I do that? When I boot using grub and the new kernel I get:

VFS: Cannot open root device "hde2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)

My /boot/grub/menu.lst looks like this:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hde2 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## ## End Default Options ##

title Debian GNU/Linux, kernel
root (hd0,0)
kernel /vmlinuz root=/dev/hde2 ro
savedefault
boot

title Debian GNU/Linux, kernel (recovery mode)
root (hd0,0)
kernel /vmlinuz root=/dev/hde2 ro single
savedefault
boot

title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /vmlinuz-2.6.6 root=/dev/hde2 ro
savedefault
boot

title Debian GNU/Linux, kernel 2.6.6 (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.6.6 root=/dev/hde2 ro single
savedefault
boot

title Debian GNU/Linux, kernel 2.4.25-1-386
root (hd0,0)
kernel /vmlinuz-2.4.25-1-386 root=/dev/hde2 ro
initrd /initrd.img-2.4.25-1-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.25-1-386 (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.4.25-1-386 root=/dev/hde2 ro single
initrd /initrd.img-2.4.25-1-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

If if helps, these are the partitions of GNU/Linux:

temonen@debianmasiina:/boot/grub$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hde2 4.6G 119M 4.3G 3% /
tmpfs 253M 0 253M 0% /dev/shm
/dev/hde1 89M 11M 73M 14% /boot
/dev/hde5 9.2G 1.7G 7.1G 19% /usr
/dev/hde6 19G 4.1G 14G 24% /opt
/dev/hde7 7.4G 412M 6.6G 6% /var
/dev/hde8 7.4G 33M 7.0G 1% /tmp
/dev/hde9 100G 3.7G 92G 4% /home
 
Old 05-22-2004, 09:36 AM   #11
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Consider DrOzz "Newbie guide to kernel compiling" on LQ forums.

Just search for this thread.

Otherwise run this command as root:

/sbin/mkinitrd /boot/initrd-2.6.6.img 2.6.6

This wil create the initrd file for your kernel. But as I said consider DrOzz guide as it will tell you all of this in a few easy steps. You will need only a couple of minutes.

Peace!
 
Old 05-22-2004, 10:31 AM   #12
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
I read the "Newbie guide to kernel compiling" and did "/sbin/mkinitrd /boot/initrd-2.6.6.img 2.6.6" command but I only get:

debianmasiina:/boot/grub# mkinitrd /boot/initrd-2.6.6.img 2.6.6

$Id: mkinitrd,v 1.163 2004/03/01 03:16:01 herbert Exp $

Usage: /usr/sbin/mkinitrd [OPTION]... <-o outfile> [moduledir]

Options:
-d confdir Specify an alternative configuration directory.
-k Keep temporary directory used to make the image.
-m command Set the command to make an initrd image.
-o outfile Write to outfile.
-r root Override ROOT setting in mkinitrd.conf.

See mkinitrd(8) for further details.


If I do "mkinitrd -o /boot/initrd-2.6.6.img 2.6.6" (because the help says <-o outfile>) I get:

debianmasiina:/boot/grub# mkinitrd -o /boot/initrd-2.6.6.img 2.6.6
/usr/sbin/mkinitrd: /boot/grub/2.6.6: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?

What does this mean?
 
Old 05-22-2004, 10:36 AM   #13
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
You said you have a 2.6.6 kernel? Check one thing out please. See what directory you have in /lib/modules directory.

It should be 2.6.6

If it's not, then your kernel is not 2.6.6 and you have to append the number of the kernel you have.

There should also be your old kernel directory. Like 2.6.5 or something depending on which kernel you have isntalled at the moment.
 
Old 05-22-2004, 11:11 AM   #14
Duukkis
Member
 
Registered: May 2003
Location: Finland
Distribution: Debian Sarge
Posts: 75

Rep: Reputation: 15
There is a 2.6.6 directory in /lib/modules so everything should be ok.

Last edited by Duukkis; 05-22-2004 at 12:26 PM.
 
Old 05-22-2004, 12:27 PM   #15
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Well you got me confused then. I don't know what the messages mean, as I never got them at my recompiling. However the compiling of your kernel is somehow different from mine.

You did:

make menuconfig
make
make modules install
make

You should have done:

make bzImage
make modules
make modules_install

Try recompiling your kernel. And do use DrOzz's guide. For it works out of the box You know what I mean.

Peace!
 
  


Reply



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: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Kernel panic puts me in a panic theeeg Linux - Software 2 07-31-2004 04:46 PM
kernel panic (narius panic) narius Linux - Newbie 3 06-20-2002 03:56 PM
Kernel panic making me panic! Linux_N0oby Linux - Software 19 05-29-2002 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:45 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