LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-16-2012, 06:03 AM   #1
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 242
Blog Entries: 2

Rep: Reputation: 28
Installing Slackware 14 with LVM, encryption and drive labels.


I got the LVM with Encryption down, but I need to add drive labels. My BIOS has changed the order of the drives and broke everything. How do I install initrd and lilo using drive labels?

TIA

-JJ
 
Old 10-16-2012, 06:38 AM   #2
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
You'll need to use UUIDs. LUKS containers don't support labels.

Unfortunately the stock slackware initrd doesn't support their use to identify luks encrypted devices to unlock, but I took part in a thread a while back that came up with some patches. Have a look at this post and the thread that it is in. It was a while ago though and may or may not apply cleanly.

http://www.linuxquestions.org/questi...4/#post4634484
 
1 members found this post helpful.
Old 10-19-2012, 08:38 AM   #3
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 242
Blog Entries: 2

Original Poster
Rep: Reputation: 28
I was not able to get my head around the process and went a different route. However, the thread did give me the final piece to the puzzle. Thank you.

I went with grub because it allows the use of UUID labels. I had to skip using an encrypted LVM for my root partition.

Here is my fstab:
Code:
# /dev/sda3        swap             swap        defaults         0   0
# /dev/sda2        /                ext4        defaults         1   1
# /dev/sda1        /boot            ext2        defaults         1   2

UUID=69b82f90-49d4-4711-95f5-9907a3018381       swap            swap    defaults        0 0
UUID=4331ae31-d4e9-4ab3-9161-4f39bfc45f94       /               ext4    defaults        1 1
UUID=6a34e669-78f1-44d3-ad4f-e93421c4f409       /boot           ext2    defaults        1 2

/dev/mapper/SecStor                             /mnt/SecStor    ext4    defaults        1 2


#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
and my crypttab:
Code:
SecStor /dev/disk/by-uuid/a45bf7a4-679d-4a27-94f5-0b96cc87dd1d
and to mount by hand (as root):
Code:
cryptsetup luksOpen /dev/disk/by-uuid/a45bf7a4-679d-4a27-94f5-0b96cc87dd1d SecStor
mount /mnt/SecStor
My setup:
Code:
Disk /dev/sda: 9105 MB, 9105018880 bytes
/dev/sda1   *        2048      526335      262144   83  Linux
/dev/sda2          526336    17303551     8388608   83  Linux
/dev/sda3        17303552    17783239      239844   82  Linux swap
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
/dev/sdb1            2048   976773167   488385560   83  Linux
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
/dev/sdc1            2048  1953525167   976761560   83  Linux
Disk /dev/sdd: 250.1 GB, 250059350016 bytes
/dev/sdd1            2048   488397167   244197560   83  Linux
Disk /dev/sde: 251.0 GB, 250999111168 bytes
/dev/sde1   *        2048     1050623      524288   83  Linux
/dev/sde2         1050624   490231807   244590592   83  Linux
Disk /dev/mapper/SecStor: 1000.2 GB, 1000201740288 bytes
I disconnected the 500G drive (which is failing)
Code:
Disk /dev/sda: 9105 MB, 9105018880 bytes
/dev/sda1   *        2048      526335      262144   83  Linux
/dev/sda2          526336    17303551     8388608   83  Linux
/dev/sda3        17303552    17783239      239844   82  Linux swap
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
/dev/sdb1            2048  1953525167   976761560   83  Linux
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
/dev/sdc1            2048   488397167   244197560   83  Linux
Disk /dev/sdd: 251.0 GB, 250999111168 bytes
/dev/sdd1   *        2048     1050623      524288   83  Linux
/dev/sdd2         1050624   490231807   244590592   83  Linux
Disk /dev/mapper/SecStor: 1000.2 GB, 1000201740288 bytes
And when I reboot, the system is able to find and mount the SecStor encrypted drive. Where as before, the boot would fail due to the order of the drives being changed.

When I started the installation I wrote LILO to a floppy disk. Once I got everything up and running I installed grub from slackbuilds.org, configured and wrote it to the SCSI drive (/dev/sda).

I reordered the drives in BIOS but when I rebooted my SCSI drive remained as /dev/sda. It seems that before I changed the order it would become /dev/sde and the system would not boot. Since everything is working, I going with "If it works don't fool with it!"

Slack rocks! ...and so does slackbuilds.org!

-JJ
 
Old 10-19-2012, 11:01 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,312

Rep: Reputation: Disabled
Quote:
Originally Posted by jjthomas View Post
I had to skip using an encrypted LVM for my root partition.
Yes, that was exactly what that other thread was attempting to address. If you're not using an encrypted root then things get much easier as you can use crypttab with UUIDs, LABELs or even LVM LV device names, as you've already discovered.

Anyway, glad you've found a solution.
 
Old 10-29-2012, 11:40 PM   #5
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 242
Blog Entries: 2

Original Poster
Rep: Reputation: 28
After seeing the reports on the ext4 bug, I rebuilt my systems and returned to jfs. I was able to get this solved my determining the drive order after booting. It still went to the single user prompt since I could not open my encrypted root directory. But I was able to see where Slackware put the drive containing my root directory. Then I had to reboot from the installation CD-ROM, rerun initrd pointing to the booting drive, update lilo.conf to install lilo on the booting drive,

run lilo to install lilo <-- critical

and everything works. I still mount the rest of my drives by UUID.

It seems the difficulty is to find where the root partition lies once Slackware is installed. Running an encrypted /root makes it a little more difficult, but once I figured out how the pieces looked, the puzzle came together rather nicely.

I am marking this solved.

-JJ
 
  


Reply

Tags
encryption, initrd, label, lilo, lvm


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
[SOLVED] Installing Slackware (everything) on LVM Aurorius Slackware - Installation 10 09-10-2012 09:05 PM
Installing Slackware entirely on LVM astanton Slackware - Installation 4 01-29-2012 02:15 PM
[SOLVED] Installing Slackware 13.37 with a LVM as root nigel_galloway Slackware - Installation 2 06-24-2011 06:23 PM
Installing pidgin-encryption-3.0 in slackware 12.0 Acron_0248 Slackware 2 12-10-2007 07:50 PM
installing Slackware 10.2 w/ Kernel 2.6 and LVM alphahawk Slackware 4 12-05-2005 01:49 PM


All times are GMT -5. The time now is 05:05 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration