• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

Wine Compatibility Layer and HFS

CABAL

<< ■ II ▶ >>
Staff member
Administrator
Star Navigator
Rogue AI technocrat
Joined
15 Aug 2009
Messages
3,511
Age
33
I thought I would post this here first and then at the Wine forums some time in the morning since it's after midnight here. After much trial and error, I have found a way to avoid the problems created by Linux's use of case sensitivity and Windows' lack of case sensitivity that show up when trying to run a Windows program through Wine on Linux. The solution was surprisingly simple and completely out of left field: throw a little bit of old-school Mac in there.

My first idea was to use an NTFS partition, but as it turns out NTFS is case sensitive and Windows dodges that for some reason. My second idea was to use a FAT32 partition, but that wound up being too limited. After that, I hit the interwebz and found out about the ciopfs program, which sets up a folder and everything inside it to be non-case sensitive. That seemed like a good idea until I learned that it had virtually no documentation and very few people seem to know how to use it. I started getting desperate at this point and went to the Comparison of File Systems page at Wikipedia and found one that seemed to be exactly what I was looking for: the obsolete Mac file system, HFS.

HFS is one of the only file systems that was not case sensitive and supported symbolic links. On top of that, it was the only one that was supported by Linux. Once I found that out, all I had to do was install a tool and do some tinkering.

Before I go any further, I should also mention that I'm using the Ubuntu 11.10 distro and instructions for any other Linux distro may vary.

First I reformatted an old drive to Master Boot Record, just to make sure it was as clean as I could get it, then I installed hfsprogs. After that, I used the mkfs.hfs command to create an HFS partition on the drive and used Nautilus as Root to change the permissions. All I had to do then was cut and paste the Program Files folder in the Wine directory to the HFS partition and make a link to it in its place.

Here are some more detailed instructions. I would recommend reading through them before trying it.

1 - Hook up a fresh hard drive or set up an old hard drive and wipe it using the Disk Utility

2 - Go to the Software Center and install hfsprogs or open a terminal and type
Code:
sudo apt-get install hfsprogs

3 - In a terminal, type
Code:
sudo mkfs.hfs /dev/sdb
but rather than /dev/sdb, you want it to match the ID of the hard drive. To find out what that is, open the Disk Utility, select the drive, and look at the very top of the window. In [brackets] is the ID you want to use. The command will say that it made an HFS+ partition but it really just made an HFS partition. The partition will take up the entire drive so make sure the drive is empty.

4 - Mount the drive, which should be labeled "untitled" (I haven't found a way to name it)

5 - In a terminal, type
Code:
sudo nautilus
to open the Nautilus file browser as Root. Naturally, you will want to use whatever file browser that you use, but Nautilus is the default on Ubuntu.

6 - In the Root Nautilus window, go to the drive, right click on the background, and select Properties. In the Properties window, go to the Permissions tab and change the option "Others Folder Access" from "Access Files" to "Create and Delete Files." Close all windows.

7 - Go to the Wine directory (default .wine in your home folder; you may need to press ctrl+h to see it), and from there go to drive_c. Cut and paste the Program Files folder from there to the HFS drive.

8 - At the HFS drive, right click on Program Files and select Make Link. Cut and paste Link to Program Files back into drive_c and rename it Program Files.

9 - Enjoy.

I still think it's really bizarre that a legacy Mac file system would be the way to get Windows programs to work better on Linux, but I've been testing with a modded Oblivion install and it works great. Go figure.
 
Top