LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-25-2003, 11:28 AM   #1
T-u-N-i-X
Member
 
Registered: Aug 2003
Posts: 31

Rep: Reputation: 15
Unhappy No one can answer my question :( - Kernel 2.6


Hello...

I've made a great search by Google and Linux Questions but couldn't fine a good answer to my question.

I've compiled Kernel 2.6.0 on Fedora Core 1. Here is the steps I go through: (by the way; I'm using Grub) make xconfig , make bzImage , make modules , make modules_install , make install (to install the newly installed kernel to Grub)

When I reboot the machine newly compiled kernel 2.6 says:

VFS: Cannot open root device "LABEL=/" 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)

I have found a lot of stuff which is related to this problem. I've tried so much things. When writing /dev/hda6 instead of LABEL=/ it continue to load but I guess it cannot still access the hd because a lot of mistakes are given by kernel like it cannot mount /dev, read-only file system etc... Then it stops loading after a while..

Is there a problem in the boot process when compiling with Fedora ? I can post my .config file. Please help me... I want to learn how to compile a fine kernel....
 
Old 12-25-2003, 11:33 AM   #2
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Can we get the output of dmesg, your grub.conf, the output of df -h, a copy of your /etc/fstab? Have you added support for sysfs?

Here's my /etc/fstab:
Code:
/dev/hda3       /               ext3    errors=remount-ro       0       1
/dev/hda2       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/fd0        /floppy         auto    user,noauto             0       0
#/dev/scd0      /cdrom          iso9660 ro,user,noauto          0       0
/dev/hdc        /cdrom          iso9660 ro,user,noauto          0       0
/dev/dvd        /mnt/dvd        udf     ro,user,noauto          0       0
/dev/hda1       /boot   ext3    defaults                        0       2
none            /sys    sysfs   defaults                        0       0
/dev/hda6 is the root / filesystem, correct? I'm running 2.6.0 I compiled yesterday on a Debian Unstable box. My dvd and burner are both working just dandy.
 
Old 12-25-2003, 03:20 PM   #3
T-u-N-i-X
Member
 
Registered: Aug 2003
Posts: 31

Original Poster
Rep: Reputation: 15
if you want the messages from kernel 2.6.0, i can't do it because the kernel stucks after writing VFS............ etc.

I will try some combination of your /etc/fstab because LABEL=/ is defined as / in my fstab not /dev/hda6. But writing directly /dev/hda6 doesn't work correctly. Maybe that's because of the definitions in fstab..?
 
Old 12-25-2003, 03:44 PM   #4
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
in grub.conf, after the image=/boot/kernel put: root=/dev/hda6 on the same line. This is different than GRUB's root. What filesystem are you using on /? Did you compile in support for that?
 
Old 12-25-2003, 06:21 PM   #5
T-u-N-i-X
Member
 
Registered: Aug 2003
Posts: 31

Original Poster
Rep: Reputation: 15
I use ext3.. And compiled all the support (i guess..) If you want I can post my .config file here...

Here's my grub.conf ==>
---------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/hda6
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Fedora Core (2.6.0)
root (hd0,5)
kernel /boot/bzImage-2.6.0 ro root=LABEL=/ hdc=ide-scsi rhgb
initrd /boot/initrd-2.6.0.img
title Fedora Core (2.4.22-1.2115.nptl)
root (hd0,5)
kernel /boot/vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdc=ide-scsi rhgb
initrd /boot/initrd-2.4.22-1.2115.nptl.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
---------------------------------------------------------
I don't know why hdc=ide-scsi and rhgb are used.. I have no scsi device on my system. When I write /dev/hda6 instead of LABEL=/ my linux box cannot find a lot of things and give lots of errors. Then it stuck. I mentioned it in my first message.

In case it makes sense here's my fstab file ==>
---------------------------------------------------------

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda7 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,user,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,user,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,user,kudzu 0 0
/dev/hda5 /mnt/tunix auto noauto,user
/dev/hdb1 /mnt/arsiv auto noauto,user
 
