You are not logged in.
Pages: 1
hey! I'm trying to setup my old computer to do only certain things, meaning I don't need to load modules for all the hardware that's in it. I'm more intrested in saving memory aso... But how do I do this with mkinitcpio? I mean, like in the "good old days"? Specify all modules to load in rc.conf, but now I think this should go in mkinitcpio.conf? But I read the wiki, it just talks about hooks and says "don't remove this if you're not sure what you're doing"... And then there are no more info to be found...
To sum up... I want for example my soundcard to work, meaning I need to load the right module for it, but where do I do that these days? I have usb interface but no need for it so I don't want it to load (along with most other things too).
Offline
I believe that the stuff in mkinitcpio.conf only pertains to startup. You would specify everything needed to begin booting there, then later udev will load needed modules. You can blacklist kernel modules in rc.conf.
I think. Someone will correct me if I've got it wrong.
Offline
In most cases, mkinitcpio does what you need (autoload the modules you'll like to have to boot up root), until udev starts over and fetches the rest.
You may tweak /etc/mkinitcpio.conf, and strip down unneeded parts, scsi f.e. if you don't have / on it.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
But how do I turn it all off, I mean udev that loads all modules and where do I enter which to load? mkinitcpio is for the things to boot? but what is needed to just boot?
Offline
a kernel, initscripts, a bootloader to boot.
udev has hardware detection, and you can use /etc/rc.conf or udev-rules to handle it.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
Sounds like you want to put MOD_AUTOLOAD="no" in /etc/rc.conf and populate MODULES=() the old fashion way.
All of your mips are belong to us!!
Offline
isn't the mod_autoload=no the old way in mkinitrd or mkinitramfs? or is it somewhere for the mkinitcpio also?
Offline
You want to interfere with the boot process without understanding a bit of it, which is generally a bad idea.
mkinitcpio generates an initramfs image, which only contains the necessary modules to make the harddisk controller work and mount the root filesystem. You can of course remove all hooks except "base" and specify your harddisk controller and filesystem modules manually. That works, IN CASE YOU DO IT RIGHT. Unexperienced users and users that don't even understand how the boot process works should stick with the default settings.
The MOD_AUTOLOAD and MODULES stuff in rc.conf isn't related to that at all, it affects the second part of the boot process - after the root filesystem has been mounted and init has been started.
Offline
gaah, have you even installed archlinux on the machine? You may worry about problems where no problems are.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
well, it's true that udev loads a shitload of modules. if he doesn't feel like having parallell- and com-port drivers, 20 snd modules, usb drivers, etc that he doesn't need, I suggest specifying MODULES manually.
mkinitcpio.conf should be left alone, unless you really know what you're doing. You can remove the SCSI hook, but I guess that will only matter if your box actually has a SCSI card.
All of your mips are belong to us!!
Offline
yes, I have installed arch on that machine!
I maybe don't understand so much of the boot proccess yet, but what better way to learn is it than to try things out and see what happens? I just needed a pointer to where to start.
udev loads all modules, but this setting is not in the mkinitcpio.conf, but in rc.conf? and this is after the initial boot proccess? so if I do like this, I disable autoload in rc.conf, look which modules that are loaded after a boot. then these would be what I need to boot? meaning I then can enter them in mkinitcpio.conf and remove all hooks? or are there modules that are loaded during boot and then unloaded when done?
I mean, the worst thing that can happen is that I get an unbootable system, but if I keep a backup copy of a working image, it wouldn't matter much? and if all goes wrong it's just a reinstall away before I can try again! :-)
Offline
I too am having problems understanding this.
Say I want to load only the modules I need. I put this in rc.conf, correct?
Say I don't want to run udev. Where do I turn this off?
Say I want to black list a module, say ipv6, I add it in rc.conf under blacklist, but it still loads the module anyways.
Say I want to remove the filesystem hook under mkinitcpio.conf, then where do I specify the filesystem module?
Also in rc.conf why is there a blacklist and then it says to add a ! to blacklist modules under MODULES?
Offline
Say I want to load only the modules I need. I put this in rc.conf, correct?
Yes, MODULES=(mod1 mod2 mod3 ...)
Say I don't want to run udev. Where do I turn this off?
You don't, your system will be unusable.
Say I want to black list a module, say ipv6, I add it in rc.conf under blacklist, but it still loads the module anyways.
In that case, the module is not autoloaded by udev, but by the kernel's "I need something, so let's autoload it" feature. Read man modprobe.conf
Say I want to remove the filesystem hook under mkinitcpio.conf, then where do I specify the filesystem module?
mkinitcpio.conf, MODULES="ext3"
Also in rc.conf why is there a blacklist and then it says to add a ! to blacklist modules under MODULES?
Backwards compatibility to older initscripts versions. And, some people wanted the !, some liked the blacklist more.
Offline
udev loads all modules, but this setting is not in the mkinitcpio.conf, but in rc.conf? and this is after the initial boot proccess? so if I do like this, I disable autoload in rc.conf, look which modules that are loaded after a boot. then these would be what I need to boot? meaning I then can enter them in mkinitcpio.conf and remove all hooks? or are there modules that are loaded during boot and then unloaded when done?
You must not remove the base hook. Otherwise you are right. Let's make an example for my IDE system: I need "piix" for my IDE controller, "ide-disk" to be able to mount ide hard drives and "ext3" as a filesystem. All other modules are added automatically, as they are dependecies on the above module.
If you keep a separate working image in place, you can experiment with this as much as you want. Let us know how it turns out.
Offline
In rc.conf why is there MOD_AUTOLOAD if udev will load them anyways?
Also in mkinitcpio.conf if I add ext3 as the module , remove filesystem hook and the run
mkinitcpio -g /boot/ck.img
, I get
FATAL: module 'ext3' not found, aborting
Offline
yes, I think I managed this now. this is what I did:
removed all hooks but base in mkinitcpio.conf and added the three modules as stated in the example in that file. (at the top (I'm using reiserfs too))
I set mod autoload to no in rc.conf and added the modules I need in the modules section in the same file (which ones needed can be checked with hwd -s)
rebulit the image with mkinitcpio -g /boot/kernel26.img
rebooted and now I like what lsmod tell me much more!
just some follow up questions now...
in the bootup process I see uevent (or something similar) taking much time. just wondering what this is?
and also, I want to background as much as possible of my daemons in rc.conf, which ones should I not background and why?
Offline
OK, I need to bring this up for the 400th time. Let's pretend for a second, that you had no 'lsmod' command. Would you care about extra modules being loaded? I doubt it. Do you know that if you load every module you'd be using about 15-20 MB of ram. That's not even feasible. Odds are, unless you had about 100 network cards and drive controller cards, you'd only be using about 4-5 MB of ram.
A single bash session, with all bash_completion loaded, takes up aroun 5.5MB. A single urxvt terminal can soak around 20-30 MB. X and firefox take ridiculous amounts. weechat (curses) takes about 20-30. Hell, I've even had screen take up over 100MB of ram.
Now tell me, in light of this, what does it matter if all those modules are loaded? What if every single module was build into the kernel itself (making it like 40 megs larger)? Your 'lsmod' would be empty.... is this somehow better?
My advice: stop caring about lsmod. It's as inane as caring about how many tcp/ip connections firefox opens and trying to lower that.
Offline
OK, I need to bring this up for the 400th time. Let's pretend for a second, that you had no 'lsmod' command. Would you care about extra modules being loaded? I doubt it. Do you know that if you load every module you'd be using about 15-20 MB of ram. That's not even feasible. Odds are, unless you had about 100 network cards and drive controller cards, you'd only be using about 4-5 MB of ram.
A single bash session, with all bash_completion loaded, takes up aroun 5.5MB. A single urxvt terminal can soak around 20-30 MB. X and firefox take ridiculous amounts. weechat (curses) takes about 20-30. Hell, I've even had screen take up over 100MB of ram.Now tell me, in light of this, what does it matter if all those modules are loaded? What if every single module was build into the kernel itself (making it like 40 megs larger)? Your 'lsmod' would be empty.... is this somehow better?
My advice: stop caring about lsmod. It's as inane as caring about how many tcp/ip connections firefox opens and trying to lower that.
To dignify your statement, I will add this complete quote as the signature in my today's emails.
Thank you for this!
I love you 8)
Offline
I don't get it.
I've been trying to keep my firefox tcp/ip connections down for years! You mean that's something I don't care about?
Gentoo habits die hard.
Offline
Pages: 1