1. 对任何分区都可进行加密,磁盘最严格保护,工具:luks 默认安装。
2. 具体步骤:
1@#fdisk /dev/sda
2@ Command (m for help): p
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb7cb
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3076 24707938 c W95 FAT32 (LBA)
/dev/sda2 3077 9730 53442655 f W95 Ext'd (LBA)
/dev/sda5 3077 6301 25904781 7 HPFS/NTFS
/dev/sda6 6302 6325 184320 83 Linux
/dev/sda7 6325 8237 15360000 83 Linux
/dev/sda8 8237 8900 5324800 83 Linux
/dev/sda9 8900 9347 3592192 83 Linux
/dev/sda10 9347 9730 3070976 82 Linux swap / Solaris
Command (m for help): n //此处假设是sda11
Command (m for help): w
3@# reboot
4@#cryptsetup luksFormat /dev/sda11
5@#cryptsetup luksOpen /dev/sda11 sda11box //取个名字
6@#mkfs.ext4 /dev/mapper/sda11box //格式化分区
7@#mkdir /sdbox //创建一个分区
7@#mount /dev/mapper/sda11box /sdbox //挂在加密分区
@#df -h //查看一下
8@#touch example //新建一些目录待会儿看一下
9@#cryptsetup luksClose /dev/sda11
10@#blkid /dev/mapper/sda11 //获取UUID 相当于一个label
11@#vim /etc/fstab
UUID= /sdbox ext4 defaults 0 0
12@#vim /etc/crypttab
sda11box /dev/mapper/sda11 // /dev/sda11
13@#reboot // ok le 看和以前有什么区别不
阅读(1049) | 评论(0) | 转发(0) |