0

error

enter image description here

When I try to install qubes Os to pWhen I try to install qubes Os to pendrive (SanDisk 64gb 3.2 gen 1) for live format while installing suddenly stopped and pendrive not showing when check partition manager it shows read-only i tried every possible way from YouTube nothing works then I found its encrypted while installing qubes, Then i checked encryption it's luks and i search about how to remove encryption i tried cryptsetup -luks RemoveKey /dev/sda4 I know the passphrase it gives output of Device wipe error, offset 32768.

    root@amnesia:/home/amnesia cryptsetup -y -v luksFormat /dev/sdc4

WARNING: Device /dev/sdc4 already contains a 'crypto LUKS' superblock signature.

WARNING!

This will overwrite data on /dev/sdc4 irrevocably.

Are you sure? (Type 'yes' in capital letters): YES

Enter passphrase for /dev/sdc4:

Verify passphrase:

Failed to open file /dev/sdc4 in read/write mode. Command failed with code -1 (wrong or missing parameters).

root@amnesia:/home/amnesiae cryptsetup y v LuksFormat /dev/sdc4 WARNING: Device /dev/sdc4 already contains a crypto LUKS superblock signature.

WARNING!

This will overwrite data on /dev/sdc4 irrevocably.

Are you sure? (Type yes in capital letters): YES Enter passphrase for /dev/sdc4:

verify passphrase:

Failed to open file /dev/sdc4 in read/write mode.

Command failed with code -1 (wrong or missing parameters).

root@amnesia:/home/amnesiae cryptsetup -y v LuksRemovekey /dev/sdc4

Enter passphrase to be deleted:

Verify passphrase:

Key slot 8 unlocked.

Keyslot is selected for deletion.

WARNING!

This is the last keyslot. Device will become unusable after purging this key

Are you sure? (Type 'yes' in capital letters): YES

Device wipe error, offset 32768. Cannot wipe device /dev/sdc4.

Key slot a removed.

Command failed with code -1 (wrong or missing parameters).

enter image description here

1 Answers1

1

The error itself is unrelated to LUKS or Qubes – it shows up because your pendrive's firmware has switched to read-only mode. If you look at the lsblk output, you'll see 1 in the RO field for the device; this almost always comes from the disk itself indicating that its medium is read-only.

This is an extremely common failure mode for pendrives that have reached their write endurance limits. (And probably for some other unknown reasons, too.)

If the RO flag remains at 1 after re-connecting the pendrive, there's usually nothing you can do to fix it (except maybe trying to find a manufacturer tool to low-level format the flash memory and squeeze some more life out of it).

In the unlikely case that your current OS itself has changed /dev/sdb to read-only in order to prevent persistence, you could try blockdev --setrw /dev/sdb to undo that. However, if the pendrive itself has switched to being read-only, this won't help at all – it'll just change the kind of errors you get. (Pay attention to the more detailed error messages in dmesg.)

grawity
  • 501,077