Unable to do a PXE boot, “no filesystem could mount root” error

initmountpxe-boot

I'm trying to do a PXE boot with an image I created, but after loading the image and the kernel, I get the following error message:

http://i.imgur.com/TYlbvKZ.jpg?1

The main error message is this:

No filesystem could mount root, tried: ext3 ext2 iso9668
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0
Pid: 1, comm: swapper not tainted 2.6.34.1 #4

I've tried looking up advice for this online, but what I found was that either the hardware was incompatible, or to use another kernel. I'm confident that the hardware is compatible because I was able to boot the same exact kernel (a custom kernel that I did not create, unfortunately) and operating system (Scientific Linux 5) from an SD card without problems, so I think this network boot should also work for the same kernel and system. To make my SL5 image for the network boot, I've copied all files exactly from the SD card (except those in /sys and /proc), yet I still get this error message. I've also only tried copying necessary directories, like /bin, /dev, /etc, /lib, etc. Even with only these directories though, the image is 2.6GB or so, and I still get this error message.

Right now I feel like I have two options to tackle: either the image is just too big to be mounted onto ram0 (is there a size limit?), in which case I should trim the contents of the directories; or the system is just not recognizing ram0 at all, and there is a problem with the initrd process.

Here are the relevant contents of my pxelinux.cfg/default file, as well:

LABEL SL5
MENU LABEL SL5
KERNEL images/vmlinuz-2.6.34.1-32-v7805
APPEND initrd=images/SL5rootfs.gz root=/dev/ram0 ramdisk_size=3100000 rw ip=dhcp fastboot mem=3g

Best Answer

if you built SL5rootfs.gz based on the initrd in your SL ISO then its init script still has the code for mounting root from a CD/ISO that's why it fails. You must get into the booting script chain starting by /init and fix the root mounting now based on a net retrieved root partition i.e. a squshd fs file. You can do that by CIFS, HTTP, NFS, etc. if you want to see lot of examples on this you can take a look to what Serva does for PXE booting lot of Linux distros. (I'm related to Serva development)

An extra point you must consider is if the SL5rootfs.gz really has net support or not. if it does not have it you can very well boot it from PXE but that's the only thing you can do because you won't be able to net retrieve anything else.