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 10-13-2006, 08:49 AM   #1
gigi1234
LQ Newbie
 
Registered: Jan 2006
Location: Sturgeon Bay, WI
Distribution: Ubuntu, DSL, Debian
Posts: 29

Rep: Reputation: 15
Sarge on laptop, migrate from 2.4 to 2.6 kernel


I installed Sarge on an old laptop(Pentium 1). Because I can only boot from a floppy I could only install with the default 2.4.27 kernel. The "linux26" option is not recognized at the boot prompt.

I want to try 2.6 kernel because I am experiencing some hardware detection issues (sound card and cdrom).

I have tried using apt to install a new kernel image:
Code:
apt-get install kernel-image-2.6.8-3-386
But when I try to boot using this kernel it fails right away.
Also, doing this breaks my other kernel and it won't boot either.

I had to completely reinstall to fix things.

I have tried reading some of the howtos but can't seem to find a simple and current explanation of how to change to a different kernel.

Any advice would be appreciated.
 
Old 10-13-2006, 11:11 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
What error do you get when it fails?

I would try installing the base system (just text, no gui or anything) using the 2.4.27 kernel. Then try aptitude install kernel-image-2.6. Go to /etc/defaults/ and edit bootlogd to enable the boot logger. Then edit /boot/grub/menu.lst and make sure the old kernel is specified and not symlinked (/boot/vmlinuz-2.6-3-386 or whatever instead of /vmlinuz, same for the initrd). This should leave you a working kernel, I believe.

Your other option is to compile your own kernel. aptitude install kernel-source-2.6 kernel-package build-essential Follow this guide and remember to compile in your chipset (use lsmod to find it) and your root filesystem type (probably ext3).
 
Old 10-13-2006, 12:30 PM   #3
gigi1234
LQ Newbie
 
Registered: Jan 2006
Location: Sturgeon Bay, WI
Distribution: Ubuntu, DSL, Debian
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks!

Quote:
Go to /etc/defaults/ and edit bootlogd to enable the boot logger. Then edit /boot/grub/menu.lst and make sure the old kernel is specified and not symlinked (/boot/vmlinuz-2.6-3-386 or whatever instead of /vmlinuz, same for the initrd).
Okay, but I am not sure I really understand these instructions. How do I edit bootlogd? What do I want to add or remove? What does it mean to be symlinked?

Do I have to start from a fresh install with no GUI? I have already added that and don't really want to start all over.

I don't know if I want to tackle compiling a kernel-might be beyond my skills.
 
Old 10-13-2006, 12:41 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Sorry, I wasn't very clear. Okay, you edit bootlogd by opening a text editor as root. From a command line you type su to become root and then nano /etc/default/bootlogd. It should contain a line like
Code:
BOOTLOGD_ENABLE=No
Change the No to Yes, hit Ctrl-X and then "Y" to save the changes.

You can do it with a gui, I just thought that if it screwed up your old kernel last time that you might want to do it on a minimal system.

Anyway, before you install the new kernel from the repositories, post your /boot/grub/menu.lst here and I'll help you fix it so you should be able to get back to your 2.4 kernel.
 
Old 10-13-2006, 02:44 PM   #5
gigi1234
LQ Newbie
 
Registered: Jan 2006
Location: Sturgeon Bay, WI
Distribution: Ubuntu, DSL, Debian
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks! I am a semi-noob. I have never messed around with kernels before so I am a little lost.

How do I know exactly which kernel will work? Do I just ask for 2.6 or should it be more specific?

When I have used apt-get to install a new kernel image it has not worked. When I try to boot it will end at "boot" with a flashing line.

