LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2020, 07:51 AM   #1
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Rep: Reputation: Disabled
Luks encrypted external HDD will open, but not mount - any suggestions?


Debian/buster - 2TB HDD

Using a docking station, I opened and mounted my luks encrypted HDD without a problem.

Then I umounted and closed it. Ten minutes later I went to open and mount it again, it would not mount. I tried 12 times and using a different docking station, but no luck.

My other encrypted external hdd opens and mounts using same OS, docking station, etc.

Any ideas on how to try to get it to mount?


I ran the following 17 hour test:
Code:
"sudo badblocks -v /dev/sdx > /tmp/bad-blocks.txt"
The test came back with "0/0/0 errors".

Thx.

Last edited by duupunisher2x; 08-24-2020 at 07:56 AM.
 
Old 08-24-2020, 07:53 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by duupunisher2x View Post
Debian/buster - 2TB HDD

Using a docking station, I opened and mounted my luks encrypted HDD without a problem.

Then I umounted and closed it. Ten minutes later I went to open and mount it again, it would not mount. I tried 12 times and using a different docking station, but no luck.

My other encrypted external hdd opens and mounts using same OS, docking station, etc.

Any ideas on how to try to get it to mount?

Thx.
When the HDD fails to mount, did you check dmesg to see if it has any relevant information?
 
Old 08-24-2020, 07:59 AM   #3
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
When I tried using the 'fdisk' command, I kept getting 'command not found'. When I went to install it, terminal stated newest version already here.

I'll try "sudo dmesg" now.

Thx.
 
Old 08-24-2020, 08:46 AM   #4
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
wrong hdd...

Last edited by duupunisher2x; 08-24-2020 at 08:47 AM. Reason: wrong hdd
 
Old 08-24-2020, 09:02 AM   #5
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Sudo dmesg:
Code:
usb-storage 4-1.2:1.0: USB Mass Storage device detected
[   48.750528] scsi host0: usb-storage 4-1.2:1.0
[   48.832516] usbcore: registered new interface driver uas
[   49.758371] scsi 0:0:0:0: Direct-Access     HGST HUS #######    2023 PQ: 0 ANSI: 6
[   49.759158] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   49.759680] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   49.760931] sd 0:0:0:0: [sda] Write Protect is off
[   49.760941] sd 0:0:0:0: [sda] Mode Sense: 67 00 10 08
[   49.762202] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   49.791465] sd 0:0:0:0: [sda] Attached SCSI disk

--------- 
DMESG - NO "SUDO" 
 USB Mass Storage device detected
[  229.995636] scsi host1: usb-storage 4-1.4.2:1.0
[  231.754748] scsi 1:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 6
[  231.755509] sd 1:0:0:0: Attached scsi generic sg1 type 0
[  231.760118] sd 1:0:0:0: [sdb] 30375936 512-byte logical blocks: (15.6 GB/14.5 GiB)
[  231.760915] sd 1:0:0:0: [sdb] Write Protect is off
[  231.760924] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[  231.761712] sd 1:0:0:0: [sdb] No Caching mode page found
[  231.761721] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  231.770427]  sdb: sdb1
[  231.773935] sd 1:0:0:0: [sdb] Attached SCSI removable disk

Last edited by duupunisher2x; 08-24-2020 at 09:04 AM.
 
Old 08-24-2020, 09:16 AM   #6
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Whenever you get "command not found" for something you know should exist, try running it as root. Users aren't allowed to know about some things which could damage the system. Sudo was invented for this.
 
Old 08-24-2020, 11:41 AM   #7
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by duupunisher2x View Post
Sudo dmesg:
Code:
usb-storage 4-1.2:1.0: USB Mass Storage device detected
[   48.750528] scsi host0: usb-storage 4-1.2:1.0
[   48.832516] usbcore: registered new interface driver uas
[   49.758371] scsi 0:0:0:0: Direct-Access     HGST HUS #######    2023 PQ: 0 ANSI: 6
[   49.759158] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   49.759680] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   49.760931] sd 0:0:0:0: [sda] Write Protect is off
[   49.760941] sd 0:0:0:0: [sda] Mode Sense: 67 00 10 08
[   49.762202] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   49.791465] sd 0:0:0:0: [sda] Attached SCSI disk

--------- 
DMESG - NO "SUDO" 
 USB Mass Storage device detected
[  229.995636] scsi host1: usb-storage 4-1.4.2:1.0
[  231.754748] scsi 1:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 6
[  231.755509] sd 1:0:0:0: Attached scsi generic sg1 type 0
[  231.760118] sd 1:0:0:0: [sdb] 30375936 512-byte logical blocks: (15.6 GB/14.5 GiB)
[  231.760915] sd 1:0:0:0: [sdb] Write Protect is off
[  231.760924] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[  231.761712] sd 1:0:0:0: [sdb] No Caching mode page found
[  231.761721] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[  231.770427]  sdb: sdb1
[  231.773935] sd 1:0:0:0: [sdb] Attached SCSI removable disk
That tells me 2TB HDD was reattached as sda. At this point, what is output of:

Code:
sudo fdisk -l /dev/sda

Last edited by dc.901; 08-24-2020 at 11:44 AM.
 
