LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-12-2004, 08:44 PM   #1
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 547

Rep: Reputation: 30
Exclamation 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:

Code:
apt-get remove --purge grub
apt-get clean
apt-get update
apt-get install lilo
#/sbin/lilo
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?)
 
Old 07-12-2004, 08:59 PM   #2
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
What you do is up to you, but to install lilo just run:
apt-get remove grub
apt-get install lilo

I have never used grub, However I do run a 2.6.6 kernel ok.
OK, you talked me into it. Im gonna go install grub now. I hope something breaks.

Thomas
 
Old 07-12-2004, 09:38 PM   #3
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
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
 
Old 07-12-2004, 10:03 PM   #4
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
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...
 
Old 07-12-2004, 10:19 PM   #5
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 547

Original Poster
Rep: Reputation: 30
Quote:
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
 
Old 07-12-2004, 10:50 PM   #6
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-12-2004, 11:35 PM   #7
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 547

Original Poster
Rep: Reputation: 30
Code:
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.
 
Old 07-12-2004, 11:54 PM   #8
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-13-2004, 12:04 AM   #9
twsnnva
Member
 
Registered: Oct 2003
Location: Newport News, Va
Distribution: Debian
Posts: 246

Rep: Reputation: 30
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'
 
Old 07-13-2004, 12:11 AM   #10
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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
 
Old 07-13-2004, 12:33 AM   #11
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 547

Original Poster
Rep: Reputation: 30
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

Code:
tyler@localhost:/dev$ ls -l /boot
total 7460
-rw-r--r--    1 root     root       548511 Apr 14 10:39 System.map-2.4.25-1-386
-rw-r--r--    1 root     root       839657 Jul  6 12:46 System.map-2.6.6
-rw-r--r--    1 root     root          512 Jul  6 19:02 boot.0301
-rw-r--r--    1 root     root        44109 Apr 14 02:36 config-2.4.25-1-386
-rw-r--r--    1 root     root        46836 Jul  6 11:11 config-2.6.6
-rw-r--r--    1 root     root       153720 Jul  6 15:02 debianlilo.bmp
drwxr-xr-x    2 root     root         4096 Jul 10 18:51 grub
-rw-r--r--    1 root     root      3825664 Jun 23 14:24 initrd.img-2.4.25-1-386
-rw-------    1 root     root        97792 Jul  6 19:02 map
-rw-r--r--    1 root     root        23662 Jul  6 15:02 sarge.bmp
-rw-r--r--    1 root     root        24116 Jul  6 15:02 sid.bmp
-rw-r--r--    1 root     root       808860 Apr 14 10:39 vmlinuz-2.4.25-1-386
-rw-r--r--    1 root     root      1177744 Jul  6 12:46 vmlinuz-2.6.6
Code:
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
Code:
tyler@localhost:/dev$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda5       none            swap    sw              0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdd        /media/cdrom    iso9660 ro,user,noauto  0       0
/dev/fd0        /mnt/floppy     auto    user,noauto,exec 0       0
/dev/cdrom      /mnt/cdrom      iso9660 ro,user,noauto,exec 0        1
/dev/hdd        /cdrom      iso9660 ro,user,noauto  0       0

Last edited by R00ts; 07-13-2004 at 12:35 AM.
 
Old 07-13-2004, 01:43 AM   #12
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-13-2004, 07:11 PM   #13
R00ts
Member
 
Registered: Mar 2004
Location: Austin TX, USA
Distribution: Ubuntu 11.10, Fedora 16
Posts: 547

Original Poster
Rep: Reputation: 30
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!
 
Old 07-13-2004, 08:23 PM   #14
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Quote:
Originally posted by twsnnva
That's a good one. Was grub installed in some other manner than apt-get or dpkg?
Sarge installs grub by default. The debian-installer is totally the opposite of what you'd expect for a Debian install.

Last edited by vectordrake; 07-13-2004 at 08:29 PM.
 
Old 07-14-2004, 11:10 AM   #15
E Pierce
LQ Newbie
 
Registered: Jul 2004
Posts: 13

Rep: Reputation: 0
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.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Disc Imaging Backup Solutions For Kernel 2.6+ ethanhallbeyer Linux - Software 1 11-16-2005 08:36 AM
Kernel Upgrade Problem. Rexversusu Debian 4 09-23-2004 05:43 PM
Problem when upgrade to kernel 2.4.24 little_ball Slackware 19 01-08-2004 06:43 PM
Kernel upgrade problem samble Linux - General 2 11-06-2003 11:07 AM
10 Problem Areas and Solutions in Linux jt1020 Linux - General 5 05-09-2003 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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