LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Kernel Error (https://www.linuxquestions.org/questions/linux-newbie-8/linux-kernel-error-188518/)

smaida 06-01-2004 02:14 PM

Linux Kernel Error
 
Hello,

I am running Debian Sid and I have been trying unsuccessfully to upgrade my kernel for sometime.

Here is there error I receive on boot..

Code:

request_module[block-major-3]: Root fs not mounted
VFS: Cannot open root device "301" or 03:01
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 03:01"

I have used several different tutorials including: http://www.desktop-linux.net/debkernel.htm
and the one on debians site

I have tried with both lilo and grub and either way the result is always the same. I have also tried several different kernels from 2.4 and 2.6 as well as building from source and trying good old apt-get install kernel image. Here is my lilo.conf file.

Code:

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------      `install-mbr(8)', `/usr/share/doc/lilo/',
#                      and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                        |
# |                                                              |
# | Don't forget to run `lilo' after you make changes to this    |
# | conffile, `/boot/bootmess.txt', or install a new kernel.  The |
# | computer will most likely fail to boot if a kernel-image      |
# | post-install script or you don't remember to run `lilo'.      |
# |                                                              |
# +---------------------------------------------------------------+

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
#    bios=0x81

#disk=/dev/sda
#    bios=0x80

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda1

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
        prompt
#        single-key
#        delay=100
#        timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal

# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""

# Boot up Linux by default.
#
default=Linux

image=/vmlinuz
        label=Linux
        read-only
#        restricted
#        alias=1

image=/boot/vmlinuz-2.4.18-1-386
        label=Linux-New
        read-only
        optional
#        restricted
#        alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
# other=/dev/hda4
#        label=HURD
#        restricted
#        alias=3

As always,
Any help would be great.

Thanks,
Shawn

marghorp 06-01-2004 02:31 PM

Try appending root option :

In GRUB:

replace this:
kernel /vmlinuz...... root=LABEL=/

with this:
kernel /vmlinuz...... root=/dev/hda1 (or the drive you have your /boot partition on )

It should work :)

smaida 06-01-2004 11:10 PM

Hi marghorp,

Here is a copy of my grub.conf file.


[CODE]
# 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/hda1 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 /boot/vmlinuz root=/dev/hda1 ro
savedefault
boot

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

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

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

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

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

title Debian GNU/Linux, kernel 2.2.20-idepci
root (hd0,0)
kernel /boot/vmlinuz-2.2.20-idepci root=/dev/hda1 ro
savedefault
boot

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

### END DEBIAN AUTOMAGIC KERNELS LIST
[CODE]

With grub installed in the MBR I get the following error after choosing a kernel from the list:

Code:

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


Thanks again, Shawn

synapse 06-02-2004 12:44 AM

Hi

if none of the above works then you may have left out someting when you compiled your new kernel

I had a similar message and i had left out a ata option in the menuconfig

cheers

smaida 06-02-2004 10:14 AM

So the grub configuration file looks correct?

Thanks,
Shawn

smaida 06-02-2004 10:38 AM

The first kernel in the list works fine under lilo, so I would think that at the very least the problem with that kernel is caused by my grub configuration file. If you look at the lilo.conf I posted at the beginning of the thread the first kernel works, but the second does not.

Thank you,
Shawn


All times are GMT -5. The time now is 10:05 PM.