LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-23-2004, 11:47 PM   #1
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Rep: Reputation: 15
Enable Kernel Modules


I'm trying to mount an external usb hard drive that is formatted as a Mac extendd drive. I have a kernel module that is supposed to enable it but I cant get it loaded. Everytime i try to make it i get this error

Code:
curt@linux:/windows/c/hfsplus-20040216/hfsplus> make KERNELSRC=/usr/src/linux-2.4.21-149
make modules -C /usr/src/linux-2.4.21-149 SUBDIRS=$PWD CONFIG_HFSPLUS_FS=m
make[1]: Entering directory `/usr/src/linux-2.4.21-149'

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[1]: *** [modules] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.21-149'
make: *** [all] Error 2
curt@linux:/windows/c/hfsplus-20040216/hfsplus>
I'm running SuSe 9.0 + 2.4.21 kernel
 
Old 04-24-2004, 12:33 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Did you build your own kernel?
 
Old 04-24-2004, 01:50 AM   #3
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
type "make menuconfig" first, then enable loadable modules, then compile and install the kernel, then retry that, or just use make menuconfig, to enable module support and build the module you want
 
Old 04-24-2004, 08:51 AM   #4
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
adz, I didn't build my own kernel. I let SuSe do it for me.

SciYro, is there anything special I should know about "Make menuconfige" usage? when I type it it says

make: *** No rule to make target `menuconfig'. Stop.
 
Old 04-24-2004, 02:12 PM   #5
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
Since you are using a stock kernel, I am guessing you installed the kernel sources to compile the HD module. The error may be because the config file in the /usr/src/linux-2.4.21-149 comes from the package. Copy the kernel config file from /boot directory to /usr/src/linux-2.4.21-149 with the name .config and see if that solves it.
 
Old 04-24-2004, 07:00 PM   #6
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
The command make menuconfig is used to compile your own kernel. That is probably not what you want to do right now. Let me suggest, though that you do compile your own kernel at some stage as it is a very worthwhile exercise.

The fact that you get the message "The present kernel configuration has modules disabled." on a stock kernel is somewhat disconcerting. You can try what comp12345 said but I didn't think that would affect it. It's the kernel headers that are the ones that would have control. Did you install any kernel headers?

Oh and just to humour me, could you post the output of uname -r?
 
Old 04-26-2004, 02:57 PM   #7
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
uname -r = 2.4.21.149-default

I did not install any kernel headers as far as I know. IF any were installed it was done during installation.
 
Old 04-26-2004, 06:30 PM   #8
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Well is there anything in /usr/src/linux-2.4.21-149? Could you go there and post the ls -l command? If all the stuff is there and if comp12345's advice didn't work all I can recommend is compiling your own kernel.

Last edited by adz; 04-26-2004 at 07:08 PM.
 
Old 04-26-2004, 11:02 PM   #9
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
output of ls -l of /usr/src/linux-2.4.21-149

total 223
drwxr-xr-x 11 root root 320 2004-04-23 14:03 abi
drwxr-xr-x 20 root root 480 2004-04-23 14:03 arch
-rw-r--r-- 1 root root 263 2003-11-13 14:58 Config.in
-rw-r--r-- 1 root root 18691 2003-11-13 14:58 COPYING
-rw-r--r-- 1 root root 80931 2003-11-13 14:58 CREDITS
drwxr-xr-x 5 root root 240 2004-04-23 14:03 crypto
drwxr-xr-x 38 root root 3936 2004-04-23 14:03 Documentation
drwxr-xr-x 46 root root 1152 2004-04-23 14:03 drivers
drwxr-xr-x 51 root root 2664 2004-04-23 14:03 fs
drwxr-xr-x 31 root root 816 2004-04-23 14:04 include
drwxr-xr-x 2 root root 136 2004-04-23 14:04 init
drwxr-xr-x 2 root root 192 2004-04-23 14:04 ipc
drwxr-xr-x 3 root root 312 2004-04-23 14:04 kdb
drwxr-xr-x 2 root root 952 2004-04-23 16:28 kernel
drwxr-xr-x 4 root root 584 2004-04-23 14:04 lib
-rw-r--r-- 1 root root 48117 2003-11-13 14:58 MAINTAINERS
-rw-r--r-- 1 root root 21897 2003-11-13 14:57 Makefile
drwxr-xr-x 2 root root 728 2004-04-23 14:04 mm
drwxr-xr-x 30 root root 936 2004-04-23 14:04 net
-rw-r--r-- 1 root root 14239 2003-11-13 14:57 README
lrwxrwxrwx 1 root root 50 2004-04-23 14:03 README.SuSE -> ../../share/doc/packages/kernel-source/README.SuSE
-rw-r--r-- 1 root root 2818 2003-11-13 14:58 REPORTING-BUGS
-rw-r--r-- 1 root root 9601 2003-11-13 14:58 Rules.make
-rw-r--r-- 1 root root 1090 2003-11-13 14:58 Rules.modules
drwxr-xr-x 4 root root 984 2004-04-26 14:02 scripts
drwxr-xr-x 13 root root 392 2004-04-23 14:04 sound


