[syslinux] specifying 'root' for mboot.c32/syslinux

Bernd Blaauw bblaauw at home.nl
Fri Aug 5 19:33:52 PDT 2011


I'm currently trying to integrate ReactOS's bootloader into my concept 
bootdisk with standard layout. It uses Syslinux 4.10pre15.

This is failing on two parts:
1) bootsector method only works if specifying huge cluster size (16KB)
2) Multiboot method fails due to opening bootloader's configuration file 
from harddisk instead of bootdisk.

[http://www.reactos.org/wiki/Boot_FreeLoader_from_GRUB] shows setting 
root in GRUB before loading /FREELDR.SYS, the ReactOS bootloader. Is 
there an equivalent way for Mboot.c32 to specify root? Setting it as an 
append option didn't work:

[/boot/syslinux.cfg:]
LABEL 2
COM32 /boot/mboot.c32
append /freeldr.sys root=fd0

ReactOS bugreport: http://www.reactos.org/bugzilla/show_bug.cgi?id=6342


FreeLDR's config file search code looks like this:
(guess I need to hack it sometime/somehow, as it seems doubtful any 
overriding commands are taken into account).
[ 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inifile/ini_init.c?view=markup 
]

#include <freeldr.h>
    21
    22 static LONG IniOpenIniFile(ULONG* FileId)
    23 {
    24   CHAR FreeldrPath[MAX_PATH];
    25   LONG ret;
    26
    27   //
    28   // Create full freeldr.ini path
    29   //
    30   MachDiskGetBootPath(FreeldrPath, sizeof(FreeldrPath));
    31   strcat(FreeldrPath, "\\freeldr.ini");
    32
    33   // Try to open freeldr.ini
    34   ret = ArcOpen(FreeldrPath, OpenReadOnly, FileId);
    35
    36   return ret;
    37 }
    38
    39 BOOLEAN IniFileInitialize(VOID)
    40 {
    41   FILEINFORMATION FileInformation;
    42   ULONG FileId; // File handle for freeldr.ini
    43   PCHAR FreeLoaderIniFileData;
    44   ULONG FreeLoaderIniFileSize, Count;
    45   LONG ret;
    46   BOOLEAN Success;
    47
    48   //
    49   // Open freeldr.ini
    50   //
    51   ret = IniOpenIniFile(&FileId);
    52   if (ret != ESUCCESS)
    53   {
    54     UiMessageBoxCritical("Error opening freeldr.ini or file not 
found.\nYou need to re-install FreeLoader.");
    55     return FALSE;


Just for the record, I'm having a way easier time with iPXE here 
(compared to ReactOS) as it allows overriding/specifying commands, 
ignoring the embedded demo script :)

label 9
kernel /boot/ipxe.krn
append dhcp && sanboot --drive 0x81 
http://boot.ipxe.org/freedos/fdfullcd.iso




More information about the Syslinux mailing list