# initramfs lvm raid + gentoo kernel

## Enrix

Hi everybody,

I am installing Gentoo and I would like to know how to prepare initramfs + lvm and raid 1 for the kernel.

Thanks

----------

## NeddySeagoon

Enrix,

Welcome to Gentoo.

genkernel can do all of that, you pass it the right options, it builds the kernel, initrd and installs everything in the right places.

```
emerge genkernel
```

Then you can read the help or the man page to discover the right options.

After your kernel and initrd are installed, you will need to set up grub to load them.

The genkernel wiki page is worth reading too but it does not list all the options you need.

----------

## Moriah

Hi Neddy!  You've been so helpful thru the years, so when I decided it was time to update my kernels, I thought I would bounce it off of you first.

I have always built my own initrds from scratch, since back in the days of nash.   :Mr. Green: 

I have all my gentoo boxes running the root filesystem under lvm so I can snapshot them to freeze the view of them when I make a backup.  Some of these machines also run LUKS to fully encrypt the disk, and in some cases the rootfs is on a fully encrypted raid-1 mirror.

Is genkernel a reasonable way now days to build the initrd for such systems, or should I continue to use hand coded initrds?

Thanks!   :Very Happy: 

----------

## NeddySeagoon

Moriah,

I still hand roll my initrds.  They are only user space tools, so they are like firmware. Good for the life of the system.

I've never used genkernel since I was building kernels for several years before I started with Gentoo.

----------

