Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to customize my initrd on kernel 2.4.

At some point, inside the file linuxrc, I have the opportunity to set my root device setting the /proc/sys/kernel/real-root-dev variable

The example on docs is the one belowe:

echo 0x301 > /proc/sys/kernel/real-root-dev

where 0x301 is for /dev/hda1

What I'm looking for is the code needed for device different form hda1. I had searched throug the web by I didn't find an answer, so I hope some of you can help me.

share|improve this question

migrated from serverfault.com Feb 11 '13 at 21:22

This question came from our site for system and network administrators.

up vote 3 down vote accepted

See this file for your kernel (probably most hasn't even changed over the major kernel versions):


share|improve this answer
Thanks. It is the file I'm looking for – enzo2 Feb 11 '13 at 16:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.