天天看點

Linux分區加密

分區加密

LUKS(Linux統一密鑰設定)是标準的裝置加密格式。LUKS可以對分區或卷進行加密。挂載

分區的檔案系統時,必須首先對加密的分區或卷進行解密。

1.建立一個新分區

<a href="http://blog.51cto.com/attachment/201309/001017196.png" target="_blank"></a>

<a href="http://blog.51cto.com/attachment/201309/001053408.png" target="_blank"></a>

2.對新的分區進行加密,并設定密碼.輸入正确的密碼解密,會将加密的分區解鎖到/dev/mapper/

給解密的塊檔案,建立ext3檔案系統

<a href="http://blog.51cto.com/attachment/201309/001244967.png" target="_blank"></a>

3.建立挂載點,并挂載檔案系統。

<a href="http://blog.51cto.com/attachment/201309/001422755.png" target="_blank"></a>

4.在/etc/fstab中添加挂載條目。

<a href="http://blog.51cto.com/attachment/201309/001536342.png" target="_blank"></a>

6.啟動時自動加載密碼,自動挂載分區。

本文轉自zhang25yun51CTO部落格,原文連結:http://blog.51cto.com/1585654/1302394 ,如需轉載請自行聯系原作者

繼續閱讀