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'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>
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
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.
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?
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.
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.
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.
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
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.