1

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
1
  • Could you please update the question with the links/steps on how to create ramdisk. Thanks for your help.
    – Arjun
    Jul 6, 2016 at 0:18

2 Answers 2

1

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.

3
  • I have used this same procedure for SL4 on an older version of similar hardware and it worked. This was using a method where I copied all necessary directories over from SL4 booted on an SD card, to the image for my PXE boot. I have not once touched any ISOs for this project. I also looked through the link and I can't find anything pertinent there. I'm not supposed to be using any internet connection for this project, because I don't know anything about these capabilities on the machines I'm working with. May 26, 2016 at 23:19
  • you are just a lucky guy that got this working once by chance. 1) if it worked for vN does not mean it'll work for vN+1, 2) you did not read my explanation on why the init proces fails. 3) the quoted site is plenty of custom made INITRDS that patch original initrds in order to PXE boot them. This is not a simple topic and probably requires from you a more solid Linux background. Sorry.
    – Pat
    May 27, 2016 at 7:02
  • I agree with Pat that this initrd file is the likely suspect... if you don't believe it, then open up your initrd file (with gunzip and cpio commands) and grep through the files and see for yourself... it should not reference any local disks like this block 1,0 one (unless for some reason that was intentional)
    – Peter
    May 27, 2016 at 12:47
0

Turns out the image was in fact too large. I had a 3 GB image, with only 500 MB of RAM. After resizing the image to 400 MB, I was able to get past this error screen, and also eventually boot my image.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .