Removing Kernel Modules


Forum: DSL Tips and Tricks
Topic: Removing Kernel Modules
started by: F1F1

Posted by F1F1 on Sep. 12 2006,00:55
I'm new to DSL and was wondering how I might prevent the umem.o kernel module from loading. I'm using a USB drive installed from the cdrom image I downloaded a few days ago.
Posted by jimihieu on Sep. 12 2006,10:20
add  to that....
how to make new module that u want to run at the boot up also?
thanx

Posted by ^thehatsrule^ on Sep. 12 2006,13:07
Don't know what umem.o is for (I'm assuming there's no bootcode?), but you can delete that file.  And then you could run depmod.
Or you could just remove that module's path from the *.modprobe lists...
Or even make your own bootcode...

To add one, if the app/system did not autoload it, you can specify the commands in /opt/bootlocal.sh

Posted by F1F1 on Sep. 12 2006,17:30
I haven't gotten into the structure of DSL, but when I try to do something OS related I run into RO file system errors.
(ie delete, rename, etc.)
How would I delete that file?
Remount /dev/cloop on /KNOPPIX as RW?
The umem.o driver is for a cache card from micromemory.com.

Posted by ^thehatsrule^ on Sep. 12 2006,18:25
You can remove the symlinks/files on the ramdisk and copy over the actual files from /KNOPPIX to /ramdisk
You should be able to run depmod/edit things after... then you could do a remaster with the changed structure/files.

I don't know if you can remount it as RW, I've always edited things separately with a copy (I suppose you could do this in a toram though)

Posted by F1F1 on Sep. 12 2006,19:26
I'm not sure what you mean. The ram disk only has the /home /opt /var directories on it.
/lib/modules is on /KNOPPIX which is RO.
I just need to stop umem.o from loading at boot.
Is there a util or a file I can edit that will be saved for the next boot?

Posted by ^thehatsrule^ on Sep. 12 2006,20:25
mydsl-load any dsl, or running mkwriteable should load the data to your ramdisk
Posted by F1F1 on Sep. 12 2006,21:03
Hi,
Thanks, I found the mkwriteable script at < http://www.damnsmalllinux.org/talk/node/163 >
It let me rename the umem.o file.
Now I just need a way to save it, cause after a reboot the change is gone.
How would I save the change back?

Posted by ^thehatsrule^ on Sep. 12 2006,21:33
mkwriteable can be found in /etc/init.d/

You may as well remove it and save some more memory :)

You could do a dsl image remaster.
Actually, you could've just done a remaster in the first place, and you wouldn't have to have done any of the above.  Guess I didn't look ahead :P

However, doing the above will make it easier if you choose to update your module lists.

EDIT: above meaning the contents of the previous posts

Posted by slimeph on Sep. 19 2006,03:28
Quote (^thehatsrule^ @ Sep. 12 2006,14:25)
You can remove the symlinks/files on the ramdisk and copy over the actual files from /KNOPPIX to /ramdisk
You should be able to run depmod/edit things after... then you could do a remaster with the changed structure/files.

I don't know if you can remount it as RW, I've always edited things separately with a copy (I suppose you could do this in a toram though)

im removing some applications i dont want..

when starting dsl toram .. all files will end up on /KNOPPIX..

following the remastering howto.. it will be copied to newcd/source i then deleted beaver which in effect is in newcd/source/usr/bin but it gives me ro file system error..

will mkwriteable make it writeable?

my other question is depmod? what is it?dependency module? for what? checking dependencies.

sorry for so many questions.. im a willing learner. :D

Posted by ^thehatsrule^ on Sep. 19 2006,22:41
where is the exact location of "newcd/source/usr/bin" (i.e. full path)?

Depmod does the module dependency lists, for efficient use by modprobe, etc.  You should not need mkwriteable just for remastering, but I was just saying it may be easier to modify the modules on the current ramdisk, run depmod to update, then you can easily copy it over to your remastering sandbox.

Posted by slimeph on Sep. 20 2006,00:31
rule^
->the dir is in a hard disk partition created for the remastering and editing/deleting some file in it would only give me RO file system error, could have had deleted the beaver executable
->also the command whereis gives out the location of a particular executable file but how about it's config etc? how can i find the other parts?
->is there any particular example on when to use depmod?i know it's a kernel module compatibility check.. im better not to mess with this now. :laugh:

thanks again rule^ for the warm reply.

Posted by ^thehatsrule^ on Sep. 20 2006,01:14
1. mount it as rw?
2. you should use "which" or "command -v" to find the location of an executable within $PATH.  Configs are app-specific - usually check in /etc for system-wide configs, or ~/.project_name* for user contained configs.
3. it's not just a check, it will generate the lists used by modprobe.  example: depmod -a

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.