[syslinux] Question of syslinux chainloading

Ady Ady ady-sf at hotmail.com
Tue Apr 9 10:20:46 PDT 2019


Before I reply on-topic, I'd like to request from people participating in this 
public mailing list to _avoid_ top-posting whenever possible, and when 
replying, please quote what's relevant only. Now, back to the topic.


> "
> Booting...
> Error loading operating system_
> "
> at the bottom of screen and hangs. I can only reboot using ctrl-alt-del.
 
 
AFAIR, "Error loading operating system" is a message that is part of the boot 
code of Windows. This suggests that chain.c32 is not exactly failing; either 
something in the MBR/PBR of the HDD would need some (temporal) modification, or 
chain.c32 would require some additional parameter and/or option in order to 
"cheat" the Windows' boot sequence (for the latter to succeed).


> > Test #2: if you unplug the USB and reboot the system, can you successfully boot 
> > directly to the HDD's OS?
> > 
> Yes. The only HDD, NTFS, WindowsXP native boot loader ntldr.
 
 
Let me rephrase my question. It was/is clear that you used to be able to boot 
Windows when the first boot device was the HDD. Then you used the USB as first 
boot device. My question is, whether now (after you have been "playing" with 
this USB device) you can still repeat the former successful boot when using the 
HDD alone, as it used to be. Maybe this is also the intention of your answer, 
but I would like to be sure we are both referring to the same thing / scenario 
/ case. So, can you (still)?


> > Test #3: Add an entry to your syslinux.cfg:
> > 
> > label hd1_1
> > com32 chain.c32
> > # Boot to first partition of ...
> > # There is a space character before the partition number.
> > append hd1 1
> > 
> That will change the error message to one line "Booting..." only and
> still hang. Change hd1 to hd0 will loop back to syslinux menu, which is
> expected. And "localboot 0x80" fails too.
 
 
Well, the "booting" message alone might come from any number of alternatives.

The failure of "localboot 0x80" directive is not very helpful in this case, 
since we don't even know how exactly this BIOS is recognizing the local HDD. 
There is some chance that "localboot 0x81" (not "80") might work successfully, 
but I wouldn't bet on it.

In either case, these two failures do not help us in narrowing down the 
problem; it could be chain.c32, or SYSLINUX, or, as said before, the (MBR/VBR) 
boot code of Windows.


> >> label loadhd
> >> menu label Boot from local ^NTLDR
> >> com32 chain.c32 ntldr=/ntldr
> >>
> This ntldr is on the usb-hdd disk, with a boot.ini setting point to the
> fixed hard disk:
> multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP
> Professional" /noexecute=optin /fastdetect
> and it can successfully boot the fixed hard disk. But I think "com32
> chain.c32 hd1" should be more direct.
 
 
Perhaps the Windows' (MBR/VBR) boot code is having some problem with the fact 
that the HDD is not really the first boot device in the eyes of the BIOS, and 
so its boot partition is not really the "boot partition of the first boot 
device".

Please try (and please, use the 'append' directive):

label hd1_1_swap
com32 chain.c32
# Boot to first partition of ...
# There are space characters, before and after the partition number.
append hd1 1 swap

If that fails too, try:

label hd1_swap
com32 chain.c32
# Boot to first partition of ...
# There is a space character after the disk number.
append hd1 swap



> >> #This item fails
> >> label dos
> >> menu label MS-^DOS 7.1
> >> com32 chain.c32 msdos7=io.sys
> >  
> >  
> > Where exactly the files needed to boot MSDOS 7.1 are located?
> > 
> > Do you have the module file "ls.c32" in the USB? If you have it, you could:
> > 
> > 1_ From the Syslinux boot menu, press [Esc] in order to get to the boot prompt.
> > 
> > 2_ At the boot prompt, type in "ls.c32" and press [Enter].
> > 
> > The result should list the files that are included in the current working 
> > directory. Are the files needed to boot MSDOS 7.1 listed?
> > 
> I can get the file list using "dir /a/o" after booting to a dos floppy
> image item or my hard disk OS:
 
 
Part of the intention in using ls.c32 was to list the content of the "Syslinux' 
working directory", exactly as the bootloader is currently acting. Listing the 
contents by other means is "half" the help.


> 2019-03-04  22:37    <DIR>          chntpw
> 2019-03-04  22:51    <DIR>          dos
> 2019-03-05  22:11    <DIR>          green
> 2019-03-04  22:48    <DIR>          memtest
> 2019-03-05  00:32    <DIR>          MiniPE
> 2019-03-05  16:59    <DIR>          syslinux
> 2019-04-02  12:01               542 BOOT.INI
> 2019-03-31  08:56               512 BOOTSECT.W98
> 2008-06-01  00:00            94,292 COMMAND.COM
> 2008-06-01  00:00           125,960 IO.SYS
> 2019-04-04  19:13           122,308 ldlinux.c32
> 2019-04-04  19:13            69,632 ldlinux.sys
> 2014-10-07  00:29            26,140 memdisk
> 2013-10-23  10:58                 0 MSDOS.SYS
> 2019-01-31  20:18           199,178 mtldr
> 2008-04-14  20:00            47,564 ntdetect.com
> 2008-04-14  20:00           257,728 ntldr
> 2019-04-05  17:28             1,398 syslinux.cfg
> 
> In the list, ldlinux.c32,  ldlinux.sys, memdisk (I found it could only
> be put into root folder), syslinux.cfg are syslinux files; ntldr,
> ntdetect.com, BOOT.INI are ntldr files (which can chain-boot
> successfuly); mtldr is for booting to MiniPE(which is actually grldr
> from Grub4dos and can chain-boot successfuly).
> 
> IO.SYS and COMMAND.COM are copied from a Windows98 system on another
> computer, which is MSDOS7.1; and BOOTSECT.W98 is from Bootpart tool (I
> compared it with the one from my Windows98 system, and I think they are
> basically the same except label name, so I use this one), but I think if
> io.sys is loaded, boot sector should be of no use. I have tried "boot
> BOOTSECT.W98" and "bss BOOTSECT.W98" without success, so I'd like to
> jump over it and get to IO.SYS directly.
 
 
Would you please try using the equivalent files for FreeDOS in the USB? You can 
see the options for chain.c32 in the Syslinux wiki. There are at least 2 wiki 
pages relevant for chain.c32, so I would suggest taking a look at both of them.

BTW, which exact version of SYSLINUX are you using? Is your chain.c32 from the 
same exact package / version? FYI, different versions should not be mixed, and 
the options that chain.c32 actually supports depend on the exact version (with 
some backward incompatibilities too).

Regards,
Ady.



More information about the Syslinux mailing list