Slackware This Forum is for the discussion of Slackware 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
05-23-2006, 06:38 AM
|
#1
|
Member
Registered: Sep 2003
Distribution: Arch
Posts: 89
Rep:
|
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
|
|
|
05-23-2006, 07:01 AM
|
#2
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
i don't think you need to start from scratch. just use your old config and make ammendments to your kernel.
|
|
|
05-23-2006, 01:30 PM
|
#3
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
05-23-2006, 06:21 PM
|
#4
|
Member
Registered: Sep 2003
Distribution: Arch
Posts: 89
Original Poster
Rep:
|
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.
|
|
|
05-24-2006, 12:39 AM
|
#5
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
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.
|
|
|
05-24-2006, 05:58 AM
|
#6
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
05-24-2006, 06:19 AM
|
#7
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
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.
|
|
|
05-24-2006, 07:00 AM
|
#8
|
Member
Registered: Sep 2003
Distribution: Arch
Posts: 89
Original Poster
Rep:
|
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.
|
|
|
05-24-2006, 07:15 AM
|
#9
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
05-24-2006, 07:27 AM
|
#10
|
Member
Registered: Sep 2003
Distribution: Arch
Posts: 89
Original Poster
Rep:
|
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
|
|
|
05-24-2006, 07:56 AM
|
#11
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
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.
|
|
|
05-24-2006, 07:57 AM
|
#12
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
05-24-2006, 08:03 AM
|
#13
|
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300
Rep:
|
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...>
|
|
|
05-24-2006, 08:07 AM
|
#14
|
Member
Registered: Sep 2003
Distribution: Arch
Posts: 89
Original Poster
Rep:
|
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?
|
|
|
05-24-2006, 08:13 AM
|
#15
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|