# Grub Question: root vs real_root

## SDNick484

Last night I updated my wife's laptop from 2.6.38 to 3.1.0 and copied over my old GRUB command line which basically goes like, "kernel /boot/kernel-2.6.38-gentoo real_root=/dev/sda5" to "kernel /boot/kernel-3.1.0-gentoo real_root=/dev/sda5".  However when I first tried to boot to 3.1, it failed saying it couldn't find root.  On a hunch I rebooted and changed GRUB to "kernel /boot/kernel-3.1.0-gentoo root=/dev/sda5" and the system booted fine.  I know for a fact real_root worked with 2.6.38, and I'm curious why it doesn't with 3.1?  Does anyone know the differences between the two and when to use them?  To be clear, this is on GRUB 0.97.

----------

## Veldrin

real_root is only required if you use a genkernel built initramfs. 

for any other case, just use root.

btw, the same goes most other arguments handed over by the kernel command line (resume, rootflags, rootfs to name a few).

V.

----------

## SDNick484

Interesting, I suspected it was related.  I don't use genkernel or initramfs/initrd, but I must have copied the entry from a system that did.

----------

## res0r9lm

I think you only have to use real_root if root has changed since initramfs was made or your using root=/dev/ram0. I was just using root= and booted fine until I renamed volume group then I had to pass real_root= or make a new initramfs file. real_root is only needed to override what is in initramfs

----------

## cach0rr0

"real_root" is solely used by an initramfs

the kernel itself does not need it

people who use an initramfs may use real_root because the root they initially mount is a temporary one, in memory, that is used just to prepare the system, and get things ready so that the actual HDD root can be mounted 

after such prep work is done by the initramfs, the initramfs will check out /proc/cmdline, look for a real_root value, so that it knows where to go after it switches away from the temporary in-memory root to the permanent on-disk root 

short/crude explanation, but that's the gist of it. The even shorter version: if you dont use an initramfs, you dont need real_root.

----------

