1, in your own terminal grub-md5-crypt, in the emergence of passwd: prompt enter your password (note, in Linux input password is not displayed), retype password: enter the password again. Here we will use 123456 for demonstration.
[ ZYJ
@ Fedora13 ~] $ Grub-md5-crypt
Password:
Retype password:
$1 $ gpgkm/$ no0gm4nym. zno7myl. rgp0
What we get here is the string after the password is 123456 encrypted, which must be noted down and useful later.
2. modify the configuration file/etc/grub. conf.
When modifying the configuration file, use the VI editor. You must use the Super User here, because the common user has insufficient permissions.
Below are unencrypted original configuration files:
Default = 0
Timeout = 4
Splashimage = (hd0, 2)/boot/GRUB/splash.xpm.gz
Title fedora (2.6.34.7-56. fc13.i686. PAE)
Root (hd0, 2)
Kernel/boot/vmlinuz-2.6.34.7-56.fc13.i686.PAE Ro
Root = UUID = 4a60f9c2-0eae-4c55-b294-60bc90f391cd rd_no_luks rd_no_lvm
Rd_no_md rd_no_dm lang = zh_CN.UTF-8 keytable = US rhgb quiet
Initrd/boot/initramfs-2.6.34.7-56.fc13.i686.PAE.img
Title Windows 7
Rootnoverify (hd0, 0)
Chainloader + 1
I will not describe this configuration file one by one. Next we will see where the MD5-encrypted string is added to the configuration file. The following is the modified configuration file:
Default = 0
Timeout = 4
Splashimage = (hd0, 2)/boot/GRUB/splash.xpm.gz
Password -- MD5 $1 $ gpgkm/$ no0gm4nym. zno7myl. rgp0
Title fedora (2.6.34.7-56. fc13.i686. PAE)
Lock
Root (hd0, 2)
Kernel/boot/vmlinuz-2.6.34.7-56.fc13.i686.PAE Ro
Root = UUID = 4a60f9c2-0eae-4c55-b294-60bc90f391cd rd_no_luks rd_no_lvm
Rd_no_md rd_no_dm lang = zh_CN.UTF-8 keytable = US rhgb quiet
Initrd/boot/initramfs-2.6.34.7-56.fc13.i686.PAE.img
Title Windows 7
Rootnoverify (hd0, 0)
Chainloader + 1
Here, lock is used to lock fedora. An error is prompted during startup, requiring you to press P to enter the password.
In this way, the grub MD5 encryption is simple. You can try it on your own !!!