mirror of
https://github.com/ovh/the-bastion.git
synced 2026-05-09 16:35:33 +02:00
[GH-ISSUE #367] Unable to encrypt /home before the installation #97
Labels
No labels
answered
bug
documentation
enhancement
enhancement
feature
feature
kept-open-for-info
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/the-bastion#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fluuflute on GitHub (Mar 2, 2023).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/367
Hello,
If we follow the documentation, we can't encrypt /home before the installation : https://ovh.github.io/the-bastion/installation/basic.html#encrypt-home. We get this error :
@speed47 commented on GitHub (Mar 2, 2023):
Hello,
Thanks for the report, this is actually fixed in this branch: https://github.com/ovh/the-bastion/pull/366
It's not yet merged, if you want to go through manually, you can run this before calling
setup-encryption.sh:cp /opt/bastion/etc/bastion/luks-config.sh.dist /etc/bastion/luks-config.sh@speed47 commented on GitHub (Mar 3, 2023):
Fix merged to main branch, closing as fixed. Please reopen if needed :)
@fluuflute commented on GitHub (Mar 3, 2023):
Thank you!
@ksourdrille commented on GitHub (Mar 15, 2023):
Hello @speed47,
I'm not able to encrypt /home before installation like this issue, i've done this
cp /opt/bastion/etc/bastion/luks-config.sh.dist /etc/bastion/luks-config.shwhen i've this error[ERR.] The '/etc/bastion/luks-config.sh' file doesn't exist, did you run the '/opt/bastion/bin/admin/install' script before?and this :

modified in the script

but i've the error aswell

do you have any idea ?
Kélian
@fluuflute commented on GitHub (Mar 15, 2023):
Hello @keliansrdl,
To resolve the problem, I install the bastion, then I encrypt the /home :
@ksourdrille commented on GitHub (Mar 15, 2023):
Hello @f-fatien, Thanks for answer, i already tried this, my bastion is installed now and i have the error :

i saw this :

i had to run this command before launch the script ?
UPDATE : i've generated codes with the command before run script, and i've the error aswell
Kélian
@fluuflute commented on GitHub (Mar 15, 2023):
No, pwgen is just to generate a strong password for the passphrase.
Maybe the script abort because you write 'yes' in lowercase. Try to write YES in capital letters.
@ksourdrille commented on GitHub (Mar 15, 2023):
Ok you're right, that was "YES" instead of "yes" but now I have a new error 😢 thanks

Do you know if LVM impact this ?
Kélian
@speed47 commented on GitHub (Mar 16, 2023):
The script tries to
umountthe partition before callingcryptsetupon it, this is precisely to ensure the partition is not currently used. So either theumountdidn't work (but the script should have told you and abort), or you have this partition mounted in several different places (maybe usingmount -o bind).The script can't detect all cases and oddities that can occur on all systems, this is just a helper to save you some time. You can always encrypt your
/homepartition yourself before installing the bastion. If you want to retry it, can you try a clean reinstall, and if it fails, paste the complete non-truncated output you have?Side note: LVM shouldn't cause any problem, we use it without issues.
@ksourdrille commented on GitHub (Mar 17, 2023):
Hello @speed47,
Same on a clean install,

i'm able to

umount /homewithout error :where i can see if /home is in use and blocking the script ?
Kélian
@ksourdrille commented on GitHub (Mar 17, 2023):
@speed47
UPDATE : i've uninstalled
snapdand it's good now :Thanks for all
Kélian
@ksourdrille commented on GitHub (Mar 17, 2023):
another question @speed47 , is it normal that with encryption the connection is not instantly? I have to wait ~1m30s for it to connect me
video link where i try to connect : https://youtu.be/THCfnwCp3Zg
UPDATE : i've installed a new VM with a new bastion install and that's works fine, i can connect instantly, all good 👍
Thanks :)
Kélian