[syslinux] Cannot execute memdisk

Shao Miller Shao.Miller at yrdsb.edu.on.ca
Thu Feb 17 04:00:56 PST 2011


On 2/17/2011 03:23, SINAN AKPOLAT wrote:
> I copied the file "memdisk" to tftpboot directoy I changed DHCP 
> filename from "pxelinux.0" to "memdisk".
> However it seems to wait forever now, without any kind of messages. Is 
> it normal?

I'd suggest to you that you try to gain an understanding of binary 
formats.  Not every program is the same.  Try the 'file' command (if 
you're on Linux) on different files and see what the results are.

pxelinux.0 is what's called an NBP (Network Bootstrap Program).  PXE 
clients expect to boot an NBP.

memdisk is a Linux x86 kernel-format program.  PXE clients _do_not_ 
expect to boot one of these.  Any boot-loader capable of loading a Linux 
x86 kernel can load MEMDISK.  Any of the Syslinux boot-loaders can do 
this (including PXELINUX).  GRUB can also do this.

You cannot do './memdisk' because it's not a Linux executable (I'm 
assuming you're using Linux).  For example, look at 'file /bin/ls' 
versus 'file memdisk' and note the difference.

> I am trying to pxe boot an ISO CD. I configured DHCP and  TFTP.
>
> In DHCP config file I define the boot folder as
> filename "pxelinux.0";
>
> In TFTP config file in /tftpboot/pxelinux.cfg/default I wrote the boot 
> option as
>
> LABEL ccc
> LINUX memdisk
> INITRD ccc.iso
> APPEND raw

When using MEMDISK to boot an .ISO, you need to specify 'iso' on the 
MEMDISK kernel's command-line.  Like this:

LABEL ccc
   KERNEL memdisk
   INITRD ccc.iso
   APPEND raw iso

There is documentation for this inside syslinux/doc/memdisk.txt.  Please 
read it.

> Now I have some problems and parts I don't understand.
>
> 1) I downloaded and 'make + make install'ed the syslinux-4.03 package 
> from git repo. However memdisk is not working when I try ./memdisk . 
> It gives no errors too.

Not a problem.  It's not a Linux program, so it's not supposed to do 
something useful from './memdisk'.

> Only errors I get are about win32 and win64 folders and that's because 
> I don't tun mingw (I guess)
> 2) What should be pxelinux.0 file? I thought it moust be the kernel bu 
> I'm trying to boot from ISO. Should I use memdisk file instead?

This is the sequence you want: PXE boot -> pxelinux.0 -> MEMDISK & 
ccc.iso.  You can try the adjusted config-file entry above.  You can 
also read syslinux/doc/pxelinux.txt.

> I never got a hang of these things except for GRUB. I never managed to 
> make a custom Linux ISO. I tried to boot PCs from network which didn't 
> had any graphics card at all.

You will likely need to read relevant documentation for creating Linux 
.ISOs, such as syslinux/doc/isolinux.txt.

> And I need to boot from network right now. I would really appreciate 
> your help.

Good luck.

- Shao Miller



More information about the Syslinux mailing list