LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-12-2016, 04:26 AM   #1
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Rep: Reputation: Disabled
blkid not showing encrypted 2nd hard drive on reboot


I have a 2 drive system. 1 SSD drive with normal CentOS stuff; encrypted.
The second hardrive is for SAMBA and has the home directories.
After set up of second drive I reboot and run blkid
I have NO Luks-.... showing up for the sdb drive.
Thanks to all in advance.


======================
I have used the following steps to do dozens of such boxes.

fdisk -l | grep '^Disk' # L not #1
cryptsetup -y -v luksFormat /dev/sdb
cryptsetup luksOpen /dev/sdb BIGDRIVE
ls -l /dev/mapper/BIGDRIVE
cryptsetup -v status BIGDRIVE
cryptsetup luksDump /dev/sdb
dd if=/dev/zero of=/dev/mapper/BIGDRIVE
mkfs.ext4 /dev/mapper/BIGDRIVE
mkdir /home/BIGDRIVE
mount /dev/mapper/BIGDRIVE /home/BIGDRIVE
df -H
cd /home/BIGDRIVE
ls -l
#### ALL TO HEAR WORKS I CAN SEE THE 1TB 2ND DRIVE

reboot
blkid

But I only get (which should be there) which on my other boxes is the first line, here on this one it is the last line on the screen:
/dev/sdb: UUID="31e49c7a-7071-4a36-a58d-9a35638e5235" TYPE="crypto_LUKS"

I should have something like this also:
/dev/mapper/luks-f28862ef-6be7-487f-80c0-aa21ce26319e: UUID="c4ccc1dc-6738-48a0-8922-afa3b7ee11fd" TYPE="ext4"
 
Old 12-12-2016, 09:59 AM   #2
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 972
Blog Entries: 14

Rep: Reputation: 135Reputation: 135
Hi,

first a tip : use the code tags

For automatic opening of encrypted partitions, you need to add the correct uuid to /etc/crypttab. Then you get a device in /dev/mapper which you can mount.
Not sure if this is systemd specific, but seeing you run CentOs, is should be what you need.
 
Old 12-12-2016, 12:06 PM   #3
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Original Poster
Rep: Reputation: Disabled
But I can't get the Lux.... stuff to put into cryptab or fstab that is the problem blkid does not show the hard drive after reboot.
 
Old 12-12-2016, 03:50 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,625

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
Quote:
Originally Posted by HardenedCriminal View Post
... blkid does not show the hard drive after reboot.
/dev/sdb is the hard drive. To see inside the luks container you must open it first. Then blkid (and you) can see the filesystem encased within.
 
Old 12-12-2016, 03:56 PM   #5
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Original Poster
Rep: Reputation: Disabled
I don't know what you are talking about, sorry.

I have always ran blkid and it gives me the "lux.... " stuff I need to put in fstab & cryptab.
 
Old 12-12-2016, 06:50 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,625

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
Are you telling us you don't understand the commands you entered in your original post ?.

blkid not seeing the data is a symptom - the problem is that the luks container hasn't been opened.
 
Old 12-12-2016, 07:03 PM   #7
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Original Poster
Rep: Reputation: Disabled
I basically understand the commands I have in the list from my notes.

The problem is a command is either missing or some upgrade to one of the programs has stop this all from working and I can NOT find out what is the Lux.. goo that need to be put in the fstab & cryptab
 
Old 12-12-2016, 08:18 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,783

Rep: Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397Reputation: 1397
Until the password/passphrase is entered, the disk cannot be decoded to get the information...

When you WERE getting the information everything was already set up and decrypted.
 
Old 12-12-2016, 08:30 PM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,144

Rep: Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873
Quote:
Originally Posted by syg00 View Post
Are you telling us you don't understand the commands you entered in your original post ?.

