Page 1 of 4

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 25 Jul 2021, 12:25
by jroovy
Hi! So i created a Porteus usb using Rufus. UEFI mode works fine but when I boot in Legacy mode it says: "Failed to load COM32 file vesamenu.c32"

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 25 Jul 2021, 16:10
by Ed_P
Check the drive's Partition Table and be sure it's not GPT. Legacy systems don't support it.

This thread may help you. UEFI and Legacy - at the same time?

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 25 Jul 2021, 22:10
by Rapha_
I don't think using Rufus is a good way to install Porteus (it could be not the same Syslinux version ) :(

Now, you have to complete the installation of Porteus with the script inside the Usb :

From Linux: in command line (in the good directory) :

Code: Select all

sh Porteus.installer-for-Linux.com
From Windows:

Code: Select all

Porteus-installer-for-Windows.exe
Every things is explained with "install.txt" (in boot/docs )

(I believe that "UEFI mode" don't need install)

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 02:21
by jroovy
Ok, so I tried the steps in Ed_P's post, but now I got this in Legacy: "vesamenu.c32: not a COM32R image"

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 02:24
by jroovy
So i created an MBR on my flash drive, format as Fat32, copied iso contents to the drive, then run the Porteus-installer-for-Windows.exe, and it gives me that error above when I boot to Legacy.

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 04:11
by Ed_P
I admire your persistence jroovy. :good: Which DE ISO are you working with?

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 04:35
by jroovy
MATE iso

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 07:28
by jroovy
Ok, so I solved the problem by doing this:

1) Copy the Porteus 5.0 rc3 iso contents to the flash drive
2) Run the Porteus-installer-for-Windows.exe
3) Replace all matching .c32 files in the drive's "./boot/syslinux/" with the ones from a Porteus 4.0 iso

And now it boots in both Legacy and UEFI mode :)


So I think the problem is this:

On Porteus 5.0 iso, the .c32 files are:

Code: Select all

$ file *.c32
chain.c32:    ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
ldlinux.c32:  ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
libcom32.c32: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
libutil.c32:  ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
reboot.c32:   ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
vesamenu.c32: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
While on the Porteus 4.0 iso:

Code: Select all

$ file *.c32
chain.c32:    COM executable (32-bit COMBOOT, relocatable)
vesamenu.c32: COM executable (32-bit COMBOOT, relocatable)
Legacy BIOS can't read ELF files, is what I'm guessing

Hope this helps :)

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 09:06
by raja
blaze, I think ,Porteus Insataller for windows.exe,still has syslinux-4.07 version of syslinux,where as you have replaced all files in syslinux folder with version -6.03.

This link gives all files including syslinux.exe (32bit) and syslinux64.exe downloaded from kernel.org. version-6.03

Please redo windows installer with these two exe files. At present , it has got syslinux.com file for windows95 and syslinux.exe for winNT, (both 4.07 version) The batch file to be modified, find system architecture, if win32 ,goto andf execute "syslinux.exe, else if it is 64bit goto and execute, syslinux64.exe

Since many people land into trouble, with this, please attend.

https://www.mediafire.com/file/to0iadpk ... ar.gz/file

The 'bios' folder has got all files needed .

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 26 Jul 2021, 12:27
by Ed_P
Wow! :o Good analysis guys. :thumbsup: Thank you.

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 27 Jul 2021, 00:18
by ncmprhnsbl
thanks raja,
here's a quick one to try: p-i-f-w.zip
i just changed the syslinux.com and syslinux.exe files and didn't touch the installer.bat for now, so it's 32bit only still(i'm guessing windows 64 is still backwards compatible with this)
raja wrote:
26 Jul 2021, 09:06
The batch file to be modified, find system architecture, if win32 ,goto andf execute "syslinux.exe, else if it is 64bit goto and execute, syslinux64.exe
the question is, how exactly?
this is what it looks like now: (relevant section)
installer.bat:

Code: Select all

if %OS% == Windows_NT goto SetupNT
goto Setup95

:SetupNT
%~dp0syslinux.exe -maf -d \%folder%\boot\syslinux %drive%:
if %ERRORLEVEL% == 0 goto Done
goto Error

:Setup95
%~dp0syslinux.com -maf -d \%folder%\boot\syslinux %drive%:
if %ERRORLEVEL% == 0 goto Done
goto Error
what should "%OS% == ?" be to detect windows architecture?
or some other query to specifically ask architecture?
another question is: do we need to support windows 95 with syslinux.com? does anybody still use that?
i'm guessing that "Windows_NT" catches any post XP version of windows ..?
to mess around with this, i've used file-roller and p7zip, since .exe is apparently an archive format..
here's p7zip for 5.0rc3: p7zip-16.02-x86_64-4_ncm.xzm
(since 7-zip doesn't play nice)

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 27 Jul 2021, 11:14
by raja
Hope this will work.

Code: Select all

IF EXIST "%PROGRAMFILES(X86)%" GOTO 64BIT ELSE GOTO 32BIT

:64BIT
%~dp0syslinux64.exe -maf -d \%folder%\boot\syslinux %drive%:
if %ERRORLEVEL% == 0 goto Done
goto Error

:32BIT
%~dp0syslinux.exe -maf -d \%folder%\boot\syslinux %drive%:
if %ERRORLEVEL% == 0 goto Done
goto Error

error and done to be added.

*info

echo %PROCESSOR_ARCHITECTURE%
if %PROCESSOR_ARCHITECTURE% == x86 GOTO 32BIT ELSE GOTO 64BIT

* after thought made me to discourage above, since ,there could be people who may be running winxp 32 bit in a 64 bit processor machine.
Anyway as you said, syslinux.exe can be executed in both and should suffice. Moreover , both use same syslinux.c source and only elf info inputted during compile.

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 27 Jul 2021, 11:55
by ncmprhnsbl
thanks again raja,
here: p-i-f-w-2.zip is with the above in the installer.bat with syslinux.exe and syslinux64.exe.
for windows users to test please..

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 27 Jul 2021, 13:36
by jroovy
ncmprhnsbl I've just tried it, doesn't work :(
Tried running it as normal user and administrator, doesn't work
It gives me the popup: "This app can't run on your PC"

I'm on Windows 10 64bit (LTSC 2019)

Unable to boot Porteus 5.0 rc3 in Legacy mode

Posted: 27 Jul 2021, 15:57
by beny
hi jroovy when you have this message on desktop "vesamenu.c32: not a COM32R image" hit the tab key maybe you have a list of boot option you can choose one,try if work for you..