# Illegal 'root=' specification: /dev/ram0

## curbat

I compiled kernel-2.6.11-gentoo-r9

*         >> Compiling 2.6.11-gentoo-r9 bzImage...

*         >> Compiling 2.6.11-gentoo-r9 modules...

* Copying config for successful build to /etc/kernels/kernel-config-x86-2.6.11-gentoo-r9

* initrd: >> Initializing...

*         >> Copying modules...

*         >> Copying auxilary files...

*         :: Size is at 3246K

*         >> Creating loopback filesystem...

*         >> Moving initrd files to the loopback...

*         >> Cleaning up and compressing the initrd...

*         >> Installing bootsplash [ using the gentoo theme ]...

*

* Kernel compiled successfully!

*

* Required Kernel Parameters:

*     root=/dev/ram0 real_root=/dev/$ROOT init=/linuxrc

*     [ And "vga=0x317 splash=verbose" if you use a framebuffer ]

*

*     Where $ROOT is the device node for your root partition as the

*     one specified in /etc/fstab

*

* If you require Genkernel's hardware detection features; you MUST

* tell your bootloader to use the provided initrd file. Otherwise;

* substitute the root argument for the real_root argument if you are

* not planning to use the initrd...

*

* Do NOT report kernel bugs as genkernel bugs unless your bug

* is about the default genkernel configuration...

*

* Make sure you have the latest genkernel before reporting bugs.

I make /sbin/lilo and get 

Added gentoo

Fatal: Illegal 'root=' specification: /dev/ram0

My lilo.conf

boot=/dev/hda

prompt

timeout=50

default=windows

image=/boot/kernel-2.6.11-gentoo-r3

label=gentoo

read-only

root=/dev/hda3

image=/boot/kernel-2.6.11-gentoo-r9

  label=gentootry

  read-only

  root=/dev/ram0

  append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3"

  initrd=/boot/initrd-2.6.11-gentoo-r9

other=/dev/hda1

label=windows

Any ideas? 

Regards

curbat

----------

## fido

Are you trying to set up the kernel to boot off of a ram disk? If so, then the problem is that you do not have ramdisk support enabled in your current kernel. You will have to turn on ramdisk support, reboot into that kernel, then compile your ramdisk kernel.

If you are NOT trying to boot off of a ramdisk (which is what I am guessing), then make that kernel's section look like the others.

In the end, it should look like (supposing hda3 is your root partition):

```
image=/boot/kernel-2.6.11-gentoo-r9

label=gentootry

read-only

root=/dev/hda3
```

Also, you will need to copy the kernel image to /boot (if not already done)

----------

## curbat

My kernel .conf have support ram

# Block devices

#

CONFIG_BLK_DEV_FD=y

# CONFIG_BLK_DEV_XD is not set

# CONFIG_PARIDE is not set

# CONFIG_BLK_CPQ_DA is not set

# CONFIG_BLK_CPQ_CISS_DA is not set

# CONFIG_BLK_DEV_DAC960 is not set

# CONFIG_BLK_DEV_UMEM is not set

# CONFIG_BLK_DEV_COW_COMMON is not set

CONFIG_BLK_DEV_LOOP=y

CONFIG_BLK_DEV_CRYPTOLOOP=y

# CONFIG_BLK_DEV_NBD is not set

# CONFIG_BLK_DEV_SX8 is not set

# CONFIG_BLK_DEV_UB is not set

CONFIG_BLK_DEV_RAM=y

CONFIG_BLK_DEV_RAM_COUNT=16

CONFIG_BLK_DEV_RAM_SIZE=8192

CONFIG_BLK_DEV_INITRD=y

CONFIG_INITRAMFS_SOURCE=""

CONFIG_LBD=y

# CONFIG_CDROM_PKTCDVD is not set

If i make

image=/boot/kernel-2.6.11-gentoo-r9 

label=gentootry 

read-only 

root=/dev/hda3

After /sbin/lilo and reboot i get

mttr:size and base must be multiples of 4 kiB

----------

## fido

Try turning off ram disk support. I doubt you need it, and it might fix it.

----------

## curbat

 *fido wrote:*   

> Try turning off ram disk support. 

 

I make it.I get again after /sbin/lilo and reboot 

mttr:size and base must be multiples of 4 kiB

----------

## fido

Hmmm.. This might be unrelated, but seems like a logical thing to try. In the "Kernel Hacking" section (near the bottom if you are using menuconfig), there is an option for 

```
Use 4Kb for kernel stacks instead of 8Kb
```

You might try turning that on if it isn't already. It is called CONFIG_4KSTACKS in the .config file.

----------

## Unther

stupid question but...

Is that /dev/ram0 or /dev/ramO?

----------

## fido

It should be /dev/ram0, as in the number 0. This is so that you can have multiple ram devices such as /dev/ram0, /dev/ram1, /dev/ram2...

----------

## Chris W

The "root=" option is an argument to the kernel, not LILO.  You are currently giving LILO an option it doesn't understand.  Try this: 

```
label=gentootry

image=/boot/kernel-2.6.11-gentoo-r9

initrd=/boot/initrd-2.6.11-gentoo-r9

read-only

append="init=/linuxrc ramdisk=8192 root=/dev/ram0  real_root=/dev/hda3"
```

LILO unpacks the initrd in the first RAM disk (/dev/ram0) and loads the image (kernel).  The kernel is told that the root file system is in the first RAM disk (root=/dev/ram0) and that it should run /linuxrc (instead of the usual init) from the that RAM disk.  Linuxrc does some initialisation stuff, mounts the real root (real_root=/dev/hda3), excutes pivot_root to replace the RAM disk, and launches init to finish the boot sequence.

----------

