On Fri, Jan 22, 2010 at 11:06:08AM -0500, Jim Pryor wrote:
The best way I found to do this was to read the source for the /lib/initcpio/{init,init_functions} look at some of the pairs /lib/initcpio/{hooks,install}/foo for different foo. However, you have to realize that you only have a restricted set of binaries and shell commands available then.
Also, Arch is in the process of moving to a different initcpio system. It's not in any of the repos yet, but is in the pipeline. I haven't fully understood what the changes will be. I think they're getting rid of the use of klibc.
I expect others who do know better will chime in.
It not helps at all. "Your" hooks runs before mounting root device. I need to run my script after mount root, but before switch_root. At the end of /lib/initcpio/init, there are call to kinit and it seems kinit mount root partition and do switch_root. Is it possible to write "hook" for kinit? P.S. Why does Arch uses kinit, raw is not trusted? -- )\._.,--....,'``. /, _.. \ _\ (`._ ,. `._.-(,_..'--(,_..'`-.;.'