Old 12-25-2003, 07:51 PM   #6
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
Since your / and /boot seem to be on the same partition (/dev/hda6), you might try leaving out the kernel option in the grub.conf file (ie. change the line to "kernel /boot/bzImage-2.6.0 ro"
 
Old 12-27-2003, 03:42 AM   #7
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
LABEL=/ / ext3 defaults 1 1
??? I've not seen anything like that before...

shouldn't it be more like ...
/dev/hda2 / ext3 defaults 1 1

But I dont use grub, so it might have something to do with that? I'm not sure...
 
Old 12-27-2003, 03:50 AM   #8
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
being able to boot a label instead of a device is a kernel option. you'll
have to learn a bunch of non-obvious kernel options that are needed to
boot a new generation kernel. i'm sure i will too.


if you system was booting before, and now it doesn't with the new kernel,
it's not your fstab.

i'm just trying to push you in the right direction.
maybe get somebody to email a config that works for them.
 
Old 12-27-2003, 12:35 PM   #9
ts_sudarshan
LQ Newbie
 
Registered: Oct 2003
Location: Bangalore
Distribution: Arch, SUSE OSS
Posts: 23

Rep: Reputation: 15
T-u-N-i-X: change all the instances of LABEL=/ in fstab and grub.conf to /dev/<hd number> it is a common problem faced. my entries have been changed in fedora and is working fine, also it is a problem faced when there are 2 or more distros on the system and fedora comes later in the disk, i.e if there is another distro in hda5 (having label /) and fedora or RH9 in say hda6 or later then, similar problems are faced and one cannot boot into fedora. LABEL=/ is not adviced if having 2 or more distros, or trying out a new kernel as the system searches for a partition with the label as / instead of the hd number directly. By giving /dev/<hd number> we, directly instruct the system to boot to that particular partition.. This is the direct approach and less error prone and problem free..

P.S.: Fedora and Redhat distros are the only ones to use LABEL=/ instead of /dev/<hd number>. I've tried SUSE, slackware, mandrake, knoppix, debian and none use RH style.

ATB.
 
Old 12-27-2003, 12:53 PM   #10
vinay_s_s
Member
 
Registered: Jul 2003
Posts: 659

Rep: Reputation: 30
Actually the number of distros installed on the system doesnt matter. The thing is redhat and fedora read the label of the filesystem and decide which partiton is what. Actually even though it may sound great, its not a good idea. So replace all occurances of "LABEL=/" in /boot/grub/grub.conf and "/etc/fstab" to /dev/hdXY ( where /dev/hdXY is your root partition). then reboot . All ur problems are gone.

 
Old 12-27-2003, 03:31 PM   #11
T-u-N-i-X
Member
 
Registered: Aug 2003
Posts: 31

Original Poster
Rep: Reputation: 15
When I change only LABEL=/ to /dev/hda6 it starts to load. But then it gives some errors about mounting /dev and other devices like USB and more.. My mouse seems to have power because the light is on but i can't move the cursor.

I'm not on my computer but I really wonder if it really occurs because of the LABEL option. I think I've opened everything about ext3 filesystem and more.. And I know that my system is using ext3. I've no other distros but Windows XP on /dev/hda1 as you can see in my Grub conf. I'll give you the latest news..
 
Old 12-28-2003, 12:51 AM   #12
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
i think ts meant that if you have more than one version of linux installed, you
might have more than one filesystem with the same label, and the kernel
would load the first one it found with that label. if fedora was say hda6
and suse was hda5, and they were both labeled / then the fedora fstab
would load suse by mistake.
 
Old 12-28-2003, 08:27 AM   #13
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
If it's booting now you should make an rc.modules file to load the modules for you hardware.



Here is an example

cat /etc/rc.d/rc.modules
#!/bin/sh
modprobe -s natsemi
modprobe -s trident
if [ `uname -r` = 2.4.20-27.9 ]; then
modprobe -s yenta_socket
modprobe -s ds
modprobe -s usb-ohci
modprobe -s hid
else
modprobe -s iptable_filter
modprobe -s ipt_REJECT
modprobe -s af_packet
modprobe -s ohci-hcd
modprobe -s hid
modprobe -s usb-storage
modprobe -s ide-cd
modprobe -s pcspkr
mosprobe -s isofs
modprobe -s sd_mod
modprobe -s pl2303
modprobe -s ppp_async
modprobe -s softdog
fi
 
Old 12-28-2003, 01:25 PM   #14
T-u-N-i-X
Member
 
Registered: Aug 2003
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by DavidPhillips
If it's booting now you should make an rc.modules file to load the modules for you hardware.



Here is an example

cat /etc/rc.d/rc.modules
#!/bin/sh
modprobe -s natsemi
modprobe -s trident
if [ `uname -r` = 2.4.20-27.9 ]; then
modprobe -s yenta_socket
modprobe -s ds
modprobe -s usb-ohci
modprobe -s hid
else
modprobe -s iptable_filter
modprobe -s ipt_REJECT
modprobe -s af_packet
modprobe -s ohci-hcd
modprobe -s hid
modprobe -s usb-storage
modprobe -s ide-cd
modprobe -s pcspkr
mosprobe -s isofs
modprobe -s sd_mod
modprobe -s pl2303
modprobe -s ppp_async
modprobe -s softdog
fi
I've no file like this.. I guess the modules will differ from computer 2 computer.. How will I know which module to load and its name ? And USB is something I added to the kernel not as a module ?
 
Old 12-28-2003, 08:04 PM   #15
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Well it depends on the hardware that's not working.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question and Answer Help for Compiling the Kernel binarybob0001 Linux - General 5 12-02-2005 01:05 AM
Answer to Question??? Saquear Linux - Networking 1 11-10-2005 01:49 PM
Noone knows the answer to this question??? lexington Linux - Newbie 5 05-02-2004 03:12 PM
the answer is NO, now what's the question salparadise General 7 02-02-2004 02:49 PM
Can you answer this question? mguzman Linux - Software 2 03-16-2002 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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