LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error when compiling kernel in rh9 (https://www.linuxquestions.org/questions/linux-newbie-8/error-when-compiling-kernel-in-rh9-53371/)

rezza 04-04-2003 07:16 AM

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?

loke137 04-04-2003 08:09 AM

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 :)

rezza 04-04-2003 08:21 AM

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.

loke137 04-04-2003 08:27 AM

hum...last night I also heard about a problem with no rule for make on RH9. I dont know what it is.

rezza 04-04-2003 04:43 PM

never mind... i got it sorted out. thanks for the help, loke137.

kirkegard 07-10-2003 05:11 PM

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.

rezza 07-10-2003 05:20 PM

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

kirkegard 07-10-2003 07:07 PM

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.


All times are GMT -5. The time now is 12:03 AM.