你好世界,
我是阿什温寻求帮助,在我的 Ubuntu 系统上恢复和安装加密的外部硬盘。情况如下:
背景:我最近尝试使用 LUKS 加密方法加密我的外部硬盘,这是从旧笔记本电脑中取出的西部数据硬盘,方法如下:RedHat 的网站。加密之前,我能够通过 /media 文件夹安装和使用该驱动器。
问题:加密后,驱动器停止安装,尽管连接时它会提示我输入密码来解锁。
解密尝试: 解决安装问题后,我解密了驱动器,但问题仍然存在。
重要信息:
以下是 的输出lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /snap/bare/5
loop1 7:1 0 55.7M 1 loop /snap/core18/2812
loop2 7:2 0 55.7M 1 loop /snap/core18/2823
loop3 7:3 0 63.9M 1 loop /snap/core20/2182
loop4 7:4 0 63.9M 1 loop /snap/core20/2264
loop5 7:5 0 74.2M 1 loop /snap/core22/1122
loop6 7:6 0 74.2M 1 loop /snap/core22/1380
loop7 7:7 0 268.3M 1 loop /snap/firefox/4090
loop8 7:8 0 269.6M 1 loop /snap/firefox/4173
loop9 7:9 0 346.3M 1 loop /snap/gnome-3-38-2004/119
loop10 7:10 0 349.7M 1 loop /snap/gnome-3-38-2004/143
loop11 7:11 0 504.2M 1 loop /snap/gnome-42-2204/172
loop12 7:12 0 505.1M 1 loop /snap/gnome-42-2204/176
loop13 7:13 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop14 7:14 0 853.7M 1 loop /snap/intellij-idea-community/495
loop15 7:15 0 854.9M 1 loop /snap/intellij-idea-community/498
loop16 7:16 0 25.4M 1 loop /snap/nvim/2819
loop17 7:17 0 173M 1 loop /snap/postman/248
loop18 7:18 0 176.1M 1 loop /snap/postman/250
loop19 7:19 0 12.9M 1 loop /snap/snap-store/1113
loop20 7:20 0 12.3M 1 loop /snap/snap-store/959
loop21 7:21 0 39.1M 1 loop /snap/snapd/21184
loop22 7:22 0 38.7M 1 loop /snap/snapd/21465
loop23 7:23 0 476K 1 loop /snap/snapd-desktop-integration/157
loop24 7:24 0 452K 1 loop /snap/snapd-desktop-integration/83
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 260M 0 part
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 452.1G 0 part
├─sda4 8:4 0 1000M 0 part
├─sda5 8:5 0 11.5G 0 part
└─sda6 8:6 0 1000M 0 part /media/ashwintemkar/LRS_ESP
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
└─nvme0n1p2 259:2 0 476.4G 0 part /var/snap/firefox/common/host-hunspell
输出如下sudo fdisk -l
:
Disk /dev/sda: 465.76 GiB, 500107861504 bytes, 976773167 sectors
Disk model: External
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1CF816B9-2D8B-4AE5-8708-D650E0D14F81
Device Start End Sectors Size Type
/dev/sda1 2048 534527 532480 260M EFI System
/dev/sda2 534528 567295 32768 16M Microsoft reserved
/dev/sda3 567296 948660223 948092928 452.1G Microsoft basic data
/dev/sda4 948662272 950710271 2048000 1000M Windows recovery environment
/dev/sda5 950710272 974725119 24014848 11.5G Windows recovery environment
/dev/sda6 974725120 976773119 2048000 1000M Lenovo boot partition
这意味着它检测到我的驱动器,但不允许我使用主分区
另外,运行fsck /dev/sda3
会出现以下错误:
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda3
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a dos partition table in /dev/sda3
要求: 我需要帮助来恢复和安装加密的外部硬盘,且不丢失任何数据。分配的数据尚未被覆盖。
笔记:
我在整个过程中一直使用 sudo。所有数据都需要安全地检索,不能有任何损坏或丢失。我很感激任何有关此事的指导或帮助。谢谢!
编辑:
在我昨天拔掉电源之前,我一直在关注lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /snap/bare/5
loop1 7:1 0 55.7M 1 loop /snap/core18/2812
loop2 7:2 0 55.7M 1 loop /snap/core18/2823
loop3 7:3 0 63.9M 1 loop /snap/core20/2182
loop4 7:4 0 63.9M 1 loop /snap/core20/2264
loop5 7:5 0 74.2M 1 loop /snap/core22/1122
loop6 7:6 0 74.2M 1 loop /snap/core22/1380
loop7 7:7 0 268.3M 1 loop /snap/firefox/4090
loop8 7:8 0 269.6M 1 loop /snap/firefox/4173
loop9 7:9 0 346.3M 1 loop /snap/gnome-3-38-2004/119
loop10 7:10 0 349.7M 1 loop /snap/gnome-3-38-2004/143
loop11 7:11 0 504.2M 1 loop /snap/gnome-42-2204/172
loop12 7:12 0 505.1M 1 loop /snap/gnome-42-2204/176
loop13 7:13 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop14 7:14 0 853.7M 1 loop /snap/intellij-idea-community/495
loop15 7:15 0 854.9M 1 loop /snap/intellij-idea-community/498
loop16 7:16 0 173M 1 loop /snap/postman/248
loop17 7:17 0 12.9M 1 loop /snap/snap-store/1113
loop18 7:18 0 12.3M 1 loop /snap/snap-store/959
loop19 7:19 0 39.1M 1 loop /snap/snapd/21184
loop20 7:20 0 38.7M 1 loop /snap/snapd/21465
loop21 7:21 0 476K 1 loop /snap/snapd-desktop-integration/157
loop22 7:22 0 452K 1 loop /snap/snapd-desktop-integration/83
loop23 7:23 0 176.1M 1 loop /snap/postman/250
loop24 7:24 0 25.4M 1 loop /snap/nvim/2819
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 260M 0 part
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 452.1G 0 part
│ └─luks-3c96b225-9b52-4a62-a2cd-6fb4c3f497cc
│ 252:0 0 452.1G 0 crypt
├─sda4 8:4 0 1000M 0 part
├─sda5 8:5 0 11.5G 0 part
└─sda6 8:6 0 1000M 0 part /media/ashwintemkar/LRS_ESP
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
└─nvme0n1p2 259:2 0 476.4G 0 part /var/snap/firefox/common/host-hunspell