Wine and /home partition woes on Gentoo/amd64

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Itzamna
Level 1
Level 1
Posts: 5
Joined: Mon Apr 27, 2009 8:45 am

Wine and /home partition woes on Gentoo/amd64

Post by Itzamna »

I apologize if the question has been posed before, but I did not find any similar posts by browsing or searching through the forums. Here it goes:

I have been using Gentoo Linux for a year now, and never have I had a problem I couldn't solve. However, not long ago I bought a 1 TB hard disk which I divided into 7 partitions: /boot, (swap), /, /var, /tmp, /usr and /home (yes, that's FreeBSD influence right there). When I finished compilation of Wine, I found I could no longer install DirectX. Age of Empires III, Black & White II and Unreal Tournament III wouldn't install either - it wouldn't budge. These are the errors DXSetup produces:

Image

Image

(the console only displays a 'status 43' message, I don't even know what the hell that means)

I figure it has to have something to do with permissions, as somehow the program can't write to my /home partition. I fiddled around with /etc/fstab and octal permissions all day, to no avail. This is my current configuration:

Code: Select all

/dev/sda1		/boot		ext2		noauto,noatime	1 2
/dev/sda2		none		swap		sw	0 0
/dev/sda4		/		ext4		noatime	0 1
/dev/sda5		/var		ext4		noatime	0 0
/dev/sda6		/tmp		ext4		noatime	0 0
/dev/sda7		/usr		ext4		noatime	0 0
/dev/sda8		/home	ext4		noatime,users,rw,exec	0 0
/dev/scd0		/mnt/cdrom	auto		noauto,ro	0 0
shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0
As you can see, my /home partition and all its subdirectories have full drwxrwxrwx (777) permission. Also, my /home/${user} folder is owned by {user}:{user}.

Wine detects all partitions and drives perfectly:

Image

My Wine version is 1.1.20 (the problem persists after downgrading to stable), my O/S is Gentoo 64-bit (on kernel 2.6.28-r5), I have compiled all emul-linux-x86 libraries, all partitions except for /boot are ext4.

Can anyone help me out? I'm going bald from stress here. Thanks in advance,

Itzamna

P.S.: I have done all the standard fix attempts, like deleting my ~/.wine folder, reemerging wine, installing a different wine version, ..., so please dream up a useful solution.
John Drescher

Wine and /home partition woes on Gentoo/amd64

Post by John Drescher »

I have been using Gentoo Linux for a year now,
Since early 2004 here on 30 to 50 machines (real or virtual hw)
between home and work.
and never have I had a problem I couldn't solve. However, not long ago I bought a 1 TB hard disk which I divided into 7 partitions: /boot, (swap), /, /var, /tmp, /usr and /home (yes, that's FreeBSD influence right there). When I finished compilation of Wine, I found I could no longer install DirectX. Age of Empires III, Black & White II and Unreal Tournament III wouldn't install either - it wouldn't budge. These are the errors DXSetup produces:
You should NEVER install DirectX under wine.

John
Martin Gregorie

Wine and /home partition woes on Gentoo/amd64

Post by Martin Gregorie »

On Mon, 2009-04-27 at 10:00 -0500, Itzamna wrote:
I figure it has to have something to do with permissions, as somehow
the program can't write to my /home partition. I fiddled around
with /etc/fstab and octal permissions all day, to no avail. This is my
current configuration:
Actually, you haven't posted the permissions for /home, which of course
would be the output from 'ls -l /home', but its possible you've managed
to run out of room in a partition. The best way to see that is by
running:

df -h

FWIW Fedora distros run this as part of the overnight logwatch report -
I'd imagine Gentoo does something similar. If you don't want to login as
root every day to read the system mail messages you can redirect the,m
to your usual mail account. Add the redirect by editing /etc/aliases and
then run 'newaliases' to update the aliases database. 'man aliases'
describes the file format and how its used.


Martin
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Wine and /home partition woes on Gentoo/amd64

Post by austin987 »

On Mon, Apr 27, 2009 at 10:26 AM, John Drescher <[email protected]> wrote:
I have been using Gentoo Linux for a year now,
Since early 2004 here on 30 to 50 machines (real or virtual hw)
between home and work.
and never have I had a problem I couldn't solve. However, not long ago I bought a 1 TB hard disk which I divided into 7 partitions: /boot, (swap), /, /var, /tmp, /usr and /home (yes, that's FreeBSD influence right there). When I finished compilation of Wine, I found I could no longer install DirectX. Age of Empires III, Black & White II and Unreal Tournament III wouldn't install either - it wouldn't budge. These are the errors DXSetup produces:
You should NEVER install DirectX under wine.
No...there are a few cases where it is needed, though d3dx9 is
preferred (from winetricks).

Where are you running the executable from? Is it one of the noexec partitions?


--
-Austin
Itzamna
Level 1
Level 1
Posts: 5
Joined: Mon Apr 27, 2009 8:45 am

Post by Itzamna »

Thanks for the swift replies.

