LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Kernel panic on 2.6.27.7 kernel (https://www.linuxquestions.org/questions/linux-kernel-70/kernel-panic-on-2-6-27-7-kernel-691116/)

galapogos 12-17-2008 12:06 AM

Kernel panic on 2.6.27.7 kernel
 
Hi,

I have a HDD with a custom Linux installed in it, which basically just boots up into a busybox shell without initrd even. The HDD is meant to boot up into as many computers as possible.

I was using 2.6.22.19 previously fine, but to fix an ACPI problem I have to upgrade to a later version, and I was trying it with 2.6.27.7. I built the kernel and set its root_dev to /dev/sda1, and it works for several of the tested PCs. However on 1 particular PC I would get a kernel panic:

Code:

VFS: Cannot open root device "801" or unknown-block (8,1)
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(8,1)

I don't understand why it would panic, since the drive is obviously /dev/sda1 (8,1), and the older 2.6.22.19 kernel boots up perfectly on this PC as well.

What could be wrong?

Drakeo 12-17-2008 04:55 PM

in your you need to update your lilo.conf to
image="/boot/vmlinuz"
root="/dev/sda1" or hda1
label="Linux"
read-only
when you upgraded by default vmlinuz is pointing to vimlinuz-generic-huge-smp
and that on does not need a initrd.img to boot your system.
all said and done update lilo and run as root /sbin/lilo. if using grub up make the correct adjustments in the menu.1st file
hope this helps.

galapogos 12-17-2008 07:09 PM

I'm using LILO, and yes I've updated my lilo.conf. In fact, here's my entire lilo.conf
Code:

boot = /dev/sda
delay = 10
lba32
prompt
default = 2.6.22.19
vga = ext
root = /dev/sda
read-only

image = /boot/2.6/bzImage-262219
label = 2.6.22.19
root = /dev/sda1
append = "init=/bin/sh"

image = /boot/2.6/bzImage-26277
label = 2.6.27.7
root = /dev/sda1
append = "init=/bin/sh"


Drakeo 12-17-2008 07:51 PM

pasing on that init=/bin/bash that comand is different to me.you built that kernel and if you did ,did you build it fat like 4 mb worth of drivers to start. if not and you did not build the huge kernel you will need to use a initrd.img. when I compile new kernels I use the configs from slackwares huge-smp kenel so I do not need a initrd.img
this happened to me on one of mine and it refused to see sda it had to be the old hda or hdb drove me nuts for awhile finely edited the the grub menu.1st so I did not have to edit every boot. it would start to boot fine but as soon as grub told that drive to load root=sdb1 . it was lost. so I put in hdb1 and all was fine. so I looked into it seems that that operating system I installed need an intrid.img then on resume it looked for hdb built into the initrd.img.
wierd. it has to do with the system.map. it reads it.
Oh this also happened in lilo to. old kernel sees hda not sda.
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot="/dev/hda"
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout="1200"
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga="773"
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins

image="/boot/vmlinuz" slack 12.2 kernel 2.6.27 <----
root="/dev/hda1"
label="Linux"
read-only
# Linux bootable partition config ends

image=/mnt/hda2/boot/vmlinuz24
label="slack12.1-24"
root=/dev/hda2
read-only

image=/mnt/hdb1/boot/vmlinuz-2.6.18.8.tex5
label="pcl2007"
root=/dev/hdb1
read-only
initrd="/mnt/hdb1/boot/initrd-2.6.18.8.tex5.img"
append="acpi=on resume=/dev/hda3 splash=silent"

image=/mnt/hdc1/boot/vmlinuz-2.6.24-22-generic
label="gos3"
root=/dev/hdc1
read-only
initrd="/mnt/hdc1/boot/initrd.img-2.6.24-22-generic"
I just installed slck12.2 and my config is this.
I understand the sda but I do not think lilo sees sda not sure but grub does. I leave one with just vimlinuz or just bzimage so i can use any generic boot program to get things going.

galapogos 12-17-2008 08:14 PM

So you're saying root= has to be /dev/hda1 instead of sda1? That doesn't make a lot of sense since
1. AHCI is enabled in the BIOS and in my 2.6.27.7 kernel, hence SATA drives should be seen as sdX instead of hdX
2. root_dev of both kernels have been set to /dev/sda1
3. The 2.6.22.19 kernel boots in this PC fine as /dev/sda1
4. The 2.6.27.7 kernel boots in other PCs fine as /dev/sda1


However, I'll try modifying lilo.conf and see if it works. It wouldn't solve my problem though...but thanks.


All times are GMT -5. The time now is 02:03 AM.