Luks 加密无法从 Pendrive 中删除

Luks 加密无法从 Pendrive 中删除

错误

在此处输入图片描述

当我尝试将 qubes Os 安装到 p 时当我尝试将 qubes Os 安装到 pendrive (SanDisk 64gb 3.2 gen 1) 以进行实时格式安装时突然停止并且 pendrive 不显示当检查分区管理器时它显示只读我尝试了 YouTube 上的所有可能方法都不起作用然后我发现它在安装 qubes 时被加密了,然后我检查了加密它是 luks 并且我搜索如何删除加密我试过了cryptsetup -luks RemoveKey /dev/sda4 我知道密码 它输出设备擦除错误,偏移量 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).

在此处输入图片描述

答案1

错误本身与 LUKS 或 Qubes 无关 – 它之所以出现是因为您的 U 盘固件已切换到只读模式。如果您查看输出lsblk,您会在设备字段1中看到RO;这几乎总是来自磁盘本身,表明其介质是只读的。

对于达到写入耐久性极限的 U 盘来说,这是一种极为常见的故障模式。(也可能是出于其他一些未知原因。)

如果在重新连接 U 盘后RO标志仍然存在1,通常您无法采取任何措施来修复它(除非尝试找到制造商工具来对闪存进行低级格式化并延长其使用寿命)。

万一您当前的操作系统本身已将 /dev/sdb 更改为只读以防止持久性,您可以尝试blockdev --setrw /dev/sdb撤消该操作。但是,如果 U 盘本身已切换为只读,这根本无济于事 - 它只会改变您收到的错误类型。(请注意 中更详细的错误消息dmesg。)

相关内容