You are not logged in.

#1 2008-03-31 03:54:44

Misbah
Member
Registered: 2008-02-27
Posts: 218

What hooks don't I need?

deleted

Last edited by Misbah (2012-02-14 05:44:01)

Offline

#2 2008-03-31 04:09:58

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: What hooks don't I need?

There's a mkinitcpio entry in the wiki that goes into excruciating detail about all possible hooks. I suggest you take a look at it, you're not giving any hints about your system, my crystal bowl is still in for repairs.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2008-03-31 04:34:36

Misbah
Member
Registered: 2008-02-27
Posts: 218

Re: What hooks don't I need?

deleted

Last edited by Misbah (2012-02-14 05:43:21)

Offline

#4 2008-03-31 04:50:02

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: What hooks don't I need?

Misbah wrote:

I have ide modules loaded in rc.conf. So what's the difference here? What/when is mkinitcpio loading these and why do I need it to? Are these modules loaded instantly with the kernel so boot can procede? Or am I off base? My goal here is to not have anything I don't need, and if this is just something redundant going on, I don't want it.

The standard arch kernel has almost every driver compiled as module, not compiled in. Hence, when the kernel (and just kernel) loads, it doesn't have any drivers - so it most probably cannot detect your hard drive, and so the boot process cannot proceed, since there is nowhere to go. (If you compile your own kernel, with the drivers you need compiled in, you can avoid using initcpio altogether.)
So, this is where initcpio comes in. It's like a small system which is loaded straight from grub/lilo after the kernel, and which takes care of stuff which needs to be done before the init process can continue - mainly supply the modules to kernel, so that it can mount the root filesystem: pata/scsi/sata stuff, udev so that the device symlinks in /dev/ are created for all present devices automatically, and filesystem module depending on your filesystem used on the root partition. Usbinput is there, so that if you have (say) an usb keyboard and something goes wrong with the initcpio, you can actually type commands in.

For instance, if you have your root filesystem on LVM and/or encrypted, the appropriate kernel modules which handle these things need to be in initcpio (dm_mod, dm_crypt, aes*, etc).

So these hooks - mostly what they do is they try to figure out what hardware you have on your system, and they include the needed modules into the initcpio. They are reasonably good, and I don't think you can cut too much time by doing this explicitly yourself.

I'd say if you go for the speed, cut out the middle man and compile your own kernel.

EDIT: If the modules are already loaded, an extra modprobe caused by your MODULES in rc.conf doesn't take almost any time (I think). But If you really want to remove redundancies, just empty your MODULES field, disable autoloading of modules, reboot and see which modules are already in - those are loaded in initcpio.

Last edited by bender02 (2008-03-31 04:52:49)

Offline

#5 2008-03-31 05:27:18

Misbah
Member
Registered: 2008-02-27
Posts: 218

Re: What hooks don't I need?

deleted

Last edited by Misbah (2012-02-14 05:43:05)

Offline

#6 2008-03-31 08:12:44

Kane
Member
Registered: 2006-10-08
Posts: 220

Re: What hooks don't I need?

i hope this isnt hijacking the thread but, if you have autodetect in the hooks, does it autodetect the modules to put in the image, or does it mean it autodetects them everytime you boot?

Offline

#7 2008-03-31 14:07:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: What hooks don't I need?

Kane wrote:

i hope this isnt hijacking the thread but, if you have autodetect in the hooks, does it autodetect the modules to put in the image, or does it mean it autodetects them everytime you boot?

HOOKS from mkinitcpio.conf are run only when you generate a new initcpio with mkinitcpio. So the answer is: it detects what's needed to be included in initcpio. At boot, some other script just loads modules that have been included.

Offline

#8 2008-03-31 16:40:40

Kane
Member
Registered: 2006-10-08
Posts: 220

Re: What hooks don't I need?

thanks smile
seems pretty obvious now lol.

Offline

Board footer

Powered by FluxBB