Sign in to follow this  
Followers 0
jtalbot35

WINPE 4.0 boot modifes BCD hive on C drive

21 posts in this topic

jaclaz

I 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.

0

Share this post


Link to post
Share on other sites

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.html

If 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 :ph34r: )...

It is possible that BOTH the disk and volume are set as "read only" :unsure: 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.html

Diskpart> san

applies....

jaclaz

0

Share this post


Link to post
Share on other sites

jaclaz

With SanPolicy=3, I could never get the disk writeable. Here is the output of my DISKPART session

DISKPART

Microsoft DiskPart version 6.2.9200

Copyright © 1999-2012 Microsoft Corporation.

On computer: MININT-2DO01EC

DISKPART> san

SAN Policy : Offline All

DISKPART> san policy=onlineall

DiskPart successfully changed the SAN policy for the current operating system.

DISKPART> rescan

Please 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 0

Disk 0 is now the selected disk.

DISKPART> detail disk

WDC WD5000BEVT-75ZAT0

Disk ID: E1F2EA89

Type : SATA

Status : Offline (Policy)

Path : 0

Target : 0

LUN ID : 0

Location Path : UNAVAILABLE

Current Read-only State : Yes

Read-only : Yes

Boot Disk : No

Pagefile Disk : No

Hibernation File Disk : No

Crashdump Disk : No

Clustered Disk : No

There are no volumes.

DISKPART> attributes disk clear readonly noerr

DiskPart failed to clear disk attributes.

DISKPART> rescan

Please 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 disk

WDC WD5000BEVT-75ZAT0

Disk ID: E1F2EA89

Type : SATA

Status : Offline (Policy)

Path : 0

Target : 0

LUN ID : 0

Location Path : UNAVAILABLE

Current Read-only State : Yes

Read-only : Yes

Boot Disk : No

Pagefile Disk : No

Hibernation File Disk : No

Crashdump Disk : No

Clustered Disk : No

There are no volumes.

DISKPART> online disk noerr

DiskPart successfully onlined the selected disk.

DISKPART> rescan

Please wait while DiskPart scans your configuration...

DiskPart has finished scanning your configuration.

DISKPART> attributes disk clear readonly noerr

DiskPart failed to clear disk attributes.

DISKPART> detail disk

WDC WD5000BEVT-75ZAT0

Disk ID: E1F2EA89

Type : SATA

Status : Online

Path : 0

Target : 0

LUN ID : 0

Location Path : UNAVAILABLE

Current Read-only State : Yes

Read-only : Yes

Boot Disk : No

Pagefile Disk : No

Hibernation File Disk : No

Crashdump Disk : No

Clustered 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 2

Volume 2 is the selected volume.

DISKPART> detail volume

Disk ### Status Size Free Dyn Gpt

-------- ------------- ------- ------- --- ---

* Disk 0 Online 465 GB 0 B

Read-only : No

Hidden : No

No Default Drive Letter: No

Shadow Copy : No

Offline : No

BitLocker Encrypted : No

Installable : Yes

Volume Capacity : 450 GB

Volume Free Space : 434 GB

DISKPART> attributes volume clear readonly noerr

DiskPart 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 : No

Hidden : No

No Default Drive Letter: No

Shadow Copy : No

Offline : No

BitLocker Encrypted : No

Installable : Yes

Volume Capacity : 450 GB

Volume Free Space : 434 GB

0

Share this post


Link to post
Share on other sites

jaclaz

With SanPolicy=3, I could never get the disk writeable. Here is the output of my DISKPART session

Hmmm. :unsure:

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.aspx

I 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\WriteProtect

Switch 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 by jaclaz
0

Share this post


Link to post
Share on other sites

jaclaz

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.

0

Share this post


Link to post
Share on other sites

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? :unsure:

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.