<HTML ><HEAD ><TITLE >Mounting the encrypted file system</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Cryptoloop HOWTO" HREF="index.html"><LINK REL="PREVIOUS" TITLE="Setting up the loop device" HREF="loopdevice-setup.html"><LINK REL="NEXT" TITLE="Using a file instead of a partition" HREF="filebased.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Cryptoloop HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="loopdevice-setup.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="filebased.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="mounting-filesystem" ></A >6. Mounting the encrypted file system</H1 ><P > For all operations on the Cryptoloop device, it is important that the necessary modules are loaded. You need to load at least the Cryptoloop module and the modules for each cipher with <B CLASS="command" >modprobe</B >. If the features are compiled directly into the kernel, this is not necessary. </P ><P >In order to mount the encrypted file system created above, you can use the standard mount command from util-linux: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" >mount -t ext3 /dev/sda1 /mnt/crypto/ -oencryption=aes-256</PRE ></FONT ></TD ></TR ></TABLE ><P >You will be prompted for the password and the file system will be mounted just as any other. Since the encryption option implies that this is a Cryptoloop filesystem, it will automatically pick an available loopback device. </P ><P >When you are done, unmount it with: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" >umount /mnt/crypto</PRE ></FONT ></TD ></TR ></TABLE ><P >You can add the following line to <TT CLASS="filename" >/etc/fstab</TT >: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" >/dev/sda1 /mnt/crypto ext3 noauto,encryption=aes-256 0 0</PRE ></FONT ></TD ></TR ></TABLE ><P >Now you can simply mount the device with: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" >mount /mnt/crypto</PRE ></FONT ></TD ></TR ></TABLE ><P >That's it. Have fun.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="loopdevice-setup.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="filebased.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Setting up the loop device</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Using a file instead of a partition</TD ></TR ></TABLE ></DIV ></BODY ></HTML >