Failing to Mount Root on PXE Image

12,029

Solution 1

The problem was that the /init script somehow didn't get build into initrd.gz. Getting that added properly fixed the issue.

Solution 2

It's not a kernel problem, but it cannot mount the filesystem. Have you changed the partition table? Does the kernel know where root is (ie maybe 'today' it's /dev/sdb instead of /dev/sda.. I've seen it happening). Also consider:

  • permission
  • why mount rw?
Share:
12,029

Related videos on Youtube

Jeremy Privett
Author by

Jeremy Privett

Educator. Community Organizer. Consultant. I teach Mid- and Senior-level Developers how to be more effective. I teach development teams how to be more efficient and focus on the right things. http://www.jeremyprivett.com

Updated on September 17, 2022

Comments

  • Jeremy Privett
    Jeremy Privett almost 2 years

    I got DHCP/TFTP working great with no problems today. I can PXE Boot memtest off of the server with no problem, so I know there's nothing wrong there.

    For some reason, the image I'm trying to boot into just doesn't want to cooperate. I'm completely at a loss for what I can do with this and Googling hasn't helped either. I can't see very much of the scrollback, but the last two (important-looking) lines are this:

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

    pxelinux.cfg/default:

    label linux
    kernel vmlinuz.2628hr7
    append initrd=/initrd.gz init=/init noapic acpi=off raid=noautodetect ramdisk_size=200000 devfs=nomount root=/dev/ram0 rw
    

    The kernel is the exact same kernel that actually runs on the exact same hardware configuration as the machine I'm trying to PXE Boot. Could it be a problem with the PXE Image? Any help would be greatly appreciated.

  • Jeremy Privett
    Jeremy Privett over 14 years
    That's the thing, I don't want it to mount any existing filesystem. I want it to mount the contents of the image initrd.gz as the root filesystem in RAM. I don't want to touch the underlying filesystem, if one exists, but in this case one doesn't.
  • lorenzog
    lorenzog over 14 years
    I think it's trying to mount /dev/ram0 as the root filesystem -- which must be formatted and populated by something in the initrd ramdisk. Either the /init script can't do it, doesn't do it, or is not allowed to (executable? is the interpreter -i.e. /bin/bash) actually available? also, I wonder if the ramdisk size isn't too small for a whole root fs.
  • Jeremy Privett
    Jeremy Privett over 14 years
    Aha. I see what the problem is. /init didn't actually get built into my image. That should fix the problem. I'm rebuilding the image, now.