关于 Ubuntu 根分区加密引导的问题!

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
zhangjint5
帖子: 304
注册时间: 2011-01-02 12:31

关于 Ubuntu 根分区加密引导的问题!

#1

帖子 zhangjint5 » 2017-01-11 8:12

Ubuntu 安装在经常移动使用的SSD上,有安全需要,所以对 root 分区使用 crypt 加密。对于其引导有些不明白的地方!

如图:grub 中的 root 指向 crypt 解密后的 mapper 块设备

也就是说输入密码解密前,这个设备是无效的。那么为什么不是出现 root 文件系统加载失败,而是提示输入 crypt 密码?

有几次 update-initramfs 后,就出现不提示输入 crypt 密码,而是直接报错找不到 root 分区。但是引导到 live 中查看 crypt 分区和 boot 分区都正常。这种情况如何修复?

是不是在加密 root 分区的系统中 initrd.img 有什么特别的地方?

还有修复 grub 的时候有针对 crypt 的特殊配置吗?
附件
Screenshot from 2017-01-11 07-57-34.jpg
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于 Ubuntu 根分区加密引导的问题!

#2

帖子 poloshiao » 2017-01-11 8:37

修复 grub 的时候有针对 crypt 的特殊配置吗?
是提示输入 crypt 密码?
1. 在 /etc/default/grub 加上 GRUB_ENABLE_CRYPTODISK 參數設定
然後
sudo update-grub
sudo update-initramfs -u -k all
產生 grub.cfg 開機選單
1-1. 參閱
http://mcs.une.edu.au/doc/grub2-tools/g ... figuration
6.1 Simple configuration handling
‘GRUB_ENABLE_CRYPTODISK’
If set to ‘y’, grub2-mkconfig and grub2-install will check for encrypted disks and generate additional commands needed to access them during boot. Note that in this case unattended boot is not possible because GRUB will wait for passphrase to unlock encrypted container.

2. 其它參閱
使用 encrypt 關鍵字 搜尋 :
http://mcs.une.edu.au/doc/grub2-tools/grub.html
zhangjint5
帖子: 304
注册时间: 2011-01-02 12:31

Re: 关于 Ubuntu 根分区加密引导的问题!

#3

帖子 zhangjint5 » 2017-01-13 9:43

感谢,研究中.........
回复