來源:互聯網
上載者:User
關鍵字
關閉
password
kernel
下面
md5
Ubuntu如何關閉GRUB互動編輯?
grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
搜尋這一段文字
...
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# 例如 password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
在這下面新增下面這一行
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (這是編碼過的密碼)
搜尋這一段文字
...
title HTTP://www.aliyun.com/zixun/aggregation/13835.html">Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot
...
用下面這幾行取代
#title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
#root (hd0,1)
#kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
#initrd /boot/initrd.img-2.6.10-5-386
#savedefault
#boot
保存編輯過的檔。