LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-16-2001, 10:38 PM   #1
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
Kernel Reconfiguration Troubles


Hey all,

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.

Many thanks in advance!
 
Old 08-17-2001, 12:31 AM   #2
r3b00t
Member
 
Registered: May 2001
Distribution: OpenBSD 3.0-beta
Posts: 50

Rep: Reputation: 15
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...
 
Old 08-17-2001, 03:35 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Re: Kernel Reconfiguration Troubles

Quote:
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.

HTH

Jamie...
 
Old 08-17-2001, 07:51 PM   #4
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Original Poster
Rep: Reputation: 30
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?
 
Old 08-20-2001, 04:32 AM   #5
r3b00t
Member
 
Registered: May 2001
Distribution: OpenBSD 3.0-beta
Posts: 50

Rep: Reputation: 15
**ln -s linux-2.4.9 linux**

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

Hope this suits your need for information,

r3b00t
 
Old 08-20-2001, 12:38 PM   #6
bobthebat
Member
 
Registered: Apr 2001
Location: Portland, OR
Distribution: Slackware 8
Posts: 82

Rep: Reputation: 15
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.
 
Old 08-20-2001, 01:06 PM   #7
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Original Poster
Rep: Reputation: 30
Cool. Thanks for the clarification - I'll give this a shot.
Kick it.
 
Old 10-10-2001, 04:21 PM   #8
bkraptor
LQ Newbie
 
Registered: Oct 2001
Location: Romania
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
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.
 
Old 10-10-2001, 04:37 PM   #9
r3b00t
Member
 
Registered: May 2001
Distribution: OpenBSD 3.0-beta
Posts: 50

Rep: Reputation: 15
Read The Fine Manual

Some posibilities:

man depmod
search the internet
/usr/src/linux/Documentation/*
 
Old 10-10-2001, 09:27 PM   #10
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
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.
 
Old 10-11-2001, 03:16 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
depmod version 2.4.2


If no arguments (except options) are given, "depmod -a" is assumed

depmod will output a dependancy list suitable for the modprobe utility.

depmod -a will find the list of modules to probe from the file
/etc/modules.conf.

It will output the result into the depfile specified in this configuration file

depmod -A is the same as depmod -a, but will first compare the timestamps of the files involved to see if the depfile needs updating.

Normally depmod operates silently, reporting only the list of modules that
won't load properly (missing symbols).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with grub reconfiguration corelover Linux - Software 4 05-04-2005 05:26 PM
Network reconfiguration Sarcha Linux - Networking 0 02-17-2005 03:17 PM
manual network reconfiguration at restart zby Debian 6 07-02-2004 04:37 AM
Hardware updates and reconfiguration bussell Linux - General 1 08-21-2002 07:30 PM
Monitor 17inch Video reconfiguration Maurice Arthur Linux - Software 1 07-17-2001 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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