Wine broke my WindowsXP (can't login)

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
helix
Level 1
Level 1
Posts: 5
Joined: Thu Feb 28, 2008 1:01 pm

Wine broke my WindowsXP (can't login)

Post by helix » Thu Feb 28, 2008 1:29 pm

Hi,

I recently wanted to try out the new 0.9.53 version (previously I had 0.9.35 installed), so I downloaded it from http://wine.budgetdedicated.com/archive/index.html (32-bit for Ubuntu Edgy, though I'm on x86_64) and installed it (did dpkg -r wine before), which went fine. Then I went on trying out some programs, but upon starting (say, winecfg), it filled the screen with messages like
err:wineboot:ProcessWindowsFileProtection WFP: L"dpcdll.dll" error 0x800
(about a hundred or so) which I attributed to my Windows C: partition being mounted read-only. It did start, but I didn't want to wait the half-minute, so I re-mounted the C: partition as read-write (which, in hindsight, I shound't have done!) and all went fine...
But, now I can't seem to logon into Windows. It boots up to the login window, but when I actually log into my account, all it shows is the wallpaper.

I ran

Code: Select all

find /c -daystart -type f -mtime 1 -mmin -$((2*24*60-14*60-28)) -mmin +$((2*24*60-14*60-32))
to see what has changed on the C: partition when I ran Wine (which I've narrowed down to the time shown, namely yesterday between 14:28 and 14:32), and it came up with about 1000 files in c:/windows/system32 ...

Has anyone else experienced something similar? Any other ideas what might be the cause? (I first though maybe it has messed up some configuration files, but their modification times are later (well, ok, I did login after all)). Why does Wine have to write to the Windows partition anyway?

Dan Kegel

Wine broke my WindowsXP (can't login)

Post by Dan Kegel » Thu Feb 28, 2008 1:48 pm

On Thu, Feb 28, 2008 at 10:29 AM, helix <wineforum-user@winehq.org> wrote:
... which I attributed to my Windows C: partition being mounted read-only.
It did start, but I didn't want to wait the half-minute, so I
re-mounted the C: partition as read-write (which, in hindsight, I
shound't have done!) and all went fine...
But, now I can't seem to logon into Windows. It boots up to the
login window, but when I actually log into my account, all it shows is the wallpaper.
Hang on a sec. Why were you pointing Wine at a real Windows
partition? Are you saying your Wine's C: was your real C:?
That's not been supported or encouraged for years.

If people are actually doing this, we should consider putting
in a check to make wine abort when it detects this.
- Dan

helix
Level 1
Level 1
Posts: 5
Joined: Thu Feb 28, 2008 1:01 pm

Post by helix » Thu Feb 28, 2008 2:14 pm

I don't think I ever explicitly said Wine to do so, but I went on because I thought it would need some configuration file or the like (although it was obviously searching for dll's, which I thought weren't needed?). And yes, it's a real Windows partition. Maybe, in the past, I configured wine to have its c: as my /c (in winecfg), so it came from there, but I thought that was just for having some paths set up in the Wine environment...

Markus Hitter

Wine broke my WindowsXP (can't login)

Post by Markus Hitter » Thu Feb 28, 2008 5:10 pm

Am 28.02.2008 um 19:48 schrieb Dan Kegel:
Why were you pointing Wine at a real Windows partition?
I did it myself once and have read a lot about others doing the same.
It's just straightforward: point Wine to where all the applications
are. No dual installation for dual booting.
If people are actually doing this, we should consider putting
in a check to make wine abort when it detects this.
Likely a good idea.


BTW., to get a single-installation, dual-booting setup working, a
virtual machine is the appropriate tool: VirtualBox, VMware. Getting
a single Windows installation to boot two different hardwares is a
bit tricky, but it works.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/

helix
Level 1
Level 1
Posts: 5
Joined: Thu Feb 28, 2008 1:01 pm

Post by helix » Thu Feb 28, 2008 5:57 pm

This is what I meant when I said I have its c: as my /c: (/windows/C is the same)
Image

Can anyone please tell me where Wine looks for the path of the system files (some config file supposedly)?
If I get it right, it's supposed to use the system files in ~/.wine/drive_c/windows/system32 or /usr/lib/wine, but apparently mine is looking in the wrong location...

Dan Kegel

Wine broke my WindowsXP (can't login)

Post by Dan Kegel » Thu Feb 28, 2008 6:32 pm

On Thu, Feb 28, 2008 at 2:57 PM, helix <wineforum-user@winehq.org> wrote:
This is what I meant when I said I have its c: as my /c: (/windows/C is the same)
[Image: http://xs124.xs.to/xs124/08094/winecfg606.png ]
The easiest way to fix this is to simply remove your ~/.wine directory.
Wine will create a new one that's set up properly.

Is this an option for you?
Can anyone please tell me where Wine looks for the path of the system files (some config file supposedly)?
It always looks in C:\windows\system32 etc.
So the real question is, what is C: mapped to?
That's controlled by that interface (which manipulates
a symlink c: in ~/.wine/dosdevices).
But again, easiest thing to do is blow away (or rename)
your .wine directory, and let wine recreate it.
- Dan

Duane Clark

Wine broke my WindowsXP (can't login)

Post by Duane Clark » Thu Feb 28, 2008 6:45 pm

helix wrote:
Can anyone please tell me where Wine looks for the path of the system
files (some config file supposedly)?
What "system files" are you referring to? At one time in the distant
past Wine had a config file. That has been gone for quite a number of
years now. Any Wine "configuration" is now done in the registry. These
files are typically ~/.wine/system.reg and ~/.wine/user.reg, though that
location can be changed with the WINEPREFIX environment variable.
If I get it right, it's supposed to use the system files in
~/.wine/drive_c/windows/system32 or /usr/lib/wine, but apparently
mine is looking in the wrong location...
Wine uses "builtin" DLLs from some directory, which is commonly
/usr/lib/wine (as determined by the packager for the Wine package you
installed). It gets "native" DLLs typically from
~/.wine/drive_c/windows/system32, though this location can be changed in
the registry. What makes you think it is using some other locations?

oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm » Fri Feb 29, 2008 3:02 am

What do I have to do to stop users doing this.

Wine and Real Windows are not compad with each other at all.

Think of it of trying to installing windows 2000 and XP in the same directory and expect to use both. Wine can share drives with other wines without many problems. XP can share drive with XP running on different hardware if you are really careful.

Only solution to this is move wine to its own drive C and run a XP repair to remove the wine files from XP. Yep XP not working because Wine altered things to what they should be for wine.

helix
Level 1
Level 1
Posts: 5
Joined: Thu Feb 28, 2008 1:01 pm

Post by helix » Fri Feb 29, 2008 3:26 am

The easiest way to fix this is to simply remove your ~/.wine directory.
Wine will create a new one that's set up properly.

Is this an option for you?
Did that. Errors are gone now. Thanks.
It always looks in C:\windows\system32 etc.
So the real question is, what is C: mapped to?

Wine uses "builtin" DLLs from some directory, which is commonly
/usr/lib/wine (as determined by the packager for the Wine package you
installed). It gets "native" DLLs typically from
~/.wine/drive_c/windows/system32, though this location can be changed in
the registry.
So two paths. Before I wiped ~/.wine just now, C: (in Wine) was symlinked to my real C: partition (as ~/.wine/dosdevices/c). ~/.wine/drive_c was a directory on its own (on the Linux filesystem).
What makes you think it is using some other locations?
The fact that it modified (supposedly, I don't know for sure) some files in /windows/C/windows/system32 -- which I thought Wine wasn't supposed to be looking in, but now know better.
What "system files" are you referring to?
Well, basically those that are equivalent to Windows' own c:/windows/system32 files. To make myself more clear: where is the configuration option (if there is one) contained that tells Wine where to look for the usual *.dll files? Or is that more or less hardcoded? Judging by your answers, it's at least three places: /usr/lib/wine (site-wide), ~/.wine/drive_c/windows/system32 (which is fine, since it's seperate from Windows), and/or ~/.wine/dosdevices/c/windows/system32/, which is bad, beacause of what I did.
What do I have to do to stop users doing this.
Maybe stating somewhere that files in ~/.wine/dosdevices/c etc. are modified by Wine -- I didn't expect that. I thought that these just set up some interfaces to have the windows directories available to Wine, but I didn't expect Wine to write there.
Only solution to this is move wine to its own drive C and run a XP repair to remove the wine files from XP. Yep XP not working because Wine altered things to what they should be for wine.
Could you please give some hints which files those are? I checked some .dll's randomly and at least they seem not to be overwritten by the Wine ones... (they have different md5sums)

oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm » Fri Feb 29, 2008 6:01 am

The fact that it modified (supposedly, I don't know for sure) some files in /windows/C/windows/system32 -- which I thought Wine wasn't supposed to be looking in, but now know better.
It altered files in windows and windows/system32 and some files in program files so yep lots of damage to windows. Basically a killing blow.

Other thing you only want some windows dlls complete box and dice is risky. Ie windows/system32 files transfered into wine must be selected carefully.

Just never link wine to a real windows partition for drive C. Or you are only asking for pain. No point working out what it altered. Running applications that way does not work either since wine and windows has many differences. Like a completely different registry format.

You can use symbolic links from the wine drive c to areas on the normal windows partition. But have to be careful.

Dan Kegel

Wine broke my WindowsXP (can't login)

Post by Dan Kegel » Fri Feb 29, 2008 9:19 am

On Fri, Feb 29, 2008 at 12:26 AM, helix <wineforum-user@winehq.org> wrote:
The easiest way to fix this is to simply remove your ~/.wine directory.
Wine will create a new one that's set up properly.
Did that. Errors are gone now. Thanks.
Yay!
What do I have to do to stop users doing this.
Maybe stating somewhere that files in ~/.wine/dosdevices/c
etc. are modified by Wine -- I didn't expect that.
I thought that these just set up some interfaces to have
the windows directories available to Wine, but I didn't expect Wine to write there.
I'll keep that in mind, maybe we can make it clearer.
Only solution to this is move wine to its own drive C and
run a XP repair to remove the wine files from XP.
Could you please give some hints which files those are?
We have no idea. Try booting from an XP install disk and asking
it to repair your existing installation.
- Dan

Peter Beutner

Wine broke my WindowsXP (can't login)

Post by Peter Beutner » Fri Feb 29, 2008 9:56 am

Dan Kegel schrieb:
On Fri, Feb 29, 2008 at 12:26 AM, helix <wineforum-user@winehq.org> wrote:
What do I have to do to stop users doing this.
Maybe stating somewhere that files in ~/.wine/dosdevices/c
etc. are modified by Wine -- I didn't expect that.
I thought that these just set up some interfaces to have
the windows directories available to Wine, but I didn't expect Wine to write there.
I'll keep that in mind, maybe we can make it clearer.
Don't allow to change the drive mapping for C:\ in winecfg probably would be a good start.
Add some explaining text why (in general) you don't want to change it and explicitly say
that wine has (and needs) its own, separate windows installation (in C:\windows).

helix
Level 1
Level 1
Posts: 5
Joined: Thu Feb 28, 2008 1:01 pm

Post by helix » Fri Feb 29, 2008 10:08 am

Found an old dump of the partition lying around in my home dir. Consider the case solved. Thanks for the answers everyone!

Duane Clark

Wine broke my WindowsXP (can't login)

Post by Duane Clark » Fri Feb 29, 2008 3:34 pm

Peter Beutner wrote:
Dan Kegel schrieb:
On Fri, Feb 29, 2008 at 12:26 AM, helix <wineforum-user@winehq.org> wrote:
Maybe stating somewhere that files in ~/.wine/dosdevices/c
etc. are modified by Wine -- I didn't expect that.
I thought that these just set up some interfaces to have
the windows directories available to Wine, but I didn't expect Wine to write there.
I'll keep that in mind, maybe we can make it clearer.
Don't allow to change the drive mapping for C:\ in winecfg probably would be a good start.
Add some explaining text why (in general) you don't want to change it and explicitly say
that wine has (and needs) its own, separate windows installation (in C:\windows).
Perhaps better would be if winecfg checked whether the drive being
mapped to had a Windows system on it, and popped up a big warning box if
so. I hate having programs tell me I can't do things ;)

Duane Clark

Wine broke my WindowsXP (can't login)

Post by Duane Clark » Fri Feb 29, 2008 3:37 pm

helix wrote:
... To make myself more clear: where is the configuration option (if
there is one) contained that tells Wine where to look for the usual
*.dll files? Or is that more or less hardcoded? Judging by your
answers, it's at least three places: /usr/lib/wine (site-wide),
~/.wine/drive_c/windows/system32 (which is fine, since it's seperate
from Windows), and/or ~/.wine/dosdevices/c/windows/system32/, which
is bad, beacause of what I did.
I believe the /usr/lib/wine is hardcoded, though there might be an
environment variable that would override. You are right in that the
normal path for looking for Windows DLLs is
~/.wine/dosdevices/c/windows/system32/ . Wine does not explicitly check
~/.wine/drive_c/ unless that is where the link points. And as mentioned,
this can be changed with both an environment variable, and in the Wine
registry. In the registry, this is under:
[System\\CurrentControlSet\\Control\\Session Manager\\Environment]
"winsysdir"="c:\\windows\\system32"

Peter Beutner

Wine broke my WindowsXP (can't login)

Post by Peter Beutner » Fri Feb 29, 2008 6:49 pm

Duane Clark schrieb:
Peter Beutner wrote:
Dan Kegel schrieb:
On Fri, Feb 29, 2008 at 12:26 AM, helix <wineforum-user@winehq.org>
wrote: I'll keep that in mind, maybe we can make it clearer.
Don't allow to change the drive mapping for C:\ in winecfg probably
would be a good start.
Add some explaining text why (in general) you don't want to change it
and explicitly say
that wine has (and needs) its own, separate windows installation (in
C:\windows).
Perhaps better would be if winecfg checked whether the drive being
mapped to had a Windows system on it, and popped up a big warning box if
so. I hate having programs tell me I can't do things ;)
The point is that just changing the mapping (for C:) in winecfg won't
really work. You would have to copy over the stuff from the old location
or run wineprefixcreate again.
You would only lose something that doesn't properly work anyway.
Which imo is a good thing. I wouldn't hate programs for that ;).

Besides, I don't really see much practical use in moving the C: drive.
And you can still do it manually if you really need it.

Locked