March 27, 2015, 01:54:47 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
Author Topic: HOWTO make encrypted home partition using LUKS work  (Read 2876 times)
Posts: 1

« on: March 12, 2009, 04:19:26 am »


This is not a howto about how to create an encypted home partition, there are a lot of good ones there, on the internet (as an example: But for some reason, mounting it automatically at the startup seems to be problematic in VL.

So, here is the solution:

1. create a new file in  /etc/rc.d called rc.cryptinit
# file: /etc/rc.d/rc.cryptinit
# if this script is executed when home is opened, tries to close it;
# otherwise, tries to open it, for three times, then continue without
# opening it
if [ -b /dev/mapper/crypthome ]; then
    /sbin/cryptsetup luksClose crypthome
    while [ $i -gt 0 ]; do
        let "i -= 1"
        /sbin/cryptsetup luksOpen /dev/hda2 crypthome && i=0
Of course, modify /dev/hda2 with your partition (/dev/sdXX, /dev/hdXX or whatever it is) and put instead of crypthome whatever you like. This will be the name used in /dev/mapper/...

2. make it executable
# chmod +x /etc/rc.d/rc.cryptinit

3. put a record about it in /etc/rc.d/rc.S
just before the line with "# Start file systems" (around line 60 at this moment), because we need it before actually begin to mount the filesystems.

# Creating device mapping for encrypted devices

4. In /etc/fstab you must have already
/dev/mapper/crypthome   /home   ext3    defaults        0 0
or something similiar.

Reboot and you should be prompted for LUKS passphrase. Otherwise, check again the steps. Good Luck!
Posts: 11

« Reply #1 on: September 03, 2009, 04:17:54 am »

Thanks a million :p

This is what actually kept me from running vector linux as my default system.

Works on VL6.0

Distro: VL 5.8 -- Kernel:
MSI P965 NEO-f socket 775 - Core2duo E6300- 2 GB PC6400 XMS memory - MSI NX7600GT passive - WD 250GB harddrive S-ata - LITE-ON  DVDRW SH-16A7S S-ata
+ my server ==> vl 5.8 on Mini-itx Epia EN15000 with 250GB samsung pata disk
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!