Old 08-24-2020, 12:51 PM   #8
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Code:
sudo fdisk -l /dev/sda
[sudo] password for b: 
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: 722T2TALA604    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
Old 08-24-2020, 07:11 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Code:
lsblk -f
 
Old 08-25-2020, 06:26 AM   #10
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
1- lists UUID

2- nothing stated (no numbers) under: "fsavail" "fsuse%" "mountpoint"
 
Old 08-25-2020, 06:39 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Don't tell us, give us the data. All of it. We'll judge what is relevant and what isn't.
 
1 members found this post helpful.
Old 08-27-2020, 05:46 AM   #12
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Code:
b@b:~$ lsblk -f
NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda  crypto       c9a1bf94-0091-4706-922b-87a96aa2824c                
mmcblk0
|                                                                     
`-mmcblk0p1
     ext4         11f568bd-0621-49a5-abd2-391d76f1238d     11G    23% /
mmcblk1
|                                                                     
|-mmcblk1p1
|    ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
|-mmcblk1p2
|    vfat   Volumn
|                                                                     
|-mmcblk1p3
|                                                                     
|-mmcblk1p5
|                                                                     
|-mmcblk1p6
|                                                                     
|-mmcblk1p7
|    ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
|-mmcblk1p8
|                                                                     
|-mmcblk1p9
|                                                                     
|-mmcblk1p10
|                                                                     
|-mmcblk1p11
|    vfat   PRIVATE
|                 80A7-07B4                                           
|-mmcblk1p12
|    vfat         707C-07B4                                           
|-mmcblk1p13
|                                                                     
|-mmcblk1p14
|                                                                     
|-mmcblk1p15
|                                                                     
`-mmcblk1p16
     ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
mmcblk1boot0
                                                                      
mmcblk1boot1
                                                                      
zram0
                                                         27.1M    37% /var/log
zram1
                                                                      [SWAP]
b@b:~$
----------------------------------------------------

b@b:~$ sudo cryptsetup luksOpen /dev/sda 2
[sudo] password for b:
Enter passphrase for /dev/sda:
Code:
b@b:~$ lsblk -f
NAME FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda  crypto       c9a1bf94-0091-4706-922b-87a96aa2824c                
`-2                                                                   
sdb                                                                   
`-sdb1
     vfat         DD4E-6B99                                           
mmcblk0
|                                                                     
`-mmcblk0p1
     ext4         11f568bd-0621-49a5-abd2-391d76f1238d     11G    23% /
mmcblk1
|                                                                     
|-mmcblk1p1
|    ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
|-mmcblk1p2
|    vfat   Volumn
|                                                                     
|-mmcblk1p3
|                                                                     
|-mmcblk1p5
|                                                                     
|-mmcblk1p6
|                                                                     
|-mmcblk1p7
|    ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
|-mmcblk1p8
|                                                                     
|-mmcblk1p9
|                                                                     
|-mmcblk1p10
|                                                                     
|-mmcblk1p11
|    vfat   PRIVATE
|                 80A7-07B4                                           
|-mmcblk1p12
|    vfat         707C-07B4                                           
|-mmcblk1p13
|                                                                     
|-mmcblk1p14
|                                                                     
|-mmcblk1p15
|                                                                     
`-mmcblk1p16
     ext4         57f8f4bc-abf4-655f-bf67-946fc0f9f25b                
mmcblk1boot0
                                                                      
mmcblk1boot1
                                                                      
zram0
                                                           27M    37% /var/log
zram1
                                                                      [SWAP]
 
Old 08-28-2020, 05:10 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Yep, gotta agree - that looks like nothing. To me that says there is no filesystem on (in) the container.
Did you happen to use the bash history to recall command ?. Maybe you got the luksFormat rather than luksOpen ?.
 
Old 08-29-2020, 02:34 PM   #14
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
thx

I 'am' able to open with 'cryptsetup luksOpen...' I just can't mount. Tried many times.

If I try get the data using a livedvd, what is better: LinuxMint or Debian9 Stretch ... both Cinnamon?

Is there any risk to trying to use the livedvd to recover the data? It seems like no; it will either appear or not appear using the livedvd, but I have never tried to recover data using a livedvd in the past.

What most likely could have prevented the disk from not mounting? Some type of disk failure/ malware....?

thanks

Last edited by duupunisher2x; 08-29-2020 at 02:38 PM.
 
Old 08-29-2020, 03:07 PM   #15
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
With the LUKS volume open (apparently you opened it with the name "2"), see if "file -s /dev/mapper/2" sees anything other than "data".

You might also see if "testdisk /dev/mapper/2" can recognize anything in that volume. Select "None" as the partition table type, and then run "Analyze". If that doesn't find anything, you can try proceeding to "Deeper Search".
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to unlock LUKS-encrypted external drive sniper8752 Linux - Security 5 03-28-2020 09:57 PM
How to access and decrypt LUKS encrypted SSD that has been moved from internal drive to external USB drive Chripcikas Linux - Newbie 8 02-21-2019 07:52 AM
[SOLVED] Can't mount encrypted Mint HDD on Raspberry Pi 3 as external drive radarvideolocust Linux - Desktop 2 05-13-2016 06:09 PM
manually mount luks encrypted hard drive not in fstab? (mint 17.1) rustylongsword Linux - Newbie 1 12-15-2014 10:03 AM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration