Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 attempting to boot a linux kernel, ramdisk, and a drive using qemu:

qemu -initrd ramdisk.cpio.gz -kernel mylinux.i686 -m 1024 -append console=ttyS0,38400 -serial file:serial.out -hdd raw.img

Upon boot I don't see the drive under /dev. The main goal is for my drive to be recognized. More info:

  • I created raw.img via qemu-img. It's 3GB and a raw format
  • I can recognize and mount raw.img via another linux distro: tinycore_3.5.1.iso
  • /dev/hdd doesn't exist on the mylinux side nor does any /dev/hd*
  • I don't see anything under /sys/class/block that would lead me to believe the drive was recognized by the kernel
  • the ramdisk contains /init and other processes. for now assume this is my root volume.
  • the system uses udev

I'm new to linux at this level. Hopefully someone can help me with my understanding of the OS events. My assumption was that /sys would be what the kernel recognized as a drive. udev would then listen to kernel events and translate drive information into nodes under /dev. Correct? Any insight and steps to debug this out would be much appreciated. Again, the goal is to have the drive recognized (i.e. show up under /dev), not to boot from it.

share|improve this question
Any reason why you don't make raw.img -hda instead of -hdd? – Tim Post Apr 12 '11 at 6:28
I've tried -hda and it doesn't change anything. That was just an artifact of me trying different options. – Brad Apr 12 '11 at 13:19
what does your 2nd point mean? It works with other distro, but not your home made distro? – J-16 SDiZ Apr 12 '11 at 14:29
Right, it works with the tinycore distro but not my kernel + ramdisk. What I'm unsure of is what is required for the kernel to recognize the drive. I'm unsure how to debug this. – Brad Apr 12 '11 at 15:02

-hdd doesn't stand for "Hard Disk Drive", but "Hard Disk D" or the fourth hard disk (secondary slave).

You should be using -hda to reference the first hard drive - the primary master.

share|improve this answer
Thanks for the response. It's not he primary master. Regardless it still doesn't recognize it if I use -hda. I've also tried specifying it as a -drive with the same result. – Brad Apr 12 '11 at 13:21
up vote 0 down vote accepted

After more debugging I noticed that there was an error in the linux boot messages. The kernel I was using was created for a different ramdisk and thus was looking in the wrong directory for IDE drivers. Once I aligned my kernel with my ramdisk my drive is recognized. One thing that allowed me to narrow this down was to look at the boot messages and see that is never mentioned recognizing any drives. The initial messages are mostly about hardware detection. Thus if it wasn't there it wasn't going to be recognized by the OS. Lesson learned. Thanks for the help and suggestions.

share|improve this answer

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.