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 have a question regarding kernel compiling/config that may be attacked from a couple of directions.
First: I have RH 7.1 installed, the default kernel installs without support for reading NTFS filesystem. What is the quickest way to add NTFS support to the kernel, and can the response include a sort of step-by-step format, with a little explanation? Sorry so specific, but I thought I had it figured out and guess I don't.
The other question I have is..
The process I had read to upgrade the kernel (compile, config, and boot) was:
a.) D/L the source tarball and extract, untar etc.
b.) Enter the directory and run the following commands:
1.) make menuconfig (running in BASH)
2.) make dep
3.) make modules
4.) make modules-install
5.) make bzImage
c.) After running the above, I have a bzImage file in .../arch/i386/boot, which I copied to /boot with the filename "vmlinuz-new". I put a pointer to the new kernel image in lilo.conf and ran #/sbin/lilo to load the settings. I then copied the new kernel directory to /usr/src/linux...
and tried to boot.. the kernel image loads, but most (or all?) of my modules don't load. Luckily I am knowledgeable enough to keep my old kernel install around so I can still boot it.
I think part of it is not knowing which kernel features i needed to modularize (sound, etc.) and possibly not knowing how to get the modules to load. I didn't know a lot about the h/w in the computer (it's a work box, I didn't build it, and didn't take time to find this out beforehand. My fault.)
On my home system though, I do know which hardware I have, but don't recognize a lot of the options in the kernel.
Can someone give me a brief but effective tutorial on getting a new kernel version going (i.e., some have told me i need to run "make install" in the folder, some have said no?) and how exactly to manage the proper loading of the modules afterwards? I am fairly green on the "make" commands, and their purpose, and about loading modules. I don't really get how to load them with modprobe or insmod, either.
cd /usr/src
rm -rf linux
wget ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.9.tar.bz2
tar xvIf linux-2.4.9.tar.bz2
mv linux linux-2.4.9
ln -s linux-2.4.9 linux
cd linux
make menuconfig
make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.9
cp System.map /boot/System.map-2.4.9
vi /etc/lilo.conf
<< Now insert the lines for this kernel
/sbin/lilo -v
sync;sync;sync;reboot
Remember to read /usr/src/linux/Documentation/Changes to see what requirements are needed (most notibly you'll need the latest modutils...)
Once you're booted into the new kernel, do a depmod -a and you should be set...
Originally posted by sancho5 Can someone give me a brief but effective tutorial on getting a new kernel version going (i.e., some have told me i need to run "make install" in the folder, some have said no?) and how exactly to manage the proper loading of the modules afterwards?
Have a look at the Kernel HOWTO it should explain all.
Thanks for your useful replies. I have read the kernel how-to, but find it assumes more familiarity with kernel config than I currently have.
A question about this response, though:
======================================
You can cut&paste this, I guess...
cd /usr/src
rm -rf linux
wget ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.9.tar.bz2
tar xvIf linux-2.4.9.tar.bz2
mv linux linux-2.4.9
**ln -s linux-2.4.9 linux**
cd linux
make menuconfig
make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.9
**cp System.map /boot/System.map-2.4.9**
vi /etc/lilo.conf
<< Now insert the lines for this kernel
**/sbin/lilo -v **
**sync;sync;sync;reboot **
Remember to read /usr/src/linux/Documentation/Changes to see what requirements are needed (most notibly you'll need the latest modutils...)
**Once you're booted into the new kernel, do a depmod -a and you should be set...**
===========================================
I did want to inquire about the parts I have **surrounded** in asterisks. I'm not sure what those commands do, and would like to.
the other issue is the one on making sure modules load properly at startup. When I run:
#make modules
#make modules_install
does that place the proper modules in /lib/modules and they can then be loaded as needed? I'm a wee bit confused on that.
The other question was not on a complete recompilation of new kernel code, but how to add NTFS support to the current kernel, without having to redo the entire thing. Can I get a quick run thru on that?
This is a trick I use to manage my kernel sources. I have different kernels installed in /usr/src/linux-x.y.z (x.y.z == kernel version) but since you need the includes from /usr/src/linux/include when you want to compile software, I make a symbolic link (ln -s) from my current kernel to /usr/src/linux eg:
r3boot@lacrima:/usr/src$ ls -la
total 1091
drwxr-xr-x 12 root root 456 Aug 20 08:28 .
drwxr-xr-x 19 root root 640 Aug 18 15:33 ..
drwxr-xr-x 3 r3boot users 96 May 14 19:34 NVIDIA_GLX-1.0-1251
drwxr-xr-x 2 r3boot users 560 Aug 8 23:09 NVIDIA_kernel-1.0-1251
drwxr-xr-x 6 root root 192 Aug 10 22:21 apps
drwxr-xr-x 3 root root 600 Aug 17 16:19 kernel
drwxr-xr-x 4 root root 528 Aug 8 13:25 lamp
lrwxrwxrwx 1 root root 16 Aug 20 08:28 linux -> linux-2.4.9-work
drwxr-xr-x 14 root root 560 Jul 31 01:22 linux-2.4.5-rock
drwxr-xr-x 14 1046 101 720 Aug 15 22:55 linux-2.4.8-home
drwxr-xr-x 14 1046 101 720 Aug 14 07:21 linux-2.4.8-work
drwxr-xr-x 14 1046 101 720 Aug 17 22:07 linux-2.4.9-home
drwxr-xr-x 14 1046 101 752 Aug 20 10:31 linux-2.4.9-work
-rw-r--r-- 1 root root 453001 Aug 3 11:37 ngpt-1.0.1.tar.gz
-rw-r--r-- 1 root root 647900 Feb 7 2001 pth-1.5.4.tar.gz
r3boot@lacrima:/usr/src$
(Please note where the Linux link is pointing to ... )
**cp System.map /boot/System.map-2.4.9**
This line copies the System.map file in place. Although the kernel will boot up perfectly without this file, it's good practice(tm) to copy this file in place.
**/sbin/lilo -v **
You should (the good practice(tm)) run lilo as root with the absolute path. This will run lilo in verbose mode, so you can see what's going on. Omit the -v to see the normal lilo output.
**sync;sync;sync;reboot **
hehehe, sync flushes your buffers to harddisk (to prevent data loss in case of a crash) after which you reboot to load yer new kernel.
When you've ran make modules and make modules_install, your modules will be installed into /lib/modules/<kernel version>
And the question about ntfs. It's possible if you build ntfs as a module. Do the make {menuconfig|xconfig} thingie, and select ntfs as a module. Now do a make modules and make modules_install followed by a depmod -a and you should be able to modprobe ntfs. It's recomended to make bzImage too though ...
Every time I've compiled the kernel, I run make modules and make modules_install after make bzImage. I doubt this is the proglem, but if all else fails perhaps try it.
So what does that depmod -a do ?
And where do I find a detailed tutorial that explains all the options I can choose ?
And why do I get the message that my kernel doesn't have modular sound enabeled ? I'm sure I enabeled it before compiling.
From the kernel howto,
make <whatever>config
make dep
make clean*
make bzImage
make modules
make modules_install
*skipping this step might be the cause of the problems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.