LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   just compiled kernel will not boot (https://www.linuxquestions.org/questions/linux-newbie-8/just-compiled-kernel-will-not-boot-761740/)

smeezekitty 10-13-2009 11:44 PM

just compiled kernel will not boot
 
there is a boat load of messages but
here is the last messages
Code:

All bugs added by David S. Miller <davem@redhat.com> -- WTF?
Using IPI Shortcut mode
hd: no drives specified - use hd=cyl,head,sectors on kernel  command line
VFS: Cannot open root device "301" or unknown-block(3,1)
VFS: Cannot open root device "/dev/hda1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
Pid: 1, comm, swapper not tainted 2.6.31.2 #2
Call Trace
panic+0x38/0xd9
mount_block_root+0x104/0x118
mount_root+0x96/0x9b
? kernel_init+0x0/0x8b
prepare_namespace+0x141/0x165
kernel_init+0x82/0x8b
kernel_thread_helper+0x7/0x10


foodown 10-14-2009 01:19 AM

Are you using LILO or GRUB?

smeezekitty 10-14-2009 01:28 AM

LILO grub does not work at all

markush 10-14-2009 01:31 AM

Hi smeezekitty,

it looks like your kernel lacks the driver for your harddrive.

If it where a problem with the bootloader you should not have been able to boot the kernel or (while the configuration) to add the partition to the bootloader.

What kind of harddrive are you using? IDE or SATA? if SATA, did you select the appropriate settings in the kernelconfiguration?

Markus

smeezekitty 10-14-2009 01:38 AM

i think its IDE
here is lilo.conf
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/hda1

# 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=80

# 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

# 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=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce noapic root=/dev/hda1"

# Boot up Linux by default.
#
default=Linux

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

image=/vmlinuz.old
        label=LinuxOLD
        read-only
        optional
#        restricted
        alias=2
image=/bzImage
      label=Compiled
      read-only
#      optional
      alias=3
# 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/hdb1
#        label=Custom_Linux
#        restricted
#        alias=3


markush 10-14-2009 01:52 AM

well, seems this bootloader resides on the bootsector of your boot partition but not on the masterbootrecord of your harddrive, is this correct?
And you do not have a separated /boot partition?
Have there been any error-messages or warnings when you executed lilo?

Markus

smeezekitty 10-14-2009 01:55 AM

i have two kernels 2.4 and 2.6 both on the same partition
2.4 boots 2.6 does not

markush 10-14-2009 02:06 AM

And this kernels reside in the same directory?
There is a /boot/Linux24, a /vmlinuz.old and a /bzImage. Is /bzImage the new compiled kernel?
Maybe there is a conflict between the lilo-settings for a 2.6 and a 2.4 kernel. But I don't know enough about this.

Markus

smeezekitty 10-14-2009 02:22 AM

Ich bin die Kompilierung des Kernels zusatzliche Treiber
Dies kann eine Weile dauern

markush 10-14-2009 02:24 AM

ok, I've to go to work now. I'll look here later in the evening.

good luck

Markus

doc.nice 10-14-2009 03:41 AM

be sure to include the partition support for dos partitions, the support for ext2/3 or whatever your root partition uses and the support for your ide controller. All these options muste be compiled into the kernel, not loaded as Modules.
when you switch from an old 2.4 kernel to a rather new 2.6 kernel, maybe you use the new libata interfaces that may use /dev/sd* instead of /dev/hd* for your hard disks. you could try to set root=/dev/sda1 in your lilo.conf or specify it in the boot command line.

ATTENTION: when you do this, your old kernel will NOT BOOT. be sure to have a bootable CD (like www.grml.org) with which you can revert the changes if it doesn't help.

smeezekitty 10-14-2009 12:24 PM

i am confused - i have conflicting data
i cant tell if hda is IDE or ATA
i thought it was ide but now there is evedance otherwise

doc.nice 10-14-2009 12:45 PM

ide is (p)ata, but not SATA...

smeezekitty 10-14-2009 12:54 PM

Quote:

Originally Posted by doc.nice (Post 3718591)
be sure to include the partition support for dos partitions, the support for ext2/3 or whatever your root partition uses and the support for your ide controller. All these options muste be compiled into the kernel, not loaded as Modules.
when you switch from an old 2.4 kernel to a rather new 2.6 kernel, maybe you use the new libata interfaces that may use /dev/sd* instead of /dev/hd* for your hard disks. you could try to set root=/dev/sda1 in your lilo.conf or specify it in the boot command line.

ATTENTION: when you do this, your old kernel will NOT BOOT. be sure to have a bootable CD (like www.grml.org) with which you can revert the changes if it doesn't help.

this was bad advice now i cannot boot ether kernel
and i do not know how to fix it with a live cd

smeezekitty 10-14-2009 01:16 PM

both kernels say cannot open sda1


All times are GMT -5. The time now is 11:51 PM.