This is the output of df -h:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda4             510M  326M  158M  68% /
udev                   10M  196K  9.9M   2% /dev
/dev/sda5             4.0G  240M  3.6G   7% /var
/dev/sda6             510M   19M  466M   4% /tmp
/dev/sda7             9.9G  6.6G  2.9G  70% /usr
/dev/sda8             895G  168G  682G  20% /home
shm                   2.0G     0  2.0G   0% /dev/shm
/dev/sdb1             230G  162G   56G  75% /media/disk
None of my partitions seem full, so no problems there. The permissions of my /home directory are all drwxrwxrwx or -rwxrwxrwx, I can't imagine that's the problem either. I don't want to mount /usr with the exec option, as that would be a huge security risk.

Is there anyone who has a clue?
Martin Gregorie

Wine and /home partition woes on Gentoo/amd64

Post by Martin Gregorie »

On Mon, 2009-04-27 at 11:36 -0500, Itzamna wrote:
None of my partitions seem full, so no problems there.
OK
The permissions of my /home directory are all drwxrwxrwx or
-rwxrwxrwx, I can't imagine that's the problem either.
OK
I don't want to mount /usr with the exec option, as that would be a
huge security risk.
Well, considering that /usr contains just about all executables except
those that are needed at boot time you might want to reconsider that.

The standard places to look for executables are

/bin - programs used during the boot process
/sbin - privileged programs used during the boot process
/usr/bin - all programs in a distro's optional packages
and extras
/usr/sbin - all privileged programs in a distro's optional
packages and extras
/usr/local/bin } these are where all non-distro programs should go,
/usr/local/sbin } i.e binary downloads and locally compiled programs.
This rule is commonly ignored though its a sensible
distinction.

So, in general, the /usr partition *should* be exec rather than noexec.


Martin
Itzamna
Level 1
Level 1
Posts: 5
Joined: Mon Apr 27, 2009 8:45 am

Post by Itzamna »

I have traced the problem to gnome-volume-manager and HAL. Somehow HAL can't play nice with /etc/fstab. When I have found the solution, I'll post it here.
Itzamna
Level 1
Level 1
Posts: 5
Joined: Mon Apr 27, 2009 8:45 am

Post by Itzamna »

I have spent hours looking for a solution through fixing the Nautilus file access bug, but I ended up devising a workaround.

If, for example, I want to run Neverwinter Nights II in the ~/games/nwn2/ directory*, I simply copy the required DLLs into the directory and set the WINEPREFIX environment variable for that particular Wine session:

Code: Select all

WINEPREFIX=~/games/nwn2/ wine nwn2.exe
Of course, don't forget adding DLL overrides with the correct environment variable:

Code: Select all

WINEPREFIX=~/games/nwn2/ winecfg
Problem solved. :) I hope this is of use to anyone.

* The tilde, ~, stands for the user's home directory: /home/${user}. ~/games/nwn2/ is the ${user}/games/nwn2 directory on the /home partition.
Last edited by Itzamna on Wed Apr 29, 2009 10:55 am, edited 1 time in total.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Wine and /home partition woes on Gentoo/amd64

Post by austin987 »

On Wed, Apr 29, 2009 at 9:46 AM, Itzamna <[email protected]> wrote:
I have spent hours looking for a solution through fixing the Nautilus file access bug, but I ended up devising a workaround.

If, for example, I want to run Neverwinter Nights II in the ~/games/nwn2/ directory, I simply copy the required DLLs into the directory and set the WINEPREFIX environment variable for that particular Wine session:

Code:
WINEPREFIX=~/games/nwn2/ wine nwn2.exe



Of course, don't forget adding DLL overrides with the correct environment variable:


Code:
WINEPREFIX=~/games/nwn2/ winecfg



Problem solved. :) I hope this is of use to anyone.
Where were they before? Is ~/games on a different partition?

--
-Austin
Itzamna
Level 1
Level 1
Posts: 5
Joined: Mon Apr 27, 2009 8:45 am

Re: Wine and /home partition woes on Gentoo/amd64

Post by Itzamna »

austin987 wrote:Where were they before? Is ~/games on a different partition?

--
-Austin
The tilde stands for my home directory: /home/${user}, so ~/games stands for /home/itzamna/games/. I don't know the exact mechanism by which this workaround operates, but I think it has something to do with GVFS (Gnome's virtual file system), as it has its own subset of permissions. I must say, my Gentoo box sure is secure!
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Wine and /home partition woes on Gentoo/amd64

Post by austin987 »

On Wed, Apr 29, 2009 at 10:52 AM, Itzamna <[email protected]> wrote:
austin987 wrote:
Where were they before? Is ~/games on a different partition?

--
-Austin
The tilde stands for my home directory: /home/{user}, so ~/games stands for /home/itzamna/games/.
I'm aware. I wasn't sure if you had it symlinked elsewhere. If your
home directory is mounted exec, there shouldn't be any difference
between ~/games/foo and ~/.wine/.

--
-Austin
Locked