Re: [SLUG] How to discover which modules unnecessary
[EMAIL PROTECTED] wrote: Actually this is mostly just a waste of effort. Config swap and let the system swap out all the bits it does not need. Memory used by modules isn't swappable. Inserting and then removing a module isn't a good idea. Rather prevent the module from being loaded in the first place using /etc/modprobe.conf install usb-throb /bin/true I'm not sure why the firewire driver would be loaded without the kernel seeing a firewire PCI ID. Check the init script for an explicit modprobe. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] How to discover which modules unnecessary
I'm trying to make an ancient laptop run with a mini-distribution, DSL. As the laptop has only 64MB of RAM, I'm trying to make sure DSL doesn't include any unnecessary services or modules when it boots up. For instance, the laptop has two PCMCIA slots, so on bootup, DSL starts cardmgr. However, I have no cards installed, so I configured a file which runs on bootup shortly after cardmgr is started immediately to stop cardmgr. Having done what I think I can with services, I've now turned to modules. For instance, on bootup, DSL loads the ieee1394 module. However, the laptop has no Firewire port, so I configured the same file immediately to unload the module. However, I'm a bit worried about trying to do the same thing with other modules. Since the laptop has no USB ports, I thought I could get rid of the usbcore and hid modules in the same way I got rid of the ieee1394 module, but trying that hung the laptop. Can anyone point me to some source of information which would help me decide which, if any, other modules I could safely dispense with? I've tried via googling, but had no success. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
Leslie Katz wrote: I'm trying to make an ancient laptop run with a mini-distribution, DSL. As the laptop has only 64MB of RAM, I'm trying to make sure DSL doesn't include any unnecessary services or modules when it boots up. For instance, the laptop has two PCMCIA slots, so on bootup, DSL starts cardmgr. However, I have no cards installed, so I configured a file which runs on bootup shortly after cardmgr is started immediately to stop cardmgr. The elegant way to prevent this laptop from loading PCMCIA is to get the kernel source code for your software. Once you've untar this source code, cd to kernel-xxx-xxx-xx. Then copy your current config (normally in /boot/config-xxx-xxx-xx) to .config and run #make oldconfig. This is will copy .config to .config.old and create a new .config which is a sync of your new source kernel. Then do a # make menuconfig and figure out which ones to activate or deactivate. Or #make config, if you are unable to run X. The above will allow you to remove (disable) modules you do not want to use. Disable pcmcia is one of them. Then, run #make dep make clean make modules make make modules_install make install. Having done what I think I can with services, I've now turned to modules. For instance, on bootup, DSL loads the ieee1394 module. However, the laptop has no Firewire port, so I configured the same file immediately to unload the module. However, I'm a bit worried about trying to do the same thing with other modules. Since the laptop has no USB ports, I thought I could get rid of the usbcore and hid modules in the same way I got rid of the ieee1394 module, but trying that hung the laptop. Can anyone point me to some source of information which would help me decide which, if any, other modules I could safely dispense with? I've tried via googling, but had no success. Hope this helps. O Plameras -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
On Fri, 24 Feb 2006 08:49:43 +1100, O Plameras uttered Then do a # make menuconfig and figure out which ones to activate or deactivate. Or #make config, if you are unable to run X. menuconfig requires ncurses, not X. Cheers, -- Steve I may be love's bitch, but at least I'm man enough to admit it. - Spike -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
Steve Kowalik wrote: On Fri, 24 Feb 2006 08:49:43 +1100, O Plameras uttered Then do a # make menuconfig and figure out which ones to activate or deactivate. Or #make config, if you are unable to run X. menuconfig requires ncurses, not X. Thanks, my bad. O Plameras -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
On Thu, Feb 23, 2006 at 08:31:35PM +1100, Leslie Katz wrote: I'm trying to make an ancient laptop run with a mini-distribution, DSL. As the laptop has only 64MB of RAM, I'm trying to make sure DSL doesn't include any unnecessary services or modules when it boots up. For instance, the laptop has two PCMCIA slots, so on bootup, DSL starts cardmgr. However, I have no cards installed, so I configured a file which runs on bootup shortly after cardmgr is started immediately to stop cardmgr. Having done what I think I can with services, I've now turned to modules. For instance, on bootup, DSL loads the ieee1394 module. Do you mean ieee1394 appears in 'lsmod' output even though you don't have one? I'd call that a bug. Or perhaps the laptop has ieee1394 support on the m'board, but no physical port? However, the laptop has no Firewire port, so I configured the same file what is this file and what do you put in it? modprobe -r .. ? immediately to unload the module. However, I'm a bit worried about trying to do the same thing with other modules. Since the laptop has no USB ports, I thought I could get rid of the usbcore and hid modules in the same way I got rid of the ieee1394 module, but trying that hung the laptop. In the most general case, unloading modules is an unsafe operation. A bit of googling reveals that you can put something like install evilmodule /bin/true in /etc/modprobe.conf Can anyone point me to some source of information which would help me decide which, if any, other modules I could safely dispense with? I've tried via googling, but had no success. If ram is your only concern, I don't think stopping a few modules from loading is going to help much. You're better off just preventing various servers/daemons from running. Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
O Plameras wrote: Steve Kowalik wrote: On Fri, 24 Feb 2006 08:49:43 +1100, O Plameras uttered Then do a # make menuconfig and figure out which ones to activate or deactivate. Or #make config, if you are unable to run X. menuconfig requires ncurses, not X. Thanks, my bad. If you have X, you may use this, #make xconfig This will give a broad perspective of what to enable or disable. O Plameras -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] How to discover which modules unnecessary
Thanks to both Oscar and Matt for replying. As to Oscar's suggestion, I know it's just beyond me. I know my method's crude, but it does work. As to Matt's questions: when I ran lsmod before making any changes, 17 modules showed up as loaded, including ieee1394, and that even though the computer has no Firewire port. The file in which I implemented my changes is called bootlocal.sh. Whether it's specific to DSL, I don't know. In any event, I did add to it a line modprobe -r ieee1394, then saved the file, then rebooted. After a reboot I ran lsmod again and there was no loaded ieee1394 module anymore. To both Oscar and Matt, I apologise for not creating my reply in the usual fashion, but something's gone haywire with Thunderbird. When I create a reply, it often fails to be delivered, though a new email works as expected. I'm just about to see what happens this time! Thanks again, Leslie -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
On Friday 24 February 2006 09:00, [EMAIL PROTECTED] wrote: On Thu, Feb 23, 2006 at 08:31:35PM +1100, Leslie Katz wrote: I'm trying to make an ancient laptop run with a mini-distribution, DSL. As the laptop has only 64MB of RAM, I'm trying to make sure DSL doesn't include any unnecessary services or modules when it boots up. For instance, the laptop has two PCMCIA slots, so on bootup, DSL starts cardmgr. However, I have no cards installed, so I configured a file which runs on bootup shortly after cardmgr is started immediately to stop cardmgr. Having done what I think I can with services, I've now turned to modules. For instance, on bootup, DSL loads the ieee1394 module. Do you mean ieee1394 appears in 'lsmod' output even though you don't have one? I'd call that a bug. Or perhaps the laptop has ieee1394 support on the m'board, but no physical port? However, the laptop has no Firewire port, so I configured the same file what is this file and what do you put in it? modprobe -r .. ? immediately to unload the module. However, I'm a bit worried about trying to do the same thing with other modules. Since the laptop has no USB ports, I thought I could get rid of the usbcore and hid modules in the same way I got rid of the ieee1394 module, but trying that hung the laptop. In the most general case, unloading modules is an unsafe operation. A bit of googling reveals that you can put something like install evilmodule /bin/true in /etc/modprobe.conf Can anyone point me to some source of information which would help me decide which, if any, other modules I could safely dispense with? I've tried via googling, but had no success. If ram is your only concern, I don't think stopping a few modules from loading is going to help much. You're better off just preventing various servers/daemons from running. Actually this is mostly just a waste of effort. Config swap and let the system swap out all the bits it does not need. Of course you may be having fun, learning etc but then learn this too: Unused ram will be swapped out, so you wont see any difference between an unused but full system and an empty system. Newer systems (2.6) are supposed to be better with ram usage, older 2.4 or even 2.2 seem to work better on low ram. Fiddling and testing will show. James James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] How to discover which modules unnecessary
On Fri, Feb 24, 2006 at 10:09:36AM +0800, [EMAIL PROTECTED] wrote: Actually this is mostly just a waste of effort. Config swap and let the system swap out all the bits it does not need. Ahh, what if you compile your SCSI driver as a module, and the pages containing its code are put onto a SCSI disk drive? Kernel memory isn't swappable. I do however agree it is a waste of effort :) -i signature.asc Description: Digital signature -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] How to discover which modules unnecessary
Thanks to both James and Ian for your encouragement! Seriously though, it's better that I should be told that, whether or not I can do what I want, there won't be any practical benefit to it. James was right to assume I was having fun learning, but I have so much else to learn, I might as well try to learn something that's useful at the same time. Thanks again. Leslie -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html