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 08-04-2023, 10:30 AM   #1
I7sReact
LQ Newbie
 
Registered: Aug 2023
Location: Brazil
Distribution: Debian
Posts: 8

Rep: Reputation: 0
Cool When booting Slackware with encrypted /boot and LVM, it doesnt detects /dev/sda3 (that contains the system) to decrypt


So, im making a Slackware 15 minimal install in my External USB HDD were im going to use GRUB instead of ELILO (because i can boot in other machines more easily) in a UEFI machine, and set up encryption, with LUKS1 in the /boot partition and LUKS2 with argon2id in the partition that contains the LVM with / and /home. But during booting of the system, it doesnt detects that partition that contains the system and doesnt unlock it. So im gonna say what steps im following.

1- Partitioning

Code:
/dev/sda1 -> /boot/efi (512MiB, FAT32)
/dev/sda2
    |_ slackware_boot -> /boot (1024MiB, EXT4, LUKS1 Encryption)
/dev/sda3
    |_ slackware_sys (LUKS2 encryption with Argon2id)
             |_system
                  |_ root -> / (70GiB, EXT4)
                  |_ home -> /home (230GiB, EXT4)
2- Start the Slackware installer and them continue to the end (I dont install LILO or ELILO), in the end, instead of rebooting the machine, i enter the shell and first chroot to /mnt where the slackware install is located.

3- Editing /etc/default/grub

I add:

Code:
GRUB_ENABLE_CRYPTODISK=y
And in GRUB Kernel Parameters Line, i add:

Code:
cryptdevice=UUID=<UUID of sda3>:slackware_sys root=/dev/system/root
Save and exit

4- Editing /etc/crypttab

Code:
slackware_boot  UUID=<UUID of sda2> none luks
slackware_sys   UUID=<UUID of sda3> none luks
(Idk how to setup a keyfile correctly yet, so i leave it as none)

5- Editing /etc/fstab

I change stuff like /dev/sda1, /dev/mapper/slackware_boot, /dev/system/root and /dev/system/home to its UUIDs counterparts

6- Rebuilding the initrd

Using the mkinitrd tool. I rebuild using the following flags

Code:
mkinitrd -c -k 5.15.19 -m ext4:usbhid:usb-storage:jbd2:ehci-hcd -f ext4 -r /dev/system/root -C /dev/sda3 -L -l br-abnt2
7- Installing GRUB

Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck
grub-mkconfig -o /boot/grub/grub.cfg
8- Rebooting the machine

So, rebooting the machine i can boot and enter the unlocking GRUB phase. Where it has no problems, but after that, when trying to boot at the system and loading the kernel, it says that dont detects /dev/sda3 to decrypt it, so it hangs me to a emergency mode.

I followed a lot of guides, blogs and posts to help me making this Slackware install. From the ArchWiki, LinuxQustions.org and some blogs scattered through out the web. Some stuff

https://wiki.archlinux.org/title/Dm-...ystem#top-page
https://wiki.archlinux.org/title/GRUB#Encrypted_/boot
https://www.tumfatig.net/2022/slackw...n-uefi-laptop/
https://linorg.usp.br/slackware/slac...ADME_CRYPT.TXT
https://linorg.usp.br/slackware/slac...EADME_UEFI.TXT
https://www.youtube.com/watch?v=K7PQS0NEJsQ
https://www.linuxquestions.org/quest...fi-4175582667/

Last edited by I7sReact; 08-04-2023 at 10:44 AM. Reason: Adding links
 
Old 08-04-2023, 11:44 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
When I clicked on this thread before answering it comes empty. A few minutes ago there was a post (not this one, as I am not the OP). I am the only one to see that?

Last edited by Didier Spaier; 08-04-2023 at 11:45 AM.
 
Old 08-04-2023, 11:50 AM   #3
I7sReact
LQ Newbie
 
Registered: Aug 2023
Location: Brazil
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Didier Spaier View Post
When I clicked on this thread before answering it comes empty. A few minutes ago there was a post (not this one, as I am not the OP). I am the only one to see that?
Wait, I reentered now to see if i got a reply, and WTF happened with the entire post, it simply disapeared the entire text? This was my first post here, maybe i forgot to click in something? And the worst part is that i edited the text about 2 times adding stuff for context and links

And now my long text disapeared, how cool is that? Now i dont want to rewrite all the text to post it again. Feeling lazy that i waste 15min putting details to, but in the end my entire post disapear

And funny thing is, when i enter in My Posts page, it doesnt appear nothing, like if i never posted something WTF

Last edited by I7sReact; 08-04-2023 at 11:53 AM.
 
Old 08-04-2023, 12:21 PM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,915

Rep: Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033
I good habit to get into with this site is to copy long posts to your clipboard just in case. I've had it happen to me a number of times and yes, it's very frustrating when that happens.

Not just you Didier. Thread was empty here too. Very odd.
 
Old 08-04-2023, 12:31 PM   #5
I7sReact
LQ Newbie
 
Registered: Aug 2023
Location: Brazil
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GazL View Post
I good habit to get into with this site is to copy long posts to your clipboard just in case. I've had it happen to me a number of times and yes, it's very frustrating when that happens.

Not just you Didier. Thread was empty here too. Very odd.
Thanks for saying that stuff like this can happen.
Gonna use a Clipboard to these longer texts from now on.

I created some will to redo all over the text
Im gonna post it again when ready

Last edited by I7sReact; 08-04-2023 at 12:32 PM.
 
Old 08-04-2023, 01:26 PM   #6
I7sReact
LQ Newbie
 
Registered: Aug 2023
Location: Brazil
Distribution: Debian
Posts: 8

Original Poster
Rep: Reputation: 0
The new post

https://www.linuxquestions.org/quest...st-4175727721/
 
  


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
[SOLVED] Unable to decrypt root fs with UEFI+encrypted LVM arcctgx Slackware 5 08-28-2016 01:12 PM
/dev/sda3: recovery journal ,/dev/sda3: clean,170684/516096,1197311/2061568 blocks parvaz_hj Linux - General 3 11-02-2013 06:44 PM
after kernel upgrade slackware boots only if I pass root=/dev/sda3 when booting zux Slackware 5 12-05-2008 09:50 AM
lilo /dev/sda3 not a valid boot dev puntjuh Linux - Software 1 02-15-2007 05:29 PM
How do I switch the labels "/dev/sda1" with "/dev/sda3" vonst Linux - General 10 05-27-2006 10:48 PM

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

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