Help needed on Linux, NTFS and 16bit exe files

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Help needed on Linux, NTFS and 16bit exe files

Post by MikeGL »

Hope some Linux users here can help me and enlighten me on my problem.

My harddisk is using ReiserFS and I have decided and formatted half of this harddisk into NTFS using GNU/Linux formatting utils. After creating this NTFS using Linux, I have installed Windows OS on this partition. All Win32 programs runs fine in this NTFS partition (built by Linux) including system files and other applications. But this NTFS doesn't recognize Win16 applications. Is there some difference between NTFS (built by my Windows CD) and NTFS (created by Linux) ?

Of course I have a bunch of 16bit programs which previously worked fine if I run them all on a natively created NTFS by Win7 and Win Vista. But those same programs (all of them) WON'T run on Linux formatted NTFS.

Is this common or is the propreitary NTFS of windows a bit different than the one created by GNU/Linux?
jordanbray
Posts: 52
Joined: Mon Aug 11, 2014 3:01 am

Re: Help needed on Linux, NTFS and 16bit exe files

Post by jordanbray »

I'm not sure this is the best place to ask this question, however I'm nearly 100% sure this isn't a filesystem issue. The filesystem should make no difference as to what the operating system will run.

There probably are differences between the NTFS built by windows and NTFS-utils in linux, but I can almost guarantee that this is a windows configuration/update/setup issue, not a filesystem issue.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Help needed on Linux, NTFS and 16bit exe files

Post by MikeGL »

Ok noted. Already tried google for nearly an hour but can't find a similar
problem. Will re-try to search the interwebz again :wink:


I have a very strong feeling it is related to the filesystem because I have
copy/paste the same setup on NTFS which is natively formatted by Win32,
and all dos programs runs on the same setup, same config (registry), and
same system folders and system files, only difference is filesystem built by
Win32 this time. (ok different MBR too, because of that GRUB by GNU/Linux on startup)


Or maybe this is a bug on the util itself which needs some reporting.
Anyway, will try to swim deeper on the web using google again.


scratching my head regards,
zd3nik
Posts: 193
Joined: Wed Mar 11, 2015 3:34 am
Location: United States

Re: Help needed on Linux, NTFS and 16bit exe files

Post by zd3nik »

This is probably way off the mark, but when you say you copy/pasted everything it makes me wonder exactly how many things you copy/pasted. If you used the copy/paste buffer for your binaries perhaps somewhere in that process line ending characters got translated (which would corrupt binaries in most cases).

Like I said, this is probably way off the mark, by whenever I see copy/paste when talking about windows/linux/mac I cringe...
jordanbray
Posts: 52
Joined: Mon Aug 11, 2014 3:01 am

Re: Help needed on Linux, NTFS and 16bit exe files

Post by jordanbray »

zd3nik wrote:This is probably way off the mark, but when you say you copy/pasted everything it makes me wonder exactly how many things you copy/pasted. If you used the copy/paste buffer for your binaries perhaps somewhere in that process line ending characters got translated (which would corrupt binaries in most cases).

Like I said, this is probably way off the mark, by whenever I see copy/paste when talking about windows/linux/mac I cringe...
I kinda thought something similar may have happened in that one of the executables got corrupted somehow.

The two things I would do here are: (1) use a utility like cmp to see if the files are *really* the same, or (2) use a utility like file to see if the executable is in fact still a 16-bit executable.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Help needed on Linux, NTFS and 16bit exe files

Post by MikeGL »

While inside LinuxMint I just copied everything inside from the offending Win32 partition (which can't run 16bit apps), into another NTFS partition natively built by Win32. (It is just bare OS with no data files and no movies so the copying was quick). Win OS on this fresh NTFS (built by Win32) boots up, I grab my external HD where my 16-bit chess programs are, executed them and they seem to work. Well, an offtopic side effect I noticed is that all permissions of system files were changed to "Everyone", instead of "System", "Administrators", "Users" once I copied everything from NTFS-3G into NTFS(built by Win32), I digress.

Strangely the 16bit exe's are working on this Win32 running on NTFS built by Win32. I prefer the GUI utils of Mint compared to partitioning/formatting tools of Win32, so I always partition and reformat everything inside Mint, except for this tiny bug which won't allow me to run my 16bit windows programs.

edit: can you elaborate further as to what is converted on the last line of filenames? I have read, on the web, that special characters can't be included in Win32 folders names, but GNU/Linux allows special chars in dir names.

edit: I think I got your point, line ending chars like 0x0D, 0x0A (CR/LF) converted by Linux into 0x0D (CR) only. But I don't think Linux will modify those things without me telling to do it.
zd3nik
Posts: 193
Joined: Wed Mar 11, 2015 3:34 am
Location: United States

Re: Help needed on Linux, NTFS and 16bit exe files

Post by zd3nik »

Regardless of whether line ending conversions have anything to do with it, you should probably just take a moment to verify the copied files are the same as the originals.

Like Jordan suggested you could use 'file' to verify the copy still has the header of a 16-bit executable. And the 'cmp' command will tell you if the copy is the same as the original. The 'diff' command would also do the trick, but doesn't provide as much feedback when there is a difference.

If none of those commands are available (which is highly unlikely if you're using Linux Mint) you could just verify checksums with 'sha1sum' or 'md5sum'.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Help needed on Linux, NTFS and 16bit exe files

Post by MikeGL »

Noted. Thanks
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: Help needed on Linux, NTFS and 16bit exe files

Post by stegemma »

The problem is to run 16 bit windows programs or 16 bit DOS program that usually were run on windows?
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Help needed on Linux, NTFS and 16bit exe files

Post by MikeGL »

stegemma wrote:The problem is to run 16 bit windows programs or 16 bit DOS program that usually were run on windows?
Actually the binary is a compiled 32-bit console version for Windows.
But it has a binary extension (plugin utilities) which was compiled for and can run on DOS, OS/2, Win32.
I Don't have the skill to dig deeper on whether the error was due to 16bit plugin utilities or the 32bit exe program. The output error on command line is:
Cannot execute C:\DOCUMENTS AND SETTINGS\MIKE\DESKTOP\THEOLDEXECUTABLE.EXE

Nevermind, I am sure it is the 16bit plugins which causes the error. Because other 32bit console version of UCI engines does work, except for other native 16bit apps. I will search some Windows API or some documentation on that error. I think searching the header files of VC++ or other win compilers will be a good start.