Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Oct 2019, 16:52
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
removing kernel modules is safe?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
nosystemdthanks


Joined: 03 May 2018
Posts: 694

PostPosted: Fri 30 Nov 2018, 23:45    Post subject:  removing kernel modules is safe?
Subject description: fsvo "safe"
 

always looking for ways to customise distros and make them smaller.

yesterday i found that support for minix filesystems isnt a standard feature. slacko has or had it, early versions of puppy relied on it, i even found out my own distro has it. for debian-based distros, cat /proc/config.gz | grep MINIX_FS is the way to tell. for the earliest versions of puppy, you have to convert vmlinuz to vmlinux and run grep.

when i say "removing kernel modules" i mean moving them out of /lib/modules and seeing what happens. obviously some modules will be needed to boot, let alone function properly. the minix kernel module can be removed, i believe.

what else could we (optionally) get rid of?

this applies to modules that arent integrated in the kernel. the idea that you can make a tighter kernel with fewer modules isnt new. but i never hear about people deleting stuff from /lib/modules.

mine is 5% of 1gb. id have to reboot to be sure, or i might try this in qemu. but for example i usually remove the wireless card from my laptop (on the rare occasion when i need wifi, they have usb versions.)

theres > 100 items in kernel/drivers/net/wireless. i could probably just move those and then check the general stability for a while. have other people tried this sort of thing? this is what zdrv does, right? i mean it moves optional stuff to a different sfs.

_________________
"microsoft is unique among proprietary software companies: they are the only ones who have actively tried to kill [floss]. it’s not often someone wants to be your friend after trying to kill you for ten years" -- bradley m. kuhn
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 11273

PostPosted: Mon 03 Dec 2018, 09:27    Post subject:  

No problem if you don't need the driver(s).
Did the same for XP...makes for a much smaller driver store.

Worth running 'depmod' afterwards to rebuild the kernel module database...it may not happen automatically.

lsmod in a terminal shows what you are actually using.

Of course this is all ok for your own use but may not be so useful for a public release.

One approach is to make an sfs of removed drivers so they can be added back easily.....I believe adrive is helpful there.

mike
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 12766
Location: S.C. USA

PostPosted: Mon 03 Dec 2018, 09:46    Post subject:  

Anything not needed for your hardware can be removed, but then you have an OS that will only support your specific computer.
_________________
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
YaPI(any iso installer) http://www.murga-linux.com/puppy/viewtopic.php?t=107601
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2647

PostPosted: Mon 03 Dec 2018, 09:47    Post subject:  

You should find out which modules are being loaded and then selectively use rmmod to check whether anything breaks. Or use modinfo to read what the modules says about itself.
Back to top
View user's profile Send private message 
nosystemdthanks


Joined: 03 May 2018
Posts: 694

PostPosted: Mon 03 Dec 2018, 16:46    Post subject:  

very cool. youre all confirming things i suspected, but then that was the point of this thread. thanks.

i got very expert at removing unnecessary components in windows 9x. took a few years, but i learned a lot about stripping down gnu/linux too. but i was never sure about /lib/modules. i do use rmmod, modprobe and lsmod. (and rmmod of course, doesnt remove the file, it just unloads it.)

_________________
"microsoft is unique among proprietary software companies: they are the only ones who have actively tried to kill [floss]. it’s not often someone wants to be your friend after trying to kill you for ten years" -- bradley m. kuhn
Back to top
View user's profile Send private message Visit poster's website 
ITSMERSH

Joined: 02 May 2018
Posts: 911

PostPosted: Mon 03 Dec 2018, 17:06    Post subject:  

mikeb wrote:
No problem if you don't need the driver(s).
Did the same for XP...makes for a much smaller driver store.

Worth running 'depmod' afterwards to rebuild the kernel module database...it may not happen automatically.

lsmod in a terminal shows what you are actually using.

Of course this is all ok for your own use but may not be so useful for a public release.

One approach is to make an sfs of removed drivers so they can be added back easily.....I believe adrive is helpful there.

mike

Some one may prove me wrong, but I think it is the fdrv that is more appropriated in addition to the zdrv in new puppies for drivers and stuff.

I have a fdrv_4.1.11_tahr64_2.sfs with lots of stuff in /lib just like the zdrv does.

I think the adrv is more for a use of applications etc.

_________________
RSH

Beware of the Dog ähem nic007! Wink
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 971
Location: Staffordshire

PostPosted: Mon 03 Dec 2018, 17:37    Post subject:  

Isn't there a way of compiling a kernel that just builds currently used modules? I think i tried it once, but it was years ago.
After a quick search, it may be 'localmodconfig' I'm thinking of.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0400s ][ Queries: 12 (0.0068s) ][ GZIP on ]