I can't format the external drive after installing on it qubes os

Hello, I have been using Qubes Os on my external ssd for a while. After using it for a while, I wanted to reformat this drive to keep my files on it. I connected the disk to a computer with windows 10, launched the Disk Management program and saw two partitions :

When I tried to reformat / delete or change any of the partitions, I got an error or nothing has changed every time. I also tried to format / delete / convert partitions using unofficial programs like AOMEI Partition Assistant, but it also doesn’t work. After trying to format, my Qubes Os system also won’t boot. Is it possible to fix and format this disk? :slightly_frowning_face:

try using diskpart.

run as admin in cmd

diskpart
list disk
select disk X

Change X to your external ssd number.

clean
create partition primay
active
format fs=ntfs quick
assign letter=z

would that do ?

DISKPART> create partition primary

Virtual Disk Service error:
There is not enough usable space for this operation.

have you do clean ?

Yeah
DISKPART> list disk

Disk ### Status Size Free Dyn Gpt


Disk 0 Online 931 GB 1024 KB
Disk 1 Online 238 GB 238 GB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> create partition primary

Virtual Disk Service error:
There is not enough usable space for this operation.

What list volume in diskpart says? I think that was proper way.

As I can remember I had the similar situation, and after cleaning I switched to disk management and (surprisingly) created it from there.

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info


Volume 0 D DVD-ROM 0 B No Media
Volume 1 System Rese NTFS Partition 50 MB Healthy System
Volume 2 C NTFS Partition 930 GB Healthy Boot
Volume 3 NTFS Partition 517 MB Healthy Hidden

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt


Disk 0 Online 931 GB 1024 KB
Disk 1 Online 238 GB 0 B

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info


Volume 0 D DVD-ROM 0 B No Media
Volume 1 System Rese NTFS Partition 50 MB Healthy System
Volume 2 C NTFS Partition 930 GB Healthy Boot
Volume 3 NTFS Partition 517 MB Healthy Hidden

Selected Disk 1:
DISKPART> attribute disk
Current Read-only State : No
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No

In disk management app:

try doing it in another pc, sometimes it’s just work with other pc.
and rerun this

…otherwise you have to try it with a linux-kinda-rescue disk, where you boot up and try to do a NTFS format from there.

I tried on two other computers - nothing

Okay

… or in windows safe mode. Try also first to delete 1GB partition in diskpart. What’s the output of list partition… I wonder how clean was successful and then it again shows same partitions.

1 Like

I’ll try in windows safe mode. And yeah, when clean was successful it shows again same partitions.

I tried, and it still don’t want to be formatted :pensive:

try using clean all instead of clean in diskpart.

or

try use linux :
dd if=/dev/zero of=/dev/sdX status=progress

would that do ?

Yes, clean all as well

Did you try to delete partition with diskpart?
select disk 1
list partition
select partition xxx (1GB)
delete partition

clean all also does not work, later I will try to use linux

Yes ofc, I tried.

If no one else has suggested this, maybe you could utilize a FOSS tool (boot into an ISO like gparted or something like systemrescue that has gparted on it) because I think that you would have to deactivate the LVM partition (unless you used something else like BTRFS when creating the Qubes install) as this is possibly preventing you from succeeding (I learned this one the hard way just like you). LVM partitions can be a pain when you don’t understand this. I’m unsure that Microsoft’s tools would manage this any better than the Anaconda installer does & it is often unclear why things fail after a fresh install turns to a desire to start over but then you cannot due to this issue.