See anything that i need to fix? If not any suggestions where to start on compiling a kernel?
 
Old 04-27-2004, 06:28 AM   #10
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Looks like it's all there. So all I can think of is a kernel compile which is not as scary as it sounds.

First step is to decide which kernel series you want. You have either 2.4 or 2.6. I'd recommend 2.4 for you right now. What you do is get yourself the kernel source code from www.kernel.org. Do NOT choose the "The latest 2.4 version of the Linux kernel is: " option from the front page but rather go the first or second (http or ftp) links. Then the first link ("Linux Repository, including kernel source") on the next page. Then "kernel", then "2.4". Select the latest kernel - it will be somewhere between 30 and 40 MB in size.

Once you have it, copy the archive file to /usr/src and extract it. It will create a directory "linux-<version>". Make a symlink called "linux" to that directory. Then type cd linux and copy you current kernel config file to the present directory with cp /boot/config-<your kernel version> ./<some filename>. Then you do a make menuconfig (or make xconfig) and load the file you just saved. This will give you a good place to start from. Then just go through the options available to you. Once you've done that, for 2.4 kernels do a make dep followed by a make bzImage. Then open up a new xterm and do a make modules and as root do a make modules_install. This whole making thing will take a while. On my computer (2.4 GHz pentium) it takes a bit under 10 min.

Once it's all been made and the modules are installed you have to copy the kernel image (/usr/src/linux/arch/i386/boot/bzImage) to /boot and the convention is to call it "vmlinuz-<version>". You'll then have to make lilo (or grub) see the new kernel.

Some noteworthy items are:

1. Make sure you compile your ext2, ext3 (and possibly reiserfs) filesystem support into the kernel and not as a module.

2. Wherever you can, make modules (type "m") instead of compiling into the kernel.

3. For things like sound drivers, network drivers and drivers in general, make them ALL, and make them as modules. This will save you having you recompile your kernel if you get a different piece of hardware.

4. Keep your old kernel. Chances are your first effort at building a kernel will not boot therefore you'll need something to fall back on. Also make sure you give yourself the option of booting either the new or the old kernel in lilo/grub.

Any questions?

Last edited by adz; 04-27-2004 at 09:03 AM.
 
Old 04-27-2004, 08:29 AM   #11
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
I think i'm gonna give that a shot, but i do have one question. How do i make grub see the new kernel?
 
Old 04-27-2004, 09:07 AM   #12
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
You have to edit the /etc/grub.conf file. I use lilo so I'm hazy on the specifics (but man grub.conf knows them all) but you can probably just copy the section that points to /vmlinuz or /boot/vmlinuz and make it point to wherever you want. After you edit this file you'll probably have to run the grub command again. Just do a man grub for more info on that.

Last edited by adz; 04-27-2004 at 09:09 AM.
 
Old 04-27-2004, 10:57 AM   #13
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
Alright I did all the make and module install and stuff, but I have a question about copying the kernel image into /boot. Since i'm running an x86_64 system should i copy it fomr /usr/src/linux/arc/x86_64 (instead of i386/boot). Also I don't see bzImage in either one of those folders. Heres the output of ls -l /usr/src/linux/arch/x86_64/boot

total 84
drwxrwxr-x 4 573 573 240 Apr 14 06:05 .
drwxrwxr-x 9 573 573 336 Apr 14 06:05 ..
-rw-rw-r-- 1 573 573 2975 Nov 28 2002 Makefile
-rw-rw-r-- 1 573 573 10556 Jun 13 2003 bootsect.S
drwxrwxr-x 2 573 573 152 Jun 13 2003 compressed
-rw-rw-r-- 1 573 573 904 Nov 28 2002 install.sh
-rw-rw-r-- 1 573 573 24117 Apr 14 06:05 setup.S
drwxrwxr-x 2 573 573 72 Nov 28 2002 tools
-rw-rw-r-- 1 573 573 38645 Nov 28 2002 video.S

also i just remembered i got an error on make bzimage that i ignored b/c my computer has a habit of giving errors, but working anyway. so here's the last couple lines of that command

