LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 09-15-2019, 06:52 AM   #1
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
cryptsetup fails on boot with separate /usr partition


/sbin/cryptsetup is a dynamic executable, and two of its libraries (libcryptsetup and libjson) reside in /usr/lib{,64}/.

Encrypted volumes are supposed to be opened before non-root volumes get mounted. If /usr is in a separate volume, /sbin/cryptsetup can't run from /etc/rc.d/rc.S during boot.

(Although I vaguely remember a thread where Pat stated, or at least suggested, that separate /usr partitions are deprecated in Slackware... but my memory might be failing me here.)
 
Old 09-15-2019, 07:42 AM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,508

Rep: Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320Reputation: 3320
Quote:
Originally Posted by gus3 View Post
/sbin/cryptsetup is a dynamic executable, and two of its libraries (libcryptsetup and libjson) reside in /usr/lib{,64}/.

Encrypted volumes are supposed to be opened before non-root volumes get mounted. If /usr is in a separate volume, /sbin/cryptsetup can't run from /etc/rc.d/rc.S during boot.

(Although I vaguely remember a thread where Pat stated, or at least suggested, that separate /usr partitions are deprecated in Slackware... but my memory might be failing me here.)
This separate /usr partitioning issue was discussed in this forum for multiple times.

Long story short, Mr. Volkerding does NOT support anymore a logical division between "root" and "usr", where all binaries from /bin and /sbin to be self-contained into / (root partition) and many of those binaries uses libraries from /usr, not only cryptsetup but even udevd and many others.

However, there's a well known way to use a physical division of /usr in a separate partition: to mount the "/usr" and whatever other partition - for example "/var", from the initrd.

The bad news is that by default the Slackware initrd design does not have support for those "/usr" or "/var" mounting, and it even does not have a modular design, where the user to "inject" particular script snippets, like other distributions do. So you have to modify this script itself yourself as you like.

The even more bad news is that that initrd design does not have a way to "clean rebuild" the initrd, preserving your script changes.

So, if you use a separate block device for your "/usr", in my own case I do not use a separate partition but a compressed file to reduce the system size, you can very easily override your changes using the "-c" switch and if you do not notice that before reboot, the end result is probably an unbootable system - unless you have another valid boot entry or a live system for recovery.

Myself, I tried to discuss in the near past about the limitations from the current initrd design, but looks like The Powers That Be are not interested about this subject.

Last edited by LuckyCyborg; 09-15-2019 at 07:51 AM.
 
1 members found this post helpful.
Old 09-15-2019, 06:13 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Well, you have to go in and patch mkinitrd as well. OTOH, I didn't find the effort to be worth it; I just encrypt my LVM PV(s) instead.
 
  


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
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
[SOLVED] Booting LFS on separate USB HDD + separate /boot parition nivwusquorum Linux From Scratch 33 12-14-2011 06:38 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
FreeBSD 6.2, no /usr/src/tools and /usr/src/usr.bin, failed to build world. Mr_Shameless *BSD 4 05-16-2008 08:43 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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