LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-23-2006, 06:38 AM   #1
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Rep: Reputation: 15
Can i 'patch' the kernel?


Hi,

I need to enable up to 4gb ram support in slackware 10.2, i already have the 2.6kernel installed, but its only detected 1gb of my 2gb ram, i would also like to enable dual core support if it is not running already.

Is there anyway i can mod this into the current kernel without going through the hasle of compling a new one from scratch?

Thanks
Jack
 
Old 05-23-2006, 07:01 AM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
i don't think you need to start from scratch. just use your old config and make ammendments to your kernel.
 
Old 05-23-2006, 01:30 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116
I wrote a short Wiki page on compiling a 2.6 kernel here: http://alien.slackbook.org/dokuwiki/...kernelbuilding - and mention enabling the 4GB option, too.

You need to recompile your kernel, but as prozac already said, it can be kickstarted by using the Slackware kernel .config file, so that all defaults are already set when you run "make xconfig".

Eric
 
Old 05-23-2006, 06:21 PM   #4
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Original Poster
Rep: Reputation: 15
Thanks for that, right i compiled a new kernel, and added it to lilo, when i boot and select it i get:

VFS: Cannot open root device "802" or unknown-block (8,2)
Please append a correct "root=" boot option
Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2)

Am i correct in thinking this is a problem with lilo? Im fairly sure its configured correctly here it is:

Code:
# LILO configuration file
boot = /dev/sda
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset

vga = normal

default=Linux

other = /dev/sda1
	label="Windows"
  table = /dev/sda
# Windows bootable partition config ends

# Linux bootable partition config begins
image="/dev/sda1"

image="/dev/sda1"
	root="/dev/sda2"

image="/boot/vmlinuz"
	root="/dev/sda2"
	label="Linux"
  read-only

image=/boot/vm-linuz-2.6.16.18
	label=newkernel
	root=/dev/sda2
read-only
# Linux bootable partition config ends
If it helps the lilo gui in kde says its an invalid config the kernel image file is definatly /boot/vm-linuz-2.6.16.18

EDIT: I did include the correct file systems in the kernel.

Any ideas on what ive done wrong?

Last edited by tntcoder; 05-23-2006 at 06:25 PM.
 
Old 05-24-2006, 12:39 AM   #5
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
# Linux bootable partition config begins
image="/dev/sda1"

image="/dev/sda1"
root="/dev/sda2"
what are these? i think you should get rid of them
here's a sample lilo.conf file use it as reference:

Quote:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
#append="hdd=ide-scsi apm=power-off"
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 60
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
menu-title = " john.omega.com "
# 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
password = 7nationarmy
# Linux bootable partition config begins
image = /boot/vmlinuz-ide-2.6.16.5
root = /dev/hda2
label = Linux-2.6.16.5
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-ide-2.4.31
root = /dev/hda2
label = Linux
read-only
# Linux bootable partition config ends
note some lines i don't use i have commented out and lilo takes the first image entry as default. here's my Linux-2.6.16.5 is the default.

Last edited by prozac; 05-24-2006 at 12:41 AM.
 
Old 05-24-2006, 05:58 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116
Quote:
Originally Posted by tntcoder
VFS: Cannot open root device "802" or unknown-block (8,2)
Please append a correct "root=" boot option
Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2)
That would be an indication of the fact that the filesystem drivers for your boot partition are not included in the kernel but built as kernel modules (this is the way the Slackware 2.6 kernel is built nowadays). You will need to build an initrd that includes the drivers for your filesystem (jbd and ext3 if yours is a ext3 filesystem, or reiserfs in case you run reiser as your filesystem).

Boot the computer into an older working kernel, and then build an initrd for the new kernel:
Code:
mkinitrd -c -k 2.6.16.18 -m jbd:ext3
(the example assumes a 2.6.16.18 kernel), and then add a line "initrd = /boot/initrd.gz" to /etc/lilo.conf:
Code:
image=/boot/vm-linuz-2.6.16.18
  label=newkernel
  root=/dev/sda2
  initrd = /boot/initrd.gz
  read-only
and re-run lilo.

Or recompile the kernel and change the drivers jbd, ext3 and reiserfs from modules to built-ins.

Eric
 
Old 05-24-2006, 06:19 AM   #7
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
it could be very well like Alien-Bob said you should make all your neccessary filesystems modules as built-in and not modules. its pretty much clearly stated in kernel howto if i still remember.
 
