English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 02 December 2016, 23:10   #1
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
IDE hard drive write fails on Windows 10

My favorite way of testing IDE support in EmuTOS is to use an external USB drive. I mount it into WinUAE using "Add Hard Drive..." in mode "A600/A1200/A4000".

This worked perfectly (read and write) on Windows XP.

On Windows 10 64-bit (and also Windows 7 64-bit), IDE read works, but IDE writes fail silently. This happens whenever WinUAE is run in normal or Administrator mode.

This issue is present with all versions of WinUAE and EmuTOS. The very same binaries work fine on Windows XP, while IDE writes fail on Windows 10. Something must have changed in the OS. Of course, this is very annoying
BlankVector is offline  
AdSense AdSense  
Old 02 December 2016, 23:57   #2
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
New clue:
When running procmon, I see:
winuae.exe ReadFile K: SUCCESS
winuae.exe WriteFile K: ACCESS DENIED

Even in Administrator mode.

Why??
BlankVector is offline  
Old 03 December 2016, 00:08   #3
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,036
tomshardware says something about ownership.
take a look at "Best answer".
you may have installed the external drive with different user/id on a differnt machine.
this is somehow connected to the ntfs filesystem/credentials.
emufan is offline  
Old 03 December 2016, 00:16   #4
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
It seems that Microsoft has introduced new policies regarding to physical volumes since Windows Vista:
https://support.microsoft.com/en-us/kb/942448

I hope some solution could be applied to WinUAE, i.e. locking the volume in exclusive write access.
BlankVector is offline  
Old 03 December 2016, 08:52   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Works for me. I took 120G laptop SATA drive, put it in USB adapter (Kingston HyperX that came with Kingston SSD drive). Removed all PC partitions, then partitioned it in WinUAE. Writes work fine.

You sure you don't have MBR or PC partition table remains? It usually prevents writes to work. Or some overprotective security software?

EDIT: you did select "run as admin", just using admin account won't work since Vista.
Toni Wilen is offline  
Old 03 December 2016, 12:58   #6
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
I forgot to say that my USB drive has MBR+FAT16 partition. So Windows automatically mounts it. Then it is consistent with Microsoft documentation: writes to physical device are denied to WinUAE because the partition is already mounted by Windows. Of course this doesn't happen with AmigaOS partitions, as Windows can't mount them.

This occurs:
- when I run WinUAE normally
- when I run WinUAE with "run as admin"
- when I set any compatibility mode in the shortcut

IMHO the right solution is that WinUAE should lock the physical devices in exclusive mode when it uses it.
BlankVector is offline  
Old 05 December 2016, 00:44   #7
TroyWilkins
Registered User

TroyWilkins's Avatar
 
Join Date: Jan 2015
Location: Tasmania, Australia
Posts: 349
Ahh, you need to use diskpart to remove all partitions on the drive, and then you can use HDToolbox or something like that in the emulated Amiga enviroment to partition, then format and it will work correctly. If you need help with that let us know
TroyWilkins is offline  
Old 15 January 2017, 02:05   #8
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
Unfortunately, I can't find any workaround to write to physical hard disks containing FAT16 partitions from WinUAE, except using Windows XP
BlankVector is offline  
Old 15 January 2017, 08:54   #9
Saghalie
Registered User

Saghalie's Avatar
 
Join Date: Nov 2014
Location: FT Lewis, WA
Posts: 139
Use compatibility mode?
Saghalie is offline  
Old 15 January 2017, 10:50   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
http://www.winuae.net/files/b/winuae.7z may help, it will lock the drive when mounted in winuae. (warning: development version!)
Toni Wilen is offline  
Old 15 January 2017, 11:48   #11
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
Quote:
Originally Posted by Saghalie View Post
Use compatibility mode?
I tried all compatibility modes, nothing works with Windows 10.

Last edited by BlankVector; 15 January 2017 at 11:54.
BlankVector is offline  
Old 15 January 2017, 11:50   #12
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
Quote:
Originally Posted by Toni Wilen View Post
http://www.winuae.net/files/b/winuae.7z may help, it will lock the drive when mounted in winuae. (warning: development version!)
Thanks for the effort.

However, it does not work better. IDE writes to hard disk are still ignored. And while WinUAE is running, I can still access my FAT16 partition, this is the proof that it is not locked in exclusive mode. Actually, I don't have any hint that WinUAE tried to lock the drive. Is there an option to enable somewhere?
BlankVector is offline  
Old 15 January 2017, 13:21   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Attempt #2.

