LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 11-26-2011, 10:05 PM   #1
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 217

Rep: Reputation: 36
How to configure /etc/fstab to auto mount encrypted partition?


Recently installed openSUSE 12.1 dual booting with Debian.


Layout listed below:
Code:
Debian     ext3    /root   sda1     
Debian     ext3    /home   sda2  (encrypted with luks)
           swap    swap    sda3
openSUSE   ext4    /       sda5     
openSUSE   ext4    /home   sda6  (encrypted with luks)

When in Debian, I am able to manually mount openSUSE /home (sda6) and get the files that I needed from there.

Wanted to know how to configure Debian's /etc/fstab so that I can automatically mount sda6 (after entering password) during boot.

Thanks

Last edited by michalng; 11-26-2011 at 10:06 PM. Reason: Fixed typo
 
Old 11-27-2011, 10:45 PM   #2
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
I had asked a similar question. I didn't get a response either. So I am guessing the answer is no.
 
Old 11-28-2011, 05:49 AM   #3
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 217

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Amdx2_x64 View Post
I had asked a similar question. I didn't get a response either. So I am guessing the answer is no.
LOL,
this is a good reply,
thanks for the heads up.
 
Old 11-28-2011, 11:53 AM   #4
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44
How do you mount Debian in openSUSE? Maybe you can wright a script for your autostart when logging in or maybe rclocal. Documentation seams to be skimpy on the and the only thing I could find was an FAQ that said to mount with a loop0 when doing a backup.


Try this site. http://code.google.com/p/cryptsetup/

Code:
Package: cryptsetup                      
State: not installed
Version: 2:1.1.3-4squeeze2
Priority: optional
Section: admin
Maintainer: Debian Cryptsetup Team <pkg-cryptsetup-devel@lists.alioth.debian.org>
Uncompressed Size: 1,204 k
Depends: libc6 (>= 2.3), libdevmapper1.02.1 (>= 2:1.02.36), libpopt0 (>= 1.16), libuuid1 (>= 2.16), dmsetup
Suggests: udev, initramfs-tools (>= 0.91) | linux-initramfs-tool, busybox, dosfstools
Conflicts: cryptsetup-luks
Breaks: hashalot (< 0.3-2)
Replaces: cryptsetup-luks, hashalot (< 0.3-2)
Provides: cryptsetup-luks
Description: configures encrypted block devices
 Cryptsetup provides a command-line interface for configuring encrypted devices. This is done using the Linux kernel device mapper target dm-crypt. This
 version of cryptsetup has integrated support for LUKS. 
 
 cryptsetup is backwards compatible with the on-disk format of cryptoloop, but also supports more secure formats. This package includes support for
 automatically configuring encrypted devices at boot time via the config file /etc/crypttab. Additional features are cryptoroot support through
 initramfs-tools and several supported ways to read a passphrase or key.
Homepage: http://code.google.com/p/cryptsetup/
That's all I could find and you may have all ready seen this stuff.
 
Old 11-28-2011, 12:07 PM   #5
62chevy
Member
 
Registered: Mar 2002
Location: West (By God) Virginia
Distribution: Debian Squeeze - Sid
Posts: 281

Rep: Reputation: 44
Try this Howto from Arch Linux. https://wiki.archlinux.org/index.php...tion_with_LUKS Looks like they go into it in depth.
 
Old 12-25-2011, 06:04 AM   #6
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 217

Original Poster
Rep: Reputation: 36
Found the answer, logged here for future users who's looking for the same answer:


1. Add this line to /etc/crypttab:

my_encrypted_partition /dev/sda6 none luks,timeout=30



2. Set the home partition to this in /etc/fstab:

/dev/mapper/my_encrypted_partition /home ext4 nodev,nosuid,relatime 0 2



You'll be asked the passphrase for my_encrypted_partition during boot up. That's it.


Merry Christmas.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Auto-mounting ntfs partition in fstab Mithrilhall Linux - Newbie 3 09-22-2009 02:03 AM
auto mount problem and fstab Mogli Linux - Hardware 3 09-19-2008 05:13 AM
trying to auto mount xp share in fstab babag Linux - Networking 3 07-12-2008 05:48 AM
devices in /etc/fstab don't auto mount at startup : jabka Linux - General 3 08-23-2006 04:28 PM
fstab: auto mount floppy at boot blackzone Linux - Newbie 2 07-10-2006 02:17 AM


All times are GMT -5. The time now is 04:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration