|
|
|
@ -326,7 +326,7 @@ def mount_volume_to_device(created):
|
|
|
|
# Some Windows configs will automatically set new drives as online causing diskpart setup script to fail.
|
|
|
|
# Some Windows configs will automatically set new drives as online causing diskpart setup script to fail.
|
|
|
|
offline_drive()
|
|
|
|
offline_drive()
|
|
|
|
|
|
|
|
|
|
|
|
f = tempfile.NamedTemporaryFile(delete=False)
|
|
|
|
with tempfile.NamedTemporaryFile(delete=False) as f:
|
|
|
|
f.write("""
|
|
|
|
f.write("""
|
|
|
|
select disk 1
|
|
|
|
select disk 1
|
|
|
|
online disk
|
|
|
|
online disk
|
|
|
|
@ -342,8 +342,6 @@ def mount_volume_to_device(created):
|
|
|
|
active
|
|
|
|
active
|
|
|
|
""".encode('utf-8'))
|
|
|
|
""".encode('utf-8'))
|
|
|
|
|
|
|
|
|
|
|
|
f.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subprocess.call(['diskpart', '/s', f.name])
|
|
|
|
subprocess.call(['diskpart', '/s', f.name])
|
|
|
|
|
|
|
|
|
|
|
|
time.sleep(5)
|
|
|
|
time.sleep(5)
|
|
|
|
|