On 2019-4-5 11:28, Ady Ady via Syslinux wrote:>> >> #This item fails >> label normal >> menu default >> menu label Boot from ^hard disk >> com32 chain.c32 hd1 > > >>From the Syslinux boot menu, press [Esc] in order to get to the boot prompt. At > the boot prompt, type in: > > normal > > and press [Enter]. > > Is there any (error) message then? Where/how exactly this fails? What exactly > happens after the message(s)? >It shows: " Booting... Error loading operating system_ " at the bottom of screen and hangs. I can only reboot using ctrl-alt-del.> 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.> 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.> >> >> 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.>> #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: 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. -- Regards, Lu Wei IM: xmpp:luweitest at riotcat.org PGP: 0xA12FEF7592CCE1EA
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.
On 2019-4-10 1:20, Ady Ady via Syslinux wrote:>>> 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)?Yes. Whether with or without USB device plugged in, BIOS can boot to Windows on fixed HD . I set boot preference to USB first, so with USB plugged in, I press F12 to change BIOS boot order. Or I can set boot preference to fixed HD first, both OK.> > > 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. >I tried this, it worked! And I tried localboot 0x80 again, it worked this time! I cannot make sure what has changed since last try. Anyway, localboot 0x80|0x81, or 0x00, or 0x any digit, or localboot only without numbers, will show two line quickly: Booting from local disk... Boot error Then jump to fixed HD's boot.ini menu and boot normally.> > 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 >Both succeeded smoothly, without any error message. I tried "hd0 swap", yet it is same to "hd0", so it is not swapping 0 and 1 as I think. I also tried not using 'append' directive. It works too. Would you please explain the difference of one-line directive and using extra 'append' line? I'll reply with DOS part in another sub-thread. -- Regards, Lu Wei IM: xmpp:luweitest at riotcat.org PGP: 0xA12FEF7592CCE1EA
On 2019-4-10 1:20, Ady Ady via Syslinux wrote:>>>> #This item fails >>>> label dos >>>> menu label MS-^DOS 7.1 >>>> com32 chain.c32 msdos7=io.sys >> >> 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. >FreeDOS equivalent file of io.sys is kernel.sys, (both use command.com as CLI shell), and can successfully boot by: com32 chain.c32 freedos=kernel.sys> 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). >I downloaded syslinux-6.03.zip from official site, and extracted all files in \bios to H:\syslinux (sub-directory structure not retained to reduce path command in syslinux.cfg), except later I found memdisk do not honor path command and moved it to root. So they must be same version. -- Regards, Lu Wei IM: xmpp:luweitest at riotcat.org PGP: 0xA12FEF7592CCE1EA