# initrd creation tool

## grey_dot

Genkernel and dracut just suck. The first one sucks because it fails to create a useful ramdisk, the latter one is just ugly and bloated, and it frequently fails to boot (say hi to lvm partial mode, ouch!). Mkinitcpio from arch guys was useful, until they switched to systemd, and mkinitcpio was rendered incompatible with any other init. Though I've seen some work on it by a guy named udeved on this forum, I failed to find a working ebuild anywhere. Sure I could use a small init script to mount root from initrd and switch to it, but I really would like to have a simple working solution. Any suggestions? Its 2013 already, and gentoo doesnt have such a basic tool. Thanks in advance.

----------

## grey_dot

 *grey_dot wrote:*   

> I failed to find a working ebuild anywhere.

 

https://github.com/udeved/ebuilds/tree/master/sys-kernel/mkinitcpio

found this. I'll try to test it and write about results here (if this thread survives long enough).

----------

## schorsch_76

It has at least 2 tools. genkernel and dracut. dracut works for me just fine. If both dont match your need, make your own, but please dont request from others to serve you.

----------

## grey_dot

 *schorsch_76 wrote:*   

> It has at least 2 tools. genkernel and dracut.

 

I mentioned them in OP.

 *schorsch_76 wrote:*   

> dracut works for me just fine.

 

Really glad for you. Nonetheless it doesn't work for me.

 *schorsch_76 wrote:*   

> please dont request from others to serve you.

 

Do I? I have just asked for an advice, nothing more. Although if you insist... OBEY AND SERVE ME, YOU MISERABLE SLAVE!!! :)

----------

## NeddySeagoon

grey_dot,

I like the kernel provided script, which is also documented on the Gentoo Wiki

No black magic like dracut and genkernel, you retain complete control.

----------

## grey_dot

 *NeddySeagoon wrote:*   

> grey_dot,
> 
> I like the kernel provided script, which is also documented on the Gentoo Wiki
> 
> No black magic like dracut and genkernel, you retain complete control.

 

Unfortunately, this doesn't work for me since I use a bit more complex setups involving RAID, LVM, LUKS, etc. Tweaking shell scripts for each machine I have will drive me crazy.

p.s. I gathered some patches adapting mkinitcpio to work on gentoo. My laptop (luks+lvm) boots fine, though I had to add 'modprobe reiserfs' into initrd init script because udev fails to load the module. I'll try to solve this issue later. Everything else just works. The code is here https://bitbucket.org/braindamaged/mkinitcpio-gentoo/

----------

## NeddySeagoon

grey_dot,

I use raid and lvm too.

You only build the initrd once per machine, unless something fundamental changes, so it becomes like firmware.

I don't have any kernel modules in my initrd.

If you are concerned about hard coding UUIDs, you can pass them via the kernel line, so you don't even need to edit the init scripts from one system to another.

Of course, parsing the kernel line is extra work but you only need to write the code for that once.

----------

