5

A Windows game refuses to save any games because it claims there's no disk space free. I've used XP and 98 modes in winecfg, and this is a 32-bit wineprefix (at least, I'm pretty sure it is; not sure how to confirm). My suspicion is that it's the old favourite problem of having more than 2GB free space, for which we used to have a little fix script back when we used OS/2 and there were DOS programs that had trouble. Is there a way to get Wine to announce less disk space than there actually is?

edit for version numbers: Debian Testing (Stretch), Wine 1.8.5 as distributed by Debian.

1 Answer 1

3

Without much knowledge of Wine, I'd work around that problem making the program happy and giving it a disk that is smaller than 2 GB.

It's very simple. First, create a file filled with 0s that is 512 MB (or more, but less than 2048):

dd if=/dev/zero of=smalldisk.img bs=1M count=512

Next, format it using the default file system:

mkfs smalldisk.img

Move the existing directory to a temporary name:

mv .wine-demo .wine-demo-orig

Mount the new disk as a loop device at the original location:

sudo mount smalldisk.img .wine-demo
sudo chown your-user-name: .wine-demo

Copy the entire tree in:

cp -r .wine-demo-orig/* .wine-demo

And run the program from there. If it still doesn't work, then you'll need a different solution.

(There is, unfortunately, a chance that it won't work. If it can't handle 2 GB of disk space, it will probably not handle 2 GB of RAM...)

Provided it works, I suggest your unmount it and put it in your /etc/fstab:

/path/to/smalldisk.img /path/to/mount ext4 auto,noexec,rw,loop,fmask=0177,dmask=0077,user 0 0

In this line fmask and dmask are mask permissions for files and directories. Notice that they are the opposite of what you would use with chmod. That is, 7 stands for no permissions (---) and 0 stands for full permissions (wrx). Read more here: fstab Permission Masks Explained.

5
  • I'll give this a shot. Any particular reason for using vfat here?
    – rosuav
    Commented Jan 7, 2017 at 21:59
  • In fact, I can't put a wineprefix on a vfat volume, as it uses symlinks. So I'm trying this with ext4.
    – rosuav
    Commented Jan 7, 2017 at 22:08
  • No specific reason, just thought it was playing safe, since I'm not versed in Wine.
    – giusti
    Commented Jan 7, 2017 at 22:30
  • 1
    Yay! It's working. I'll suggest edits that will make your answer ready to accept!
    – rosuav
    Commented Jan 8, 2017 at 7:01
  • I suspect the cause of the problem could be a 64 to 32 bug in the wine, or a limitation of the win98/winxp api. Also I faced this problem, but unfortunately this workaround did't come in my mind. Wonderful solution!
    – peterh
    Commented Feb 11, 2017 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .