After trying most of the block devices to boot the kernel under QEMU, I added few printks around the code that does the mounting. The function mount_root() in file init/do_mounts.c, mounts the root file system. Using following code printk("\n\nmajor=%d minor=%d\n\n", MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); create_dev("/dev/root", ROOT_DEV); mount_block_root("/dev/root", root_mountflags); Question 1: Why is it creating a new device file with name /dev/root and mounting the /dev/root? I am specifying my root device to be /dev/hda1 as a boot parameter. In function, added a printk to display the file system the code is trying to mount mount_block_root() { ... ... for (p = fs_names; *p; p += strlen(p)+1) { int err = do_mount_root(name, p, flags, root_mount_data); printk("name=%s fs=%s err=%d\n", name, p, err); ... ... } This is the log produced # qemu-system-arm -M realview-pbx-a9 -kernel clfskernel-2.6.36 -hda initrd-rootfs.gz -append "console=ttyAMA0 root=/dev/hda1 ro mem=256M" -m 1024 -nographic .. .. major=0 minor=0 name=/dev/root fs=ext3 err=-6 VFS: Cannot open root device "hda1" or unknown-block(0,0) Please append a correct "root=" boot option; here are the available partitions: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) Backtrace: The error is #define ENXIO 6 /* No such device or address */ Question 2: Shouldn't this always fail, the major and minor numbers are zero? Thanks and Regards, Prasad On Thu, Dec 9, 2010 at 2:27 PM, Prasad Joshi <prasadjoshi124@xxxxxxxxx> wrote: > On Thu, Dec 9, 2010 at 1:54 PM, Alexandre Courbot <gnurou@xxxxxxxxx> wrote: >>> $ qemu-system-arm -M realview-pbx-a9 -kernel clfskernel-2.6.36 -hda >>> initrd-rootfs.img -append "console=ttyAMA0 root=/dev/hda1 ro mem=256M" >>> -m 1024 -nographic >>> ... >>> VFS: Cannot open root device "hda1" or unknown-block(0,0) >>> Please append a correct "root=" boot option; here are the available partitions: >>> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) >> >> Yup, no partition are listed, this means that the kernel did not >> detect the disk. The required block device driver and filesystem must >> be built into the kernel (i.e. not as modules) or you will not be able >> to mount access it. >> >> In that case I am afraid the link I gave you will not be very helpful >> - you just need to enable to right device driver. Unless QEmu did not >> like your disk image, but in that case I guess it would have >> complained. >> > > It is not complaining about the root disk image. I think I have tried > all of the block device drivers now :( > Here is the log > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