# How to make initrd?

## eimis

Hello. I recompiled kernel (from gentoo sources), installed it and get error: "Unable to mount your root fs...". This is because of I use ReiserFS: the system doesn't reconize it. I know that one answer to this problem is to make initial ram disk (initrd). I tryed 

```
mkinitrd -c -k kernel-version reiserfs
```

In Slackware it works, but in Gentoo doesn't. So, can anybody tell me how to make initrd?

Thanks.

----------

## PMcCauley

Gentoo sources have reiserfs patches.  Check your kernel config.  You can use genkernel to create initrd.  What error do you get with mkinitrd?

Patrick

Edit:  You may want to post your /etc/fstab here as that could be the problem.

----------

## eimis

With mkinitrd I get message that command not found.

This is error I get when I try to boot up with new kernel:

```
UDF-fs: No partition found (1)

XFS: bad magic number

XFS: SB validate failed

Kernel panic - not syncing: VFS: unable to mount root fs on unknow-block(1,0)
```

My fstab:

```

/dev/hdc      /mnt/cdrom       auto        noauto,owner,ro  0   0

/dev/hda6    none            swap            sw              0 0

/dev/hda7    /    reiserfs    defaults       0 1                               #Gentoo

/dev/hda8    none            swap            sw              0 0

none        /proc     proc    defaults          0 0

none        /dev/shm  tmpfs   defaults          0 0

/dev/hda5    /mnt/hda5    reiserfs    defaults       0 0                     #Slackware

/dev/hda1    /mnt/ntfs       ntfs            defaults                0 0                              #Windows

```

And my grub.conf: 

```

default 0

timeout 30

splashimage=(hd0,6)/boot/grub/splash.xpm.gz

title=Gentoo

root (hd0,6)

kernel /boot/kernel-genkernel-x86-2.6.15-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda7 

initrd /boot/initramfs-genkernel-x86-2.6.15-gentoo-r5

title Windows

   rootnoverify (hd0,0)

   makeactive

   chainloader +1

title Slackware

   root (hd0,4)

   kernel /boot/vmlinuz-2.6.15-ck3 

   initrd /boot/initrd.gz

title=GentooNKern                  #Gentoo new kernel

root (hd0,6)

kernel /boot/bzImage-linux-2.6.15-gentoo-r1 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda7
```

----------

## whoracle

maybe something like "emerge -av reiserfsprogs" (or reiser4progs?) is needed?

----------

## eimis

I made initial ram disk, but I still get kernel panic.

I also have build in ReiserFS support as driver, not module. Perhaps I should compile it as module?

----------

## mxc

maybe you dont have the right sata controller or ide driver installed? I usually make sure my root partitions filesystem driver is compiled into the kernel and not as a module.

----------