Old 05-24-2006, 07:00 AM   #8
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Original Poster
Rep: Reputation: 15
Thanks for that, i was sure though that i said Y to the ext3 file system rather than M, but i will try this anyway.

Where exactly do i run the initrd command from? It cant seem find the said modules in the kernel build directory.

Also as prozac said i seem to have an irrelevent entry in lilo ive corrected this now.
 
Old 05-24-2006, 07:15 AM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116
Quote:
Originally Posted by tntcoder
Where exactly do i run the initrd command from? It cant seem find the said modules in the kernel build directory.
You have to run the mkinitrd command from the /boot directory, I forgot to add that. I updated my Wiki page with a paragraph on building an initrd as well: http://alien.slackbook.org/dokuwiki/...kernelbuilding

Eric
 
Old 05-24-2006, 07:27 AM   #10
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Original Poster
Rep: Reputation: 15
Sorry for being a complete noob here , but i cant seem to see a new paragraph regarding initrd on your wiki, i have hard refreshed to , by the way thanks very much for making that tutorial its really good.

I have ran the command from /boot in 2 versions, but i get:

Code:
root@tserver:/boot# mkinitrd -c -k 2.6.16.18 -m jbd:ext3
WARNING:  Could not find module for "jbd"
WARNING:  Could not find module for "ext3"

root@tserver:/boot# mkinitrd -c -k vm-linuz-2.6.16.18 -m jbd:ext3
find: /lib/modules/vm-linuz-2.6.16.18: No such file or directory
WARNING:  Could not find module for "jbd"
find: /lib/modules/vm-linuz-2.6.16.18: No such file or directory
WARNING:  Could not find module for "ext3"
Any ideas what im doing wrong :s
Code:
root@tserver:/boot# ls
README.initrd          config                   map
System.map             config-custom-2.6.16.18  vm-linuz-2.6.16.18
System.map-2.6.16.18   config-ide-2.4.31        vmlinuz
System.map-ide-2.4.31  diag1.img                vmlinuz-ide-2.4.31
boot.0800              initrd-tree
boot_message.txt       initrd.gz
Im not sure what that current initrd.gz is?

Thanks
Jack
 
Old 05-24-2006, 07:56 AM   #11
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
why don't you compile your kernel again, this time carefully watching what you check-in and what you check-out. saves you lot of trouble.
 
Old 05-24-2006, 07:57 AM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116Reputation: 8116
Oops sorry... the modified Wiki page is online now.

Regarding those errors about WARNING: Could not find module for "jbd", it looks like your jbd and ext3 drivers are not available as modules, i.e. you built them into your kernel. If you do have an ext3 filesystem on your root partition and still get kernel panics with this kernel, could it be that you are missing a SCSI or a SATA driver for your disk controller? I noticed you refer to "/dev/sda2" which indicates as much. You might have to create an initrd containing those missing modules, or add the appropriate scsi/sata driver(s) into your kernel.

Eric
 
Old 05-24-2006, 08:03 AM   #13
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Quote:
Could not find module for "ext3"
Did you remember to make modules_install when you compiled the kernel?

The lilo.conf you posted is seriously screwed up with entries that make no sense. Follow prozac's example.

For mkinitrd the command is mkinitrd -c -k <your kernel version> -m <your root filesystem type (reiserfs, ext3, etc...>
 
Old 05-24-2006, 08:07 AM   #14
tntcoder
Member
 
Registered: Sep 2003
Distribution: Arch
Posts: 89

Original Poster
Rep: Reputation: 15
Yes i did run the make modules_install, but as i said im pretty sure i said Yes to ext3 in the menu config rather than the module option, so maybe they never got made as modules :s I have fixed lilo now, do i need to start from scratch and build the file system is as modules or is there another way?
 
Old 05-24-2006, 08:13 AM   #15
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
kernel's are not something you compile and run everyday (unless you are a super geek). so it pays later when you build a kernel that suits your need perfectly instead of having to adjust everytime you reboot. so my suggestion would be to log back in using your old kernel. make a fresh compile giving due consideration to each and every option under make menuconfig and then reach for your lilo.conf for final adjustments. trust you will be a lot happier.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel Patch (Patch-2.6.13) ukez Linux - Hardware 4 08-30-2005 04:40 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 04:59 AM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 07:33 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 02:21 PM
YaST Online Update + AMD kernel patch = kernel panic THX1138 Linux - General 3 10-26-2003 05:25 PM

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

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

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