One problem with kernel upgrade, multiple solutions...
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One problem with kernel upgrade, multiple solutions...
Alright I have a lot of different options open to me and I need your experience to find the 'best' path to take to fix my problem. I'm running on a 2-week old install of sarge with the 2.4.25 kernel and I want to upgrade to the 2.6.6 kernel. I already downloaded the kernel source, configured it and successfully compiled it, but I ran into a problem during boot:
Code:
VFS: Cannot open root device "hda1" on 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 asked for help, and I re-compilied by de-modularizing an option but got the same problem. I then tried to install lilo and remove grub because my friend (who runs Gentoo) said that he was having a similar problem with grub not accepting his new kernel and after he installed lilo it worked fine. So I did:
But grub is still booting my system! So now I feel like I have multiple solutions to my problem and I'm not sure which one is best:
1) Get grub the hell out of my system (how?) and boot with lilo, then maybe my newly compiled kernel will work. But I'm really nervous about screwing up and having my system become unbootable, and losing all the files and work I've collected over the past two weeks (on a side-note, grub won't recognize my USB keyboard so I'm looking a lilo in a pretty positive light right now)
2) Compile my kernel again, and again, and again until it finally boots. I have no idea what's wrong though, and even less of an idea how to fix it. The kernel configuration menu is a plethora of options (both a good thing and in this case a bad thing I guess)
3) Forget compiling my own kernel and install the Debian 2.6.6 kernel package. Sounds like it has the highest probablity of working (and the easiest/least tedious solution).
So do you pick door #1, door #2, or door #3? By the way I'm not sure if this matters, but after I get a 2.6.6 kernel working I'm going to install ATI drivers for my Radeon 9500PRO, which I have been putting off for far too long. I appreciate your guidance in the matter gentlemen (and ladies?)
Well nothing broke, but I didn't like grub, so I reinstall lilo
apt-get remove grub
apt-get install lilo
lilo
reboot
Worked fine. I should mention that the only thing I have installed is Debian, so I don't know If anything else would need to be done to dual-boot, if you do that kind of silly stuff.
Originally posted by twsnnva Well nothing broke, but I didn't like grub, so I reinstall lilo
apt-get remove grub
apt-get install lilo
lilo
reboot
Worked fine. I should mention that the only thing I have installed is Debian, so I don't know If anything else would need to be done to dual-boot, if you do that kind of silly stuff.
Thomas
No way, Debian is the only OS I'll ever need! Damnit, I guess I'll go try the grub removal / lilo installation and see if it works this time.
Quote:
Originally posted by utanja i would use the debian provided 2.6.6 image until such time that i have everything else running proper then recompile it to increase efficiency...
Yeah that's what I was thinking as well. I guess I'll try to see if lilo can first and if it doesn't.....I guess door #3 is the best option
What partitions do you have? Is your /boot directory on /dev/hda1 ? That would be (hd0,0). Does your kernel require an initrd? Be sure that is noted as well. You can boot from grub, one command at a time, if necessary, by hitting "c" at the boot prompt, or edit a stanza in your /boot/grub/menu.lst(or grub.conf).
I'm still learning grub, but it continues to surprise me with its power. I think there's a command which you can issue at bootup which will search your drive for viable kernel images as well.
Last edited by vectordrake; 07-13-2004 at 12:01 AM.
localhost:/# apt-get remove grub
Reading Package Lists... Done
Building Dependency Tree... Done
Package grub is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 151 not upgraded.
localhost:/# apt-get install lilo
Reading Package Lists... Done
Building Dependency Tree... Done
lilo is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 151 not upgraded.
Interesting. I bootup my system with grub yet it is not installed.... Anyone got an explanation for this? In another thread a guy suggested I download something called debfoster, but it sounded scary and I'm really paranoid about accidentally creating an unbootable system.
As for partitions:
Code:
#fdisk /dev/hda
Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 14531 116720226 83 Linux
/dev/hda2 14532 14593 498015 f W95 Ext'd (LBA)
/dev/hda5 14532 14593 497983+ 82 Linux swap
Hmm, never noticed that stupid Windows partition was there. After I finish the task at hand I shall destroy it and double my swap space So yes my /boot director is on /dev/hda1. I have no idea what initrd is, much less whether my kernel requires it or not.
Now I'm kinda like hmm what do I do? I want to know why grub is not installed but is still booting my system... And yes, my /boot/grub directory is still intact.
Don't destroy that partition. Look at the start and end cylenders. Its the same thing. What you have there is one primary partition (your root) and an extended partition with one logical drive in it (your swap)
By installing the lilo package, you haven't installed it to the mbr. You'll have to configure it and install it to the mbr. Before you go and do anything like that, can you post the contents of your /boot directory? Also, the contents of your /boot/grub/menu.lst file (the kernel stanzas are what I really want to see)
And, have you compiled in support for your particular filesystem or is it a module? Can't be a module. So, if your partition is Reiserfs, you'd be sure that under the filesystems section of the kernel config, you'd enable reiserfs as a built-in.
What does your /etc/fstab file say?
Last edited by vectordrake; 07-13-2004 at 12:05 AM.
That's a good one. Was grub installed in some other manner than apt-get or dpkg?
initrd is a ramdisk the the kernel uncompresses itself to during startup, you need it.
You could try this but you may not be able to boot your system afterwards, well you would need a cd or floppy.
apt-get install grub
dpkg --purge grub
dpkg --purge lilo
apt-get install lilo
lilo
reboot
If you can't boot after this put in your 1st debian cd and at the prompt type 'rescue root=/dev/hda1'
There's a lilo configurator in /sbin, is there not? Its been a while since I did anything with Debian, but I remember running that thing. Something like /sbin/lilo-config
Hmm, interesting. GRUB was installed with apt-get (I think). I don't remember specifically installing it (I wanted lilo in the first place...), so I think it just came with my Debian install (sarge net-based CD install). I think my filesystem is ext2? I want it to be ext3 though, but I'm not sure. I'm compiling support for both, plus some other FS. I did notice that ext3 was compiled as a module...hmm maybe I should re-compile again and see. Yes there is a /sbin/lilo and I've ran it already, but to no avail. Anyways here's the information you requested, thanks for your help
tyler@localhost:/dev$ cat /boot/grub/menu.lst
# 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 2.4.25-1-386
root (hd0,0)
kernel /boot/vmlinuz-2.4.25-1-386 root=/dev/hda1 ro
initrd /boot/initrd.img-2.4.25-1-386
savedefault
boot
title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /boot/vmlinuz-2.6.6 root=/dev/hda1 ro
savedefault
boot
title Debian GNU/Linux, kernel 2.6.6 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.6 root=/dev/hda1 ro single
savedefault
boot
title Debian GNU/Linux, kernel 2.4.25-1-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.25-1-386 root=/dev/hda1 ro single
initrd /boot/initrd.img-2.4.25-1-386
savedefault
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
According to you /etc/fstab , your root filesystem is EXT3, so you got your way
Your menu.lst seems in order.
The only thing that may be wrong is that the kernel either has filesystem support for something you don't have or not support for something you do have. If you read your config-2.4.25-1-386 file, you'll see what was enabled to get your machine to boot under 2.4. There are a few differences, but for the most part, the configs are somewhat similar (more of a reorganization of many things, really).See what filesystems are included in the kernel. You may want to try and recompile without vfs support. Be sure that ext2 (second filesystem) and ext3 support are compiled in. Don't forget /proc support. I don't think its a bootloader problem you have.
Success! The kernel compiled and ran without complaining! Thank you vectordrake!!!
....but wait what is this? I am unable to startx for it gives me the following:
Code:
Fatal server error: cannot esatblish any listening sockets. Make sure an x server isn't already running
I'm pretty sure an x server isn't already running. Noo what happened? X works fine with my older kernel still, and I'm pretty sure I didn't take out any options in my kernel configuration that were needed by my system. Any clues on what is wrong? By the way I have Gnome Display Manager and X Display Manager both installed but gdm runs and xdm doesn't. Is that alright? Thanks for any help. I'm one step away from victory now!
I had the problem you initially had, and was able to get it working by disabling Advanced Partitioning, and including EXT3 in the kernel instead of in a module.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.