Here is the /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 options 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 noapic nolapic

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

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.4.27-3-586tsc
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-3-586tsc root=/dev/hda1 ro noapic nolapic
initrd /boot/initrd.img-2.4.27-3-586tsc
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-3-586tsc (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.4.27-3-586tsc root=/dev/hda1 ro noapic nolapic single
initrd /boot/initrd.img-2.4.27-3-586tsc
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 10-13-2006, 03:20 PM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Okay, I would go ahead and install the 2.6 kernel (aptitude install kernel-image-2.6-386 will give you the most generic Pentium 2.6.8 kernel available from the debian repositories).

After it installs, edit your /boot/grub/menu.lst and make sure the following sections exist at the end (leave the ones you posted above alone)
Code:
title Debian GNU/Linux, kernel 2.4.27-3-586tsc
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-3-386 root=/dev/hda1 ro noapic nolapic
initrd /boot/initrd.img-2.6.8-3-386
savedefault
boot

title Debian GNU/Linux, kernel 2.4.27-3-586tsc (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-3-386 root=/dev/hda1 ro noapic nolapic single
initrd /boot/initrd.img-2.6.8-3-386
savedefault
boot
That should do the trick, I think. If you have trouble booting into the regular mode, try "recovery mode" and see if the kernel at least loads. Let me know of any errors in /var/log/boot or that you can jot down from the screen.
 
Old 10-13-2006, 06:50 PM   #7
gigi1234
LQ Newbie
 
Registered: Jan 2006
Location: Sturgeon Bay, WI
Distribution: Ubuntu, DSL, Debian
Posts: 29

Original Poster
Rep: Reputation: 15
Okay, I have installed kernel-image-2.6-386. I checked the menu.lst file and at the end were the comments you said should be there.

Upon trying to boot, GRUB shows both kernels.

If I choose the 2.6 I get:

Booting 'Debian GNU/Linux, kernel 2.6.8-3-386'

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.8-3-386 root=/dev/hda1 ro noapic nolapic
[Linux-bzImage, setup=0x1400, size=0x10af08]
initrd /boot/initrd.img-2.6.8-3-386
[Linux-initrd @ 0x23d8000, 0x418000 bytes]
savedefault
boot

...and that's it! This is just what happened before.

The same thing occurs if I choose this kernel in recovery mode.

The old kernel stills boot up okay. Also, I did enable the bootlogger. What does this do? Does it create a log somewhere?

What else can I try? Thanks for your help!
 
Old 10-13-2006, 06:54 PM   #8
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Quote:
Originally Posted by gigi1234
The old kernel stills boot up okay. Also, I did enable the bootlogger. What does this do? Does it create a log somewhere?
The log should be /var/log/boot. That's the first place I would look. Let me google a bit to see if I can find anything like your problem...
 
Old 10-13-2006, 07:11 PM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
It seems from a little googling that the stock debian 2.6 kernels won't run on a pentium classic (which is what your 2.4.27-3-586tsc kernel implies). Looks like your best option if you want to try a 2.6 kernel is to compile your own.

Not to discourage you from doing a compile, but I doubt a 2.6 kernel is going to give you anything special on this old of a machine. A lot of new kernels simply have an increased hardware database and code to support features in that newer hardware.

Honestly, at this point, I would try a recompile just to learn something if you have the time. Just be sure to follow the link I posted above about how to do it the "Debian Way". Basically you'll end up creating a *.deb file that you can just install and remove as if it was any other program. When you go through the make xconfig to configure your kernel, just be sure to select under processors "Pentium Classic -- 586tsc". Also be sure to include your chipset and filesystem (if you post the output of lsmod and fdisk -l, I can help you figure that out).

To run through the configuration will probably take you an hour or so of selecting hardware and stuff, then let it compile the kernel, which will probably take overnight on that old of a machine (or at least 3-4 hours).

Last edited by pljvaldez; 10-13-2006 at 07:13 PM.
 
Old 10-13-2006, 08:15 PM   #10
gigi1234
LQ Newbie
 
Registered: Jan 2006
Location: Sturgeon Bay, WI
Distribution: Ubuntu, DSL, Debian
Posts: 29

Original Poster
Rep: Reputation: 15
Okay, sounds good. The main reason I am fooling around with it anyway is that it forces me to learn something! This is not my primary laptop. I am just trying to have some fun.

Mostly I just wish I could get the soundcard to work (ISA type es1688). For some reason it just won't work even though it is supposedly supported.

But maybe a different kernel wouldn't help because I had another laptop with the same card that I installed Ubuntu Dapper on and it wouldn't recognize the card either.

Thanks a bunch for all your helpful suggestions.

I may try the compile when I get brave enough and have the time.

Do you think just re-compiling a 2.4 kernel might help with the hardware detection?
 
Old 10-13-2006, 08:24 PM   #11
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You can certainly try re-compiling the 2.4 kernel. If you decide to do that, after you install the kernel-source-2.4 and untar it in /usr/src. Go into the directory and then cp /boot/config-2.4.27-3-586tsc /usr/src/linux/.config then make oldconfig. This will setup the kernel exactly the same as your current kernel so you can start from a working system and see if you can find the sound driver you need in the kernel source.
 
  


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
ipw2200 compilation errors kernel Debian Sarge 2.6.8 IBM T42 Laptop nacnud Linux - Laptop and Netbook 2 03-18-2006 01:29 PM
migrate from suse, what should i migrate to? any suggestions?:twocents: Siljrath Linux - General 4 12-26-2005 01:14 PM
Compaq Laptop - Kernel 2.6 - Debian Sarge WolfCub Linux - Hardware 5 10-22-2005 12:12 PM
migrate to a newer kernel alaios Linux - General 6 06-12-2005 05:26 PM
How to migrate to the new 2.6 kernel linksocc Linux - Software 3 10-15-2003 02:42 PM

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

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