blkid not seeing the data is a symptom - the problem is that the luks container hasn't been opened.
Excuse me, but the LUKS header itself has a UUID and type that will be seen and reported by blkid:
Code:
# blkid | grep /dev/sdc1
/dev/sdc1: UUID="42744055-e006-47ab-9046-d4d2ebeba8bb" TYPE="crypto_LUKS"
I assure you that this container has not been unlocked.

The /dev/mapper entry will indeed not be present until the LUKS container has been unlocked.

Last edited by rknichols; 12-12-2016 at 08:32 PM.
 
Old 12-12-2016, 08:36 PM   #10
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Original Poster
Rep: Reputation: Disabled
how do I unlock the sdb luks container?
 
Old 12-12-2016, 08:48 PM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,144

Rep: Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873
Start at the beginning. Does /dev/sdb even exist? If so, what does "file -s /dev/sdb" (run as root) report?
 
Old 12-12-2016, 09:00 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,625

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
Quote:
Originally Posted by rknichols View Post
Excuse me,
Certainly
Quote:
but the LUKS header itself has a UUID and type that will be seen and reported by blkid
I never said anything to the contrary - even the quote you used specifically referred to the data within the container.
 
Old 12-12-2016, 09:03 PM   #13
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,144

Rep: Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873
Sorry, I thought you were referring to blkid not reporting the ' /dev/sdb: UUID="31e49c7a-7071-4a36-a58d-9a35638e5235" TYPE="crypto_LUKS"' that the OP was expecting to see. That is data from the LUKS header, not from within the container.
 
Old 12-12-2016, 09:27 PM   #14
HardenedCriminal
Member
 
Registered: May 2015
Posts: 96

Original Poster
Rep: Reputation: Disabled
I am so lost...

I type in on every box I have out there that was setup prior to this box blkid
it give me 2 lines of code associated with SDB and 7 lines associated with SDA the OS/Boot/Swap partition which is fine.

/dev/sdb: UUID="f25862ef-6be7-487f-80c0-aa21ce26319e" TYPE="crypto_LUKS" #line 1

/dev/mapper/luks-f25862ef-6be7-487f-80c0-aa21ce26319e: UUID="c4ccc1dc-6738-48a0-8922-afa3b7ee11fd" TYPE="ext4" #line 9

===============================================
on this computer having followed (I believe exactly the same steps as prior boxes) I only get:

/dev/sdb: UUID="e35862ef-6be7-123f-80c0-aa21ce2234e" TYPE="crypto_LUKS" #line 8 which should be 1st line.
 
Old 12-12-2016, 09:47 PM   #15
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,144

Rep: Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873Reputation: 1873
Quote:
Originally Posted by HardenedCriminal View Post
I am so lost...

I type in on every box I have out there that was setup prior to this box blkid
it give me 2 lines of code associated with SDB and 7 lines associated with SDA the OS/Boot/Swap partition which is fine.

/dev/sdb: UUID="f25862ef-6be7-487f-80c0-aa21ce26319e" TYPE="crypto_LUKS" #line 1

/dev/mapper/luks-f25862ef-6be7-487f-80c0-aa21ce26319e: UUID="c4ccc1dc-6738-48a0-8922-afa3b7ee11fd" TYPE="ext4" #line 9

===============================================
on this computer having followed (I believe exactly the same steps as prior boxes) I only get:

/dev/sdb: UUID="e35862ef-6be7-123f-80c0-aa21ce2234e" TYPE="crypto_LUKS" #line 8 which should be 1st line.
That UUID is what you need to put in /etc/crypttab for the "UUID=" parameter.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
2nd hard Drive grabro Linux - Hardware 1 02-05-2005 05:49 AM
2nd Hard Drive snutz411 Linux - Hardware 3 03-24-2004 12:52 PM
2nd hard drive neo.sarcastic Linux - Hardware 4 09-22-2003 11:22 PM
2nd Hard Drive Tad Linux - Hardware 6 05-22-2003 12:47 PM
2nd hard drive jarrodatt Linux - Hardware 1 11-12-2002 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration