FS#13105 - don't run mkinitcpio needlessly: [PATCH] setup split kernel install process to speedup installation
Attached to Project:
Release Engineering
Opened by Gerardo Exequiel Pozzi (djgera) - Tuesday, 03 February 2009, 00:18 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:39 GMT
Opened by Gerardo Exequiel Pozzi (djgera) - Tuesday, 03 February 2009, 00:18 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:39 GMT
|
Details
Hi
Intro: kernel26 install process is very slow compared to all packages installation, because the mkinitcpio step. But this step is repeated one more time at the "configure system" phase. My solution: I modified the setup script to speedup the installation process. This skip the kernel scriptlet at the "install packages" phase, then only at run_mkinitcpio() is executed. I added "depmod" at run_mkinitcpio() to respect the scriptlet process. The patch is attached. |
This task depends upon
Closed by Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:39 GMT
Reason for closing: Deferred
Monday, 26 November 2012, 04:39 GMT
Reason for closing: Deferred
Patch is attached to fix this.
I tested it and worked fine :) Now Arch Linux install more fast :P
Next installer will be aif (in nothing big happened), so we should see how aif handle this thing, and if aif could benefit from this patch.
@Dieter: assign this also to you, so you get informed.
Gerardo, I like your patch, it's a bit hacky but it's a good starting point.
Have a look at http://github.com/Dieterbe/aif/blob/e9c113324dfa3f40206a280f99aa47e4d731debf/src/core/libs/lib-software.sh (installpkg function)
Also check out the run_background , follow_progress functions etc whith allow you to do a cleaner implementation
Btw, instead of putting the "lowlevel" logic in run_mkinitcpio, wouldn't it be much easier+cleaner to just (re)install the kernel on the target system?
OK, in the next days, i will testing AIF and send patches that from my point of view would be interested.
I'm thinking about something like this:
- during package installation: do not install kernel26 at all, or install it with --noscriptlet (do any packages depend on kernel26? are there any scriptlets other then mkinitcpio?)
- after configuring the system: install kernel26 normally.
I know _shit_ about the packaging of the kernel/modules, what happens during installation and what I safely can and can't do.
What I do know is that at a certain point during installation all packages get installed to the target the system including the kernel, at which point mkinitcpio is executed.
Later, after the "configure system" step the user *may* have changed his mkinitcpio.conf so we run mkinitcpio again.
Sure we could md5sum mkinitcpio.conf and only run mkinitcpio a 2nd time if the file has changed, but shouldn't it be possible to only run once? (eg after the configure system)
There are several ideas posted on this page.
Please tell me your thoughts, and just tell me what I should do :)
It would have been nice, but it's not worth it.
For now, I think the md5sum on mkinitcpio.conf is a good compromise between benefit and code complexity. This should be trivial to patch.
Dieter