jtalbot35 Posted May 17, 2013 Author Posted May 17, 2013 jaclazI did the test with SanPolicy=3. That worked as far as not changing the BCD hive but I could not get the fixed drive to remove the readonly bit. All the drives (including the PE drive came up "offline" as expected. I used diskpart to mark the disk "online" which was successful and did the "attributes" command. It failed with the "Diskpart failed to clear disk attributes" msg. I repeated the steps on the PE drive and the "attributes" command was successful. From that, since I may need to fix a problem on a users drive, I think the SanPolicy=3 won't work. Of course I may just be doing something dumb but at this point I'm going to go down the "NoAutoMount" path and see what happens.I can try other things if you would like.BTW, if you have VMWare, you can build a Win 7 VM normally and then configure the boot sequence in the VM BIOS to first try booting from CD then hard drive. You can then build an ISO from you PE USB drive using:"oscdimg -n -betfsboot.com "drive_where_your_PE_DISK_IS" name.iso. You can then attach your iso to your VM and boot it and your WinPE will be in control. I used this method to initially look at the hibernated state issue (I hibernated my Win 7 VM image and then attached my WinPE iso to it and rebooted. All of my above test where done on real hardware though. Never know when VMWare is not telling you the truth.
jaclaz Posted May 17, 2013 Posted May 17, 2013 I can try other things if you would like.Yes, there are two "levels" of read/write.Try booting then check BOTH the disk and volume status, see:http://emalf-pc.blogspot.it/2011/11/clear-readonly-disk-in-windows-server.htmlIf you could post a copy of the commands and feedback you get would be nice.Was the disk online?You may need to put it offline, and then attempt changing the read only status (or viceversa )... It is possible that BOTH the disk and volume are set as "read only" or maybe the disk (or volume) being in hibernated state prevents the command with 3 or 4?Try also if this:http://www.happysysadm.com/2010/11/disk-is-offline-because-of-policy-set.htmlDiskpart> sanapplies....jaclaz
jtalbot35 Posted May 20, 2013 Author Posted May 20, 2013 jaclazWith SanPolicy=3, I could never get the disk writeable. Here is the output of my DISKPART sessionDISKPARTMicrosoft DiskPart version 6.2.9200Copyright © 1999-2012 Microsoft Corporation.On computer: MININT-2DO01ECDISKPART> sanSAN Policy : Offline AllDISKPART> san policy=onlineallDiskPart successfully changed the SAN policy for the current operating system.DISKPART> rescanPlease wait while DiskPart scans your configuration...DiskPart has finished scanning your configuration.DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Offline 465 GB 0 B Disk 1 Offline 1912 MB 0 B DISKPART> select disk 0Disk 0 is now the selected disk.DISKPART> detail diskWDC WD5000BEVT-75ZAT0Disk ID: E1F2EA89Type : SATAStatus : Offline (Policy)Path : 0Target : 0LUN ID : 0Location Path : UNAVAILABLECurrent Read-only State : YesRead-only : YesBoot Disk : NoPagefile Disk : NoHibernation File Disk : NoCrashdump Disk : NoClustered Disk : NoThere are no volumes.DISKPART> attributes disk clear readonly noerrDiskPart failed to clear disk attributes.DISKPART> rescanPlease wait while DiskPart scans your configuration...DiskPart has finished scanning your configuration.DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- ---* Disk 0 Offline 465 GB 0 B Disk 1 Offline 1912 MB 0 B DISKPART> detail diskWDC WD5000BEVT-75ZAT0Disk ID: E1F2EA89Type : SATAStatus : Offline (Policy)Path : 0Target : 0LUN ID : 0Location Path : UNAVAILABLECurrent Read-only State : YesRead-only : YesBoot Disk : NoPagefile Disk : NoHibernation File Disk : NoCrashdump Disk : NoClustered Disk : NoThere are no volumes.DISKPART> online disk noerrDiskPart successfully onlined the selected disk.DISKPART> rescanPlease wait while DiskPart scans your configuration...DiskPart has finished scanning your configuration.DISKPART> attributes disk clear readonly noerrDiskPart failed to clear disk attributes.DISKPART> detail diskWDC WD5000BEVT-75ZAT0Disk ID: E1F2EA89Type : SATAStatus : OnlinePath : 0Target : 0LUN ID : 0Location Path : UNAVAILABLECurrent Read-only State : YesRead-only : YesBoot Disk : NoPagefile Disk : NoHibernation File Disk : NoCrashdump Disk : NoClustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 1 C RECOVERY NTFS Partition 15 GB Healthy Volume 2 E NTFS Partition 450 GB Healthy Volume 3 FAT Partition 78 MB Healthy Hidden DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 D DVD-ROM 0 B No Media Volume 1 C RECOVERY NTFS Partition 15 GB Healthy Volume 2 E NTFS Partition 450 GB Healthy Volume 3 FAT Partition 78 MB Healthy Hidden DISKPART> select volume 2Volume 2 is the selected volume.DISKPART> detail volume Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- ---* Disk 0 Online 465 GB 0 B Read-only : NoHidden : NoNo Default Drive Letter: NoShadow Copy : NoOffline : NoBitLocker Encrypted : NoInstallable : YesVolume Capacity : 450 GBVolume Free Space : 434 GBDISKPART> attributes volume clear readonly noerrDiskPart has encountered an error: The media is write protected.See the System Event Log for more information.DISKPART> detail volume Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- ---* Disk 0 Online 465 GB 0 B Read-only : NoHidden : NoNo Default Drive Letter: NoShadow Copy : NoOffline : NoBitLocker Encrypted : NoInstallable : YesVolume Capacity : 450 GBVolume Free Space : 434 GB
jaclaz Posted May 20, 2013 Posted May 20, 2013 (edited) jaclazWith SanPolicy=3, I could never get the disk writeable. Here is the output of my DISKPART sessionHmmm. Cannot really say what is preventing the thingy to change attributes. Check this:http://blogs.technet.com/b/askcore/archive/2011/06/02/my-disk-is-read-only-help.aspxI also had this problem and noted this post did not fix the issue. I was able to resolve this issue on my computer by modifying the following registry key from 1 to 0:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies\WriteProtectSwitch from a 1 to 0.but that should only affect USB drives.DiskPart has encountered an error: The media is write protected. See the System Event Log for more information.Is there anything worth of note in the event log (if it exists in your PE)...jaclaz Edited May 20, 2013 by jaclaz
jtalbot35 Posted May 20, 2013 Author Posted May 20, 2013 jaclazThanks for all of your help. Not sure why the original issue happens (BCD file changed on boot) but I'm going to work around it with the NoAutoMount setting. Thanks again.
jaclaz Posted May 20, 2013 Posted May 20, 2013 (edited) Thanks for all of your help. Not sure why the original issue happens (BCD file changed on boot) but I'm going to work around it with the NoAutoMount setting. Thanks again.You are welcome .Re-thinking about the Read-only that cannot be cleared, maybe it is because as soon as you put the disk online volume on it were mounted to a drive letter.Maybe all volumes need to be unmounted to allow to change the read-only status? jaclaz Edited May 20, 2013 by jaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now