[syslinux] syslinux versus pxelinux

Pascal Vandeputte pascal.vandeputte at intec.ugent.be
Thu May 3 07:24:19 PDT 2007


Geert Stappers wrote:
> Op 02-05-2007 om 18:25 schreef Pascal Vandeputte:
>> Hello,
>>
>> I've been digging some more during the last couple of days [...]
>>
 >> <snip...>
 >>
>> So now I've got a nice ubcd403.img file. If I dd it to a flash drive
>> in /dev/sda I can perfectly boot the "Ultimate Boot CD" from it.
>>
>> So I tend to think the disk image file itself is okay.
>>
>> However, making it available through pxelinux as follows doesn't work:
>>
>>     label ubcd
>>         kernel memdisk
>>         append initrd=images/test/ubcd403.img harddisk
>>
>> The machine just hangs there at "Loading boot sector... booting..."
>>
>>
>> What am I doing wrong?
> 
>   :-)
> 
> 
> Several things, one is asking "What am I doing wrong?"
> 
> <preach>
>    Make the challenge a common challenge by avoiding 'I'.
> 
>    Wrong is the wrong word, there is nothing wrong with a expriment.
>    If an expriment does learn you something, it is good expriment.
> </preach> 

Hmm... Maybe this is the wrong mailing list... :^)

I learnt a lot, but Murphy surely has a hand in this...
atftpd is now swapped out for tftpd-hpa, and other netboot options 
(Knoppix terminal server etc) still work perfectly, but all of a sudden 
the FreeBSD disk image doesn't work anymore! What gives? TFTP'ing a file 
is TFTP'ing a file, isn't it? Instead of seeing the FreeBSD boot loader 
appear there's now only a "Read error" after "Loading boot sector... 
booting...". This should be the BSD boot code speaking.
MEMDISK complains "Image seems to have fractional end cylinder", but 
maybe it did so before already.


> The missing knowlegde ( in fact the missing imagination ) :
> 
>  Syslinux is started from ROM and loads a kernel or program from floppy
>  or other FAT filesystem and starts it.
> 
>  Isolinux is started from ROM and loads a kernel or program from CD
>  and starts it.
> 
>  PXElinux is started from ROM and loads a kernel or program from the
>  network and starts it.

Well... When the FreeBSD image is booted (back in the days when it 
worked :( ), this should be what was going on:

PC BIOS -> NIC PXE BIOS -> pxelinux.0 -> memdisk & freebsd.img
memdisk accesses the MBR in freebsd.img which contains some boot code 
which loads the BSD loader (/boot/loader) which loads the kernel from 
the first partition. (see 
http://www.khmere.com/freebsd_book/html/ch02.html for way more details 
on this)
And it works! (or at least it did with atftpd yesterday...)
And it works on a flash stick too!

So when attempting the same with the Ultimate Boot CD:
PC BIOS -> NIC PXE BIOS -> pxelinux.0 -> memdisk & ubcd403.img
memdisk accesses the MBR in ubcd403.img which contains some SYSLINUX 
boot code which loads the SYSLINUX boot loader (ldlinux.sys) which loads 
whatever it's told to load in syslinux.cfg (i.e. the UBCD menu).

So that boils down to almost the same thing. And the image works on a 
flash stick too. As long as memdisk (the "kernel or program from the 
network" you refer to) finds and starts the right MBR code, what's the 
difference?


> What your expriment proves, is that you have started PXElinux starting
> a syslinux that can't do it's job.

SYSLINUX seems to do it's job just fine from a flash drive, just like 
the BSD loader can, but the same image won't work when memdisk emulates 
it, while the BSD one works (or better: worked... sigh).


Best regards,

Pascal Vandeputte




More information about the Syslinux mailing list