# root block device in

## kreon28

Hi,

After installing Gentoo , the system doesn't want to boot.

During booting it writes me:

```
could not find the root block device in
```

to boot it futher I have to write by hand :

```
/dev/sda6
```

----------

## erik258

greetings, 

we need more information.  can you please post grub.conf and /etc/fstab so I can take a look at what you have there?  I'm not familiar with any error message that can't find the root block device and then allows you to type in the name of one.

----------

## kreon28

Here it is:

Grub (ubuntu option are useless since I got rid of that system-I forgot to delete it from grub)

```

title      Ubuntu 9.04, kernel 2.6.28-11-generic

uuid      ba042045-7993-484f-a422-b2d7aea2a06a

kernel      /vmlinuz-2.6.28-11-generic root=UUID=3d6496e1-f25a-45ba-bb70-c54033a063e1 ro quiet splash 

initrd      /initrd.img-2.6.28-11-generic

quiet

title      Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)

uuid      ba042045-7993-484f-a422-b2d7aea2a06a

kernel      /vmlinuz-2.6.28-11-generic root=UUID=3d6496e1-f25a-45ba-bb70-c54033a063e1 ro  single

initrd      /initrd.img-2.6.28-11-generic

title      Ubuntu 9.04, memtest86+

uuid      ba042045-7993-484f-a422-b2d7aea2a06a

kernel      /memtest86+.bin

title      Gentoo

root (hd0,2)

kernel /boot/kernel-genkernel-x86-2.6.29-gentoo-r5 root=/dev/ram0 init=/linuxrc 

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

title      Windows 95/98/NT/2000

rootnoverify   (hd0,1)

makeactive

chainloader   +1

title      Windows 98/NT/2000

rootnoverify   (hd0,0)

makeactive

chainloader   +1

quiet

```

and fstab

```

/dev/BOOT      /boot      ext2      noauto,noatime   1 2

/dev/ROOT      /      ext3      noatime      0 1

/dev/SWAP      none      swap      sw      0 0

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

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0 
```

----------

## cach0rr0

a few problems

-you haven't edited your /etc/fstab from the default. The default is NOT a functional fstab

-your grub.conf has a root of /dev/rd0, but no real_root parameter

----------

## kreon28

So how should grub and fstab look?

----------

## erik258

Fstab should list your boot partition device (for example sda1) instead of BOOT and the root partition device instead of ROOT. If the listed filesystem types are wrong Change them.  Or, set them to auto. 

Grub boot line should then include a real_root=/dev/ROOT

Of course, use the device you changed it to, not actually 'ROOT

----------

## gerard27

@kreon,

Consult the handbook plse.

Gerard.

----------

## erik258

My last post was made on my phone in about 2 minutes.  Not particularly helpful, probably, huh?  

 *Quote:*   

> So how should grub and fstab look?

 

 *Quote:*   

> 
> 
> ```
> title      Gentoo
> 
> ...

 

This should be : 

```

title      Gentoo

root (hd0,2)

kernel /boot/kernel-genkernel-x86-2.6.29-gentoo-r5 root=/dev/ram0 init=/linuxrc real_root=/dev/sda6

initrd /boot/initramfs-genkernel-x86-2.6.29-gentoo-r5 
```

All I've done is to add real_root=/dev/sda6 to the end of the kernel line.  

Here, 

```
/dev/BOOT      /boot      ext2      noauto,noatime   1 2

/dev/ROOT      /      ext3      noatime      0 1

/dev/SWAP      none      swap      sw      0 0

/dev/cdrom      /mnt/cdrom   auto      noauto,ro   0 0
```

ROOT should be replaced by sda6.  If you remember the filesystem you used on sda6, make sure it is specified correctly on the line 

```
/dev/sda6      /      ext3      noatime      0 1
```

This is for ext3.  If you used something else (ext4, reiser, xfs, btrfs), you'll have to change it.  If you aren't sure, let the kernel figure it out; change 'ext3' to 'auto'.  

You'll want to change BOOT and SWAP too.  I don't know which devices they should be; looking at the grub config, BOOT should probably be replaced with sda3 - the /dev file equivilent to grub's (hd0,0).  I don't know what your swap partition is, but if you correctly changed the partition type when you partitioned with fdisk ,you should be able to figure out which wan should be swap with the output of `fdisk -l`.  That will list the partition tables on _all_ your hard disks or hard-disk-like disks like flash drives, so make sure you are looking at sda.  

Post the output of `fdisk -l` if you have problems!

----------

## kreon28

Thanks erik258 - I solved the problem - your instructions are perfect.

Strange enough, when I have installed Gentoo 2005 four years ago the default fstab and grub did a trick and box was running fine. I didn't realize that nowadays I have to change that.

----------