Code:
drivers/net/wireless/wireless_net.o(.text+0x804f): In function `cs_error':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x8191): In function `orinoco_cs_attach':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x8256): In function `orinoco_cs_detach':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x8335): In function `orinoco_cs_config':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x8392): more undefined references to `CardServices' follow
drivers/net/wireless/wireless_net.o(.text+0xa7c8): In function `airo_cs_init':
: undefined reference to `register_pccard_driver'
drivers/net/wireless/wireless_net.o(.text+0xa7ec): In function `airo_cs_cleanup':
: undefined reference to `unregister_pccard_driver'
drivers/net/wireless/wireless_net.o(.text+0x1301f): In function `cs_error':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x13187): In function `atmel_attach':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x13229): In function `atmel_detach':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x1330d): In function `atmel_config':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x1332d): In function `atmel_config':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text+0x1335a): more undefined references to `CardServices' follow
drivers/net/wireless/wireless_net.o(.text+0x13ce8): In function `atmel_cs_init':
: undefined reference to `register_pccard_driver'
drivers/net/wireless/wireless_net.o(.text+0x13d0c): In function `atmel_cs_cleanup':
: undefined reference to `unregister_pccard_driver'
drivers/net/wireless/wireless_net.o(.text.init+0x64): In function `init_orinoco_cs':
: undefined reference to `CardServices'
drivers/net/wireless/wireless_net.o(.text.init+0x9d): In function `init_orinoco_cs':
: undefined reference to `register_pccard_driver'
make: *** [vmlinux] Error 1

Last edited by tr0gd0O0r; 04-27-2004 at 01:00 PM.
 
Old 04-27-2004, 02:35 PM   #14
tr0gd0O0r
Member
 
Registered: Jun 2003
Location: Louisiana
Distribution: Fedora 1
Posts: 60

Original Poster
Rep: Reputation: 15
Alright i disabled the wireless modules that were giving me problems and got make bzImage to work, I got some system link errors when I did make module_install, but I was going to just do w/out and see what happens (is this a bad idea or should I post the errors and let yall see.) I'm having some problems configure grub to see the kernel though. Heres some of the config files for it.

grub.conf

Code:
root (hd0,1)
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 0x8000 (hd0,1)/boot/grub/menu.lst
quit

/boot/grub/menu.lst
Code:
color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title Linux
    kernel (hd0,1)/boot/vmlinuz root=/dev/hda2 vga=0x31a splash=silent desktop hdc=ide-scsi hdclun=0 showopts
    initrd (hd0,1)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    root (fd0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
    kernel (hd0,1)/boot/vmlinuz root=/dev/hda2 showopts ide=nodma apm=off acpi=off vga=normal iommu=noforce maxcpus=0 3
    initrd (hd0,1)/boot/initrd
What do I need to edit/add to get grub to see my new kernel (and the old one also)
 
Old 04-27-2004, 07:21 PM   #15
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Looks like you could add the paragraph:
Code:
title Linux
    kernel (hd0,1)/boot/<your_kernel_filename> root=/dev/hda2 vga=0x31a splash=silent desktop hdc=ide-scsi hdclun=0 showopts
    initrd (hd0,1)/boot/initrd
I've bolded the important bit. I must stress that I'm not entirely sure about this since I don't use grub. To get definitive info, do a man grub, man grub.conf, man menu.lst and if all of them fail check the web for a howto.

Quote:
I got some system link errors when I did make module_install, but I was going to just do w/out and see what happens (is this a bad idea or should I post the errors and let yall see.)
Errors are bad, warnings can be ignored. Check /lib/modules/<your kernel version>/ and subdirectories to see if there are any modules there. You should probably post the errors. Basically if it doesn't tell you that all went well then it didn't go well.

Quote:
Since i'm running an x86_64 system should i copy it fomr /usr/src/linux/arc/x86_64 (instead of i386/boot)
It may be in ia64. Once you get a successful compile it will tell you where the kernel is. But yes, if you're not running a i386 system then it wont be in i386.
 
  


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
How do I know what modules to enable when I am upgrading my kernel on suse? abefroman SUSE / openSUSE 1 06-14-2005 07:54 PM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 06:51 PM
new kernel (2.4.22 up from 2.4.20-6) - missing modules - use old modules? Simon Bridge Linux - Software 1 02-04-2004 05:52 AM
How to enable modules beejayzed Linux - Newbie 1 02-02-2004 05:18 AM
How do I enable modules so that non-root users can access them? davecs Linux - Software 9 07-26-2003 11:34 PM

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

All times are GMT -5. The time now is 11:18 PM.

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