LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-24-2023, 07:15 PM   #1
robcampbell
Member
 
Registered: Nov 2019
Posts: 34

Rep: Reputation: Disabled
Encryption and LVM install not working.


I'm having a difficult time installing Debian 12 on a 3 drive system. 2 6 TB drives and 1 2 TB drive. I want the 2 6tb drives to be part of a multimedia LVM and I want it encrypted.

When doing this, the installation says I need to encrypt swap however, automatic partitioning didn't create a swap partition. So I had to delete the 2T partition, create an efi partition because it complained about that and I chose to create the encryption for all 3 partitions at once. I also tried by first creating the LVM for multimedia and encrypting that and swap but still having a problem booting.

It asks for the password and depending on how I set it up, either multimedia passes but swap does not and it puts me in a emergency mode loop or it doesn't accept the password and puts me in an emergency mode loop.
 
Old 08-26-2023, 07:47 AM   #2
robcampbell
Member
 
Registered: Nov 2019
Posts: 34

Original Poster
Rep: Reputation: Disabled
This is the error message I get after the install completes.

Quote:
Please unlock disk sda2_crypt:
cryptsetup: sda2_crypt: set up successfully
/dev/sda3: clean, 168828/121118720 files, 9198873/484448000 blocks

Please enter passphrase for disk multimedia-data (multimedia-data_crypt) on /multimedia::*

Please enter passphrase for disk multimedia-data (multimedia-data_crypt) on /multimedia::
[FAILED] Failed to start systemd-cryptsetupemultimedia\x2ddata_crypt.service - Cryptography Setup for multimedia-data_crypt.
[DEPEND] Dependency failed for cryptsetup.target Local Encrypted Volumes.
[DEPEND] Dependency failed for dev-mapper-multimedia\x2ddata_crypt.device - /dev/mapper/multimedia-data_crypt.
[DEPEND] Dependency failed for multimedia.mount /multimedia. [DEPEND] Dependency failed for local-fs.target - Local File Systems.
[DEPEND] Dependency failed for systemd-fsck@dev-mapper-multimedia\x2ddata_crypt.service - File System Check on /dev/mapper/multimedia-data_crypt.
[ OK ] Finished plymouth-read-urite.service - Tell Plymouth To Write Out Runtime Data.
Mounting proc-sys-fs-binfmt_misc.mount Arbitrary Executable File Formats File System...
[ OK ] Mounted proc-sys-fs-binfmt misc.mount Arbitrary Executable File Formats File System
[ OK ] Finished systemd-binfmt.service Set Up Additional Binary Formats.
[ OK ] Finished systemd-tmpfiles-setup.service Create Volatile Files and Directories.
Starting systemd-timesyncd.service Network Time Synchronization...
Starting systemd-update-utmp.service Record System Boot/Shutdown in UTMP...
[ OK ] Finished systemd-update-utmp.service - Record System Boot/Shutdown in UTHP.
Starting systemd-update-utmp-runlevel.service Record Runlevel Change in UTMP...
[ OK ] Finished systemd-update-utmp-runlevel.service Record Runlevel Change in UTMP.
[ OK ] Started systemd-timesyncd.service- Network Time Synchronization.
[ OK ] Reached target time-set.target System Time Set. -
[ OK ] Finished apparmor.service- Load AppArmor profiles.
Starting networking.service- Raise network interfaces
[ OK ] Finished networking.service- Raise network interfaces.
[ OK ] Reached target network.target Network.
[ OK ] Reached target network-online.target Network is Online.
You are in emergency mode. After logging in, type "Journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.

Cannot open access to console, the root account is locked.
See sulogin (8) man page for more details.

Press Enter to continue.

Reloading system manager configuration
Starting default.target
Please enter passphrase for disk multimedia-data (multimedia-data_crypt) on /multimedia:
Please enter passphrase for disk multimedia-data (multimedia-data_crypt) on /multimedia:
Please enter passphrase for disk multimedia-data (multimedia-data_crypt) on /multimedia:
You are in emergency mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.

