Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I am trying to compile the kernel 2.4.22 on my local workstation for testing purposes before used it on production server.
I have tried go to /usr/src and there is no file at this directory.Usually I upgrade the kernel using rpm packages which I downloaded it from Redhat Network.
Can I straight away compile the kernel without going through the steps :
cd /usr/src
**"Change Directory To /usr/src"**
ls -alc
**"check for symlink (ex. /usr/src/linux->/usr/src/linux-2.4.18)"**
file linux
**"double check with this command (output ex.) linux: symbolic link to linux-2.4.18-14"**
rm linux
**"remove symlink"**
tar -zxvf linux-x.x.x.tar.gz
**"unpack the tarball (new kernel)"**
ln -s /usr/src/linux-x.x.x /usr/src/linux
**"make a new link to the new kernel"**
cd linux
**"type this to change to the directory"**
well your going to need the kernel source to recompile the kernel there is no question about that...so if there is nothing in /usr/src then you will have to go get the source....if you wanted to just recompile the kernel you are currently using then you don't have to go to that site and do all that stuff, because you mentioned redhat and the kernel source is on the distros cd's...you can always type :: redhat-config-packages and install it that way, or manually find it on your cds ....
but if you want to put a newer kernel on your box, then yes you will have to go and do them steps...unless you get an rpm package somewheres with the kernel source, then you may be able to knock off a couple of steps, but again basically you are going to have to do that....
Note : save a file ".config" in /usr/src/linux-x.xx if u want to keep old configuration. If u understand much your configuration u will be able to set up your own kernal configration
I have installed the kernel source and compiled the kernel 2.4.22 on my RH 8.0.
I have reach finished the process but when I reboot the box, I was not able to boot the box and getting the kernel panic error message :
VFS : Cannot open root device : LABEL=/dev/hdb6 or 00:00
Please append a correct "root" boot option
Kernel Panic : VFS : Unable to mount root fs on 00:00
My grub.conf file as follow :
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdb6
# initrd /initrd-version.img
#boot=/dev/hdb
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.22)
root (hd0,0)
kernel /vmlinuz-2.4.22 ro root=LABEL=/dev/hdb6
initrd /initrd-2.4.22.img
title Red Hat Linux (2.4.20-20.8)
root (hd0,0)
kernel /vmlinuz-2.4.20-20.8 ro root=LABEL=/
initrd /initrd-2.4.20-20.8.img
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
I have tried changed the root boot option to root=/dev/hdb6 but the getting the same output.
maybe its because you are using the label to point to the actual partition that root is located (i assume thats what /dev/hdb6 is) rather than just saying :: root=LABEL=/
or did you try that?
Perhaps iptables or your kernel need to be upgraded
iptables v1.2.8 : can't initialize iptables table 'filter' : iptables who?( do you need to insmod?)
Running ifconfig eth0 returns the below error message :
eth0:error fetching interface info : Device not found.
just look in your /etc/modules.conf file and comment out the line thats trying to load that...to comment out something you put a # in front of the line...so for example something like ::
#alias whateverTHEmoduleIS
k i was just looking at the file : /usr/src/linux/Documentation/Configure.help
and this comes from it::
Quote:
Unix domain sockets
CONFIG_UNIX
If you say Y here, you will include support for Unix domain sockets;
sockets are the standard Unix mechanism for establishing and
accessing network connections. Many commonly used programs such as
the X Window system and syslog use these sockets even if your
machine is not connected to any network. Unless you are working on
an embedded system or something similar, you therefore definitely
want to say Y here.
However, the socket support is also available as a module ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read <fileocumentation/modules.txt>. The module will be
called unix.o. If you try building this as a module and you have
said Y to "Kernel module loader support" above, be sure to add
'alias net-pf-1 unix' to your /etc/modules.conf file. Note that
several important services won't work correctly if you say M here
and then neglect to load the module.
so it looks like you selected that when you compiled your kernel, so in turn, the last thing i can think of without having to recompile again is to insert this into your /etc/modules.conf. alias net-pf-1 off
best of luck!
I had the same problem as yours. So i had to reinstall RH.
Then,
save a file ".config" in /usr/src/linux-x.x.x to other place
make mrproper
copy .config to /usr/src/linux-x.x.x (n your new kernel)
make menuconfig (if u want to change some thing in configuration, but note that u have to know much about kernel configuration)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.