Failing to mount root from ramdisk while PXE boot

centos6ext4kernel-panicpxe-bootramdisk

I have a working TFTP/DHCP PXE boot environment where I've already booted some images successful. Now I built an CentOS 6.5 diskless image and this one is failing booting with the following error:

No filesystem could mount root, tried:  iso9660
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

I built the image the following way (followed this excellent tutorial):

dd if=/dev/zero of=new-rootfs.img bs=1M count=512
mkfs.ext4 -F -j new-rootfs.img
<mounted and copied os from template host with rsync to /mnt>
gzip -c new-rootfs.img | dd of=new-rootfs.gz

My PXE line is the following:

    KERNEL vmlinuz0
    APPEND initrd=/images/centos-diskless/rootfs.gz root=/dev/ram0 init=/init noapic acpi=off devfs=nomount raid=noautodetect ramdisk_size=1048576 rw ip=dhcp

One thing which makes me curious is that the kernel is saying tried with iso9660 only and not with ext4 (tried an ext3 image unsuccesful as well). How can I force to try it with ext3/4? Is it a problem with the image?

I would be happy for any help in that case!

Best Answer

Are You sure that this kernel image has builtin support for anything other then iso9660 ?

You can check for this in the .config file for the kernel image, should be available in /boot/config... or /proc/config.gz (search for CONFIG_EXTX_FS) y is builtin, m is module