Cannot open access to console, the root account is locked.
See sulogin (8) man page for more details.

Press Enter to continue.

Reloading system manager configuration
Starting default.target
 
Old 09-08-2023, 09:59 PM   #3
obobskivich
Member
 
Registered: Jun 2020
Posts: 596

Rep: Reputation: Disabled
I'm taking a shot in the dark here, but if I understand what you want, roughly:

You have 3 physical disks, lets call them /dev/sda, /dev/sdb, and /dev/sdc for simplicity -
- /dev/sda is a 2TB drive that I'm assuming you want to install the base system on
- /dev/sdb and /dev/sdc are matching 6TB drives that you want in some sort of LVM (how configured/why/etc) for additional storage, and also wanat it encrypted

Some thoughts: if you don't care about the base system being encrypted (you don't specify and I'm not going to presume to tell you how to setup your box), just install Debian as normal on the 2TB and then configure the encrypted volume from within the working system (much easier to do this than in the installer), and configure auto-decrypt/auto-mount if wanted there too (you can do almost all of this from within GUI in GNOME Disks if you're setting up a GUI on this system that is, except for the initial LVM configuration, the rough steps are to create the LVM out of the two PVs and then you can configure it in Disks with encryption and mount options very easily with step-thru menus).

Alternatively, depending on why/how you intend to use the LVM, it may be also worth considering mdadm or a union mount for those two drives, which have different possibilities for configuration, but again I'd do this post-install

If you want the system drive also encrypted, I would only bother with that at setup (the trend line here is: leave all the secondary disks until after you have a booting system to make life easier), and you can probably find guides online for setting up encrypted Debian install - I honestly don't know what the Debian installer itself offers these days for FDE (Full Disk Encryption), but if you aren't explicitly wedded to Debian, a number of Debian-based distros (like Ubuntu and Sparky) offer essentially 'one click' FDE in their installers, and will setup the associated LUKS/LVM provisioning on the disk (the Debian 12 installer may offer this also).

As far as swap - setting up a separate encrypted partition will be obnoxious (or more broadly: doing this without LVM for FDE will be obnoxious), the most easy way to do this is to (after you have a booting FDE install on the system) set a swapfile on the / disk (or wherever you want it actually), otherwise you can do it the 'Ubuntu way' (as in, how their installer will automatically configure things) and create a second LV on the / disk vg (e.g. /dev/sda from above example), to use Ubuntu's naming (because it will make sense) you will have a vg called something like vgubuntu, and then within it will have two LVs, one will vgubuntu/root and one will be vgubuntu/swap, and default makes swap 1GB. This is less flexible IMO because if you need to resize swap you have to resize the LV which may mean resizing both LVs against the vg, and then resizing the file system, which isn't suggested against a mounted fs (and if that mounted fs happens to be root, you see where this is going...), whereas with swapfile you can just instance a second swapfile and enable it if you need more capacity at some point in the future.

Finally if it isn't clear, I would also probably 'start over' with this install from a blank slate.
 
  


Reply

Tags
debian 12, encryption, installation, lvm



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
Mint 18 Full disk encryption VS Veracrypt Full Disk encryption: Help a Noob Decide Please ! APeacefulRig Linux - Security 2 11-11-2016 08:10 AM
[SOLVED] Non-system partition encryption versus container-file encryption of equal size Ulysses_ Linux - Security 13 07-17-2015 07:38 PM
Alternate CD LVM Encryption Install scrappydoo Ubuntu 0 07-16-2008 06:36 PM
Linux password encryption and data encryption Tux-Slack Programming 4 06-20-2007 06:46 AM
Mandrake 9.0 Wireless Works without encryption.. does not with encryption topcat Linux - Wireless Networking 3 05-04-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09: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