LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2003, 08:16 AM   #1
rezza
LQ Newbie
 
Registered: Apr 2003
Location: UK
Distribution: Gentoo, slack 9
Posts: 10

Rep: Reputation: 0
Error when compiling kernel in rh9


Hello all.

I have recently downloaded and installed redhat 9, and am currently trying to enable ntfs support in it, by recompiling the kernel so that ntfs support is built-in.

here's what i did:
Code:
cd /usr/src/linux-2.4
make menuconfig
here all i did was enable built-in ntfs (read only) support
Code:
make dep && make clean bzImage modules modules_install
cp /usr/src/linux-2.4/arch/i386/boot/bzImage /boot
unfortunately, my last make line gave me errors:

Code:
make[3]: *** No rule to make target `/usr/src/linux-2.4.20-8/drivers/pci/devlist.h', needed by `names.o'.  Stop.
make[3]: Leaving directory `/usr/src/linux-2.4.20-8/drivers/pci'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-8/drivers/pci'
make[1]: *** [_subdir_pci] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-8/drivers'
make: *** [_dir_drivers] Error 2
and the bzImage file was not written. what am i doing wrong here?
 
Old 04-04-2003, 09:09 AM   #2
loke137
Member
 
Registered: Feb 2003
Location: Brasil
Distribution: Debian Etch
Posts: 147

Rep: Reputation: 15
I think you might have a bad ISO. It seems that a file is missing, and I dont think they "forgot" to put it on the image
 
Old 04-04-2003, 09:21 AM   #3
rezza
LQ Newbie
 
Registered: Apr 2003
Location: UK
Distribution: Gentoo, slack 9
Posts: 10

Original Poster
Rep: Reputation: 0
Hmm... what gives you the idea that a file is missing?

anyway, i doubt its that, because the rh9 installer has a built-in cd-checker, which checks your cds integrity before install, and all 3 of mine passed.
 
Old 04-04-2003, 09:27 AM   #4
loke137
Member
 
Registered: Feb 2003
Location: Brasil
Distribution: Debian Etch
Posts: 147

Rep: Reputation: 15
hum...last night I also heard about a problem with no rule for make on RH9. I dont know what it is.
 
Old 04-04-2003, 05:43 PM   #5
rezza
LQ Newbie
 
Registered: Apr 2003
Location: UK
Distribution: Gentoo, slack 9
Posts: 10

Original Poster
Rep: Reputation: 0
never mind... i got it sorted out. thanks for the help, loke137.
 
Old 07-10-2003, 06:11 PM   #6
kirkegard
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
error resolved?

rezza, how did you solve this? i am getting the same error, and i cannot seem to figure out what the problem is.
 
Old 07-10-2003, 06:20 PM   #7
rezza
LQ Newbie
 
Registered: Apr 2003
Location: UK
Distribution: Gentoo, slack 9
Posts: 10

Original Poster
Rep: Reputation: 0
i eventually got this sorted by following these instructions somebody sent me... i think this was originally from http://www.getlinuxonline.com/

Quote:
Installing the kernel sources.

First check and see what kernel you are running. You must use the kernel source for the same kernel you are running.

[jimh@garfield jimh]$ uname -r
2.4.18-5

Check to see if you already have the kernel source installed with:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5
kernel-source-2.4.18-5

If you don't have the kernel-source installed you will see:

[jimh@garfield jimh]$ rpm -q kernel-source-2.4.18-5
package kernel-source-2.4.18-5 is not installed

If the kernel source is not installed, download the source from your favorite Red Hat mirror site. You will need to be logged in as root to install the kernel source. Install the kernel source with:

rpm -ivh kernel-source-2.4.18-5.i386.rpm

If you are registered with The Red Hat Network you can also use up2date to install the kernel. This will download and then install the kernel-source for you.

up2date kernel-source

Preparing the kernel source

Login as the root user.

Change to the /usr/src/linux-2.4.18-5 directory
[root@garfield root]# cd /usr/src/linux-2.4.18-5

"make mrproper"
[root@garfield linux-2.4]# make mrproper

"make xconfig"
[root@garfield linux-2.4]# make xconfig

Load the default Red Hat kernel config that was used to compile the kernel you have installed.

[root@garfield linux-2.4]# rpm -q --qf '%{ARCH}\n' kernel-2.4.18-5
athlon

Click "Load Configuration from file"

Side note: Red Hat did not ship an i586 uniprocessor kernel with 7.3. If you have a uniprocessor i586 system the command above will probably return i386. Use the i386.config if it does.

You can look in /usr/src/linux-2.4.18-5/configs to see what the default kernel configs Red Hat uses to compile their kernels.

[jimh@garfield jimh]$ ll /usr/src/linux-2.4.18-5/configs
total 564
-rw-r--r-- 1 root root 39830 May 2 14:36 kernel-2.4.18-athlon.config
-rw-r--r-- 1 root root 39858 May 2 14:36 kernel-2.4.18-athlon-smp.config
-rw-r--r-- 1 root root 49146 May 2 14:36 kernel-2.4.18-i386-BOOT.config
-rw-r--r-- 1 root root 40020 May 2 14:36 kernel-2.4.18-i386.config
-rw-r--r-- 1 root root 39960 May 2 14:36 kernel-2.4.18-i386-smp.config
-rw-r--r-- 1 root root 39957 May 2 14:36 kernel-2.4.18-i586.config
-rw-r--r-- 1 root root 39897 May 2 14:36 kernel-2.4.18-i586-smp.config
-rw-r--r-- 1 root root 40021 May 2 14:36 kernel-2.4.18-i686-bigmem.config
-rw-r--r-- 1 root root 39968 May 2 14:36 kernel-2.4.18-i686.config
-rw-r--r-- 1 root root 40414 May 2 14:36 kernel-2.4.18-i686-debug.config
-rw-r--r-- 1 root root 39966 May 2 14:36 kernel-2.4.18-i686-smp.config
-rw-r--r-- 1 root root 35944 May 2 14:36 kernel-2.4.18-i686-uml.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64.config
-rw-r--r-- 1 root root 40170 May 2 14:36 kernel-2.4.18-x86_64-smp.config

In the dialog box type the full path to the config file you want to use.
Example: /usr/src/linux-2.4.18-5/configs/kernel-2.4.18-i686.config

Click "Ok" to load the config and exit the dialog box.

Click "File Systems"
Scroll down and find "NTFS filesystem support (read only)"

Click "m" to build NTFS support as a module.

Click "Main Menu"

Click "Save & Exit"

An informational dialog box will popup telling you to run "make dep"
Click "Ok"

Open the toplevel Makefile in a text editor. This would be /usr/src/linux-2.4.18-5/Makefile
Look at the first four lines in the Makefile.

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 18
EXTRAVERSION = -5custom

Remove the word "custom" from the end of the EXTRAVERSION line.
Save the changes and exit

"make dep"
[root@garfield linux-2.4]# make dep


Compile the the ntfs module.

"make modules SUBDIRS=fs/ntfs"
[root@garfield linux-2.4]# make modules SUBDIRS=fs/ntfs


Create a directory for the ntfs module

mkdir /lib/modules/2.4.18-5/kernel/fs/ntfs


Copy the ntfs.o module to the directory you just created.

cp /usr/src/linux-2.4.18-5/fs/ntfs/ntfs.o /lib/modules/2.4.18-5/kernel/fs/ntfs


Set the permissions on the ntfs.o module to make sure they are correct.

chmod 0644 /lib/modules/2.4.18-5/kernel/fs/ntfs/ntfs.o


Update your modules.dep

/sbin/depmod -a


Thats it. You are now ready to use the new ntfs.o module.

Accessing your NTFS partitions

You will have to create a mount point and add an entry to /etc/fstab for the NTFS partitions you want to access.

There are many different options you can use to mount the partition depending upon your needs.

If you have a single user system or don't need to give others access to the partition, you can use this.
Replace "xxx" on uid and gid with your userid and group id.

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=xxx,gid=xxx,umask=007 0 0


You can find out what your userid and groupid is with:

$ cat /etc/passwd | grep username
username:x:500:500:realname:/home/username:/bin/bash

If you were using the above user, the /etc/fstab entry would be:

/dev/hdc2 /mnt/windows ntfs noauto,user,uid=500,gid=500,umask=007 0 0


Description of the options above.

noauto = Don't mount at boot

user = Allow an ordinary user to mount, but only the user who mounted it can unmount the drive.

uid = sets owner for the partition and the files on it.

gid = sets group for the partition and the files on it.

umask = sets the permissions on the partition.


The above mount options will not be correct for all situations. This is just an example.

For more information you should read the manpage for the "mount" command. This manpage explains the mount options available for the NTFS and other filesystems.
but i'm using gentoo these days anyway...
 
Old 07-10-2003, 08:07 PM   #8
kirkegard
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
thanks!

thanks for the quick reply! i'll try to work through those directions later on this week... gentoo is excellent, but I can't seem to get it working correctly on this pc that i am messing with. so i figured redhat had the most support availiable online.
 
  


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
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 05:17 AM
error after compiling kernel fietzbellen Slackware 2 02-26-2004 04:00 PM
Compiling 2.6 Kernel for stock rh9 pld Linux - Software 1 02-10-2004 11:43 AM
Error when compiling PHP 4.3.3 w/ MySQL on RH9 Shaolyen Linux - Software 1 10-21-2003 04:26 PM
error compiling kernel GJoz Linux - General 5 02-05-2003 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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