GRUB

用password和password_pbkdf2可以设置密码。不过这个密码设置不需要放到启动项的前面,放后面也一样有效,所以放到40_custom也可以。配置如下:

$ cat /etc/grub.d/40_custom

#!/bin/sh

exec tail -n +3 $0

# This file provides an easy way to add custom menu entries. Simply type the

# menu entries you want to add after this comment. Be careful not to change

# the 'exec tail' line above.

set superusers="root"

password_pbkdf2 root grub.pbkdf2.sha512.10000.longhashstring