Lock option also added to add harddrive dialog because locking as a default would break config where same CF/card reader is used for both FAT formatted and RDB formatted cards (=added as a harddrive in UAE config, if card is RDB, it mounts normally, if FAT, it isn't mounted and stays available as a normal removable directory harddrive FAT drive).
Toni Wilen is offline  
Old 15 January 2017, 16:17   #14
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
Quote:
Originally Posted by Toni Wilen View Post
Attempt #2.
Do you expect me to test something new??
BlankVector is offline  
Old 15 January 2017, 16:37   #15
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
Sorry, I didn' see that you changed winuae.7z, due to some cache illness. Anyway.

I see the new Lock check box in Add hard drive dialog. There are 2 issues:
- If I check it, that's not better. The drive is not locked, and writes still fail.
- This new checkbox is not saved to the configuration file. After reloading, it remains unchecked.
BlankVector is offline  
Old 15 January 2017, 16:39   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Works for me, when locked, FAT drive is not accessible from Windows explorer or anything else.

Config save is not yet supported.
Toni Wilen is offline  
Old 15 January 2017, 16:58   #17
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
BTW, my drive has:
- an MBR partition table
- fist primary partition is FAT16
- second primary partition is ext2

Maybe the presence of the second partition matters...
BlankVector is offline  
Old 15 January 2017, 17:16   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Right, locking whole drive wasn't that simple. Whole drive can't be locked, only partitions = partitions need to be enumerated and manually locked one by one.
Toni Wilen is offline  
Old 15 January 2017, 19:23   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,934
Attempt #3.. Now it enumerates drive's partitions and attempts to lock (and dismount, dismount only meaning it is temporarily dismounted, when handle/program closes, it gets remounted automatically) all of them.

Working or not, attach full log or at least part of log that shows messages like ("locked and dismounted succesfully" or "WARNING: ID=%d FSCTL__...".
Toni Wilen is offline  
Old 15 January 2017, 20:00   #20
BlankVector
Registered User
 
Join Date: Jun 2012
Location: Paris, France
Posts: 151
It works! Oh, Toni, to are great

If I keep the windows Explorer opened, with the file tree on the left, then when the emulation starts, the label of my FAT16 drive disappears: it is a proof that it's properly locked. And writes work as expected from EmuTOS.

Log for my CompactFlash card with MBR + FAT16 + ext2:
Code:
Adding IDE HD 'ide_mb' unit 0 (':Generic  Compact Flash    0.00 00000000000000:\\?\usbstor#disk&ven_generic&prod_compact_flash&rev_0.00#7&9c618da&0&00000000000006&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}')
hfd attempting to open: ':Generic  Compact Flash    0.00 00000000000000:\\?\usbstor#disk&ven_generic&prod_compact_flash&rev_0.00#7&9c618da&0&00000000000006&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
0: Partition found: PhysicalDrive0: Extent 2 Start=100000 Len=1F400000
ID=0 locked and dismounted successfully.
HDF ':Generic  Compact Flash    0.00 00000000000000' 1005E760 opened, size=7812608K mode=1 empty=0
IDE0 HD ':Generic  Compact Flash    0.00 00000000000000:\\?\usbstor#disk&ven_generic&prod_compact_flash&rev_0.00#7&9c618da&0&00000000000006&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}', LCHS=62004/4/63. PCHS=15501/16/63 7629M. LBA48=0
Log for simpler USB stick with MBR + FAT16:
Code:
Adding IDE HD 'ide_mb' unit 0 (':PIXIKA USB Flash Drive 5.00 0C0706005292:\\?\usbstor#disk&ven_pixika&prod_usb_flash_drive&rev_5.00#0c0706005292&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}')
hfd attempting to open: ':PIXIKA USB Flash Drive 5.00 0C0706005292:\\?\usbstor#disk&ven_pixika&prod_usb_flash_drive&rev_5.00#0c0706005292&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'
0: Partition found: PhysicalDrive0: Extent 2 Start=100000 Len=3EB10000
ID=0 locked and dismounted successfully.
HDF ':PIXIKA USB Flash Drive 5.00 0C0706005292' 0FA24898 opened, size=1031168K mode=1 empty=0
IDE0 HD ':PIXIKA USB Flash Drive 5.00 0C0706005292:\\?\usbstor#disk&ven_pixika&prod_usb_flash_drive&rev_5.00#0c0706005292&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}', LCHS=8183/4/63. PCHS=2045/16/63 1007M. LBA48=0
BlankVector is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
IDE Hard Disk drive installation alphagemini Hardware mods 46 02 June 2014 08:24
issues with ide hard drive hydravox support.Hardware 7 20 May 2013 12:14
Hard Drive Crashes Amiga on Write (SFS) Mnemesi support.Hardware 6 04 March 2012 20:47
Is the Hard Drive Read/Write flag supposed to do anything? :) rhester72 support.WinUAE 1 29 September 2011 21:54
IDE hard drive probs Smiley support.Hardware 12 08 May 2006 16:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:06.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.27858 seconds with 14 queries