1)grub-mkpasswd-pbkdf2
拿到类似
grub.pbkdf2.sha512.10000.C093FE6825CDCC2F84934ABC406445E92EE098733C60E6D1EC037ED4BDC31D13DEC18DF2554800BBA6273E9073C10BE4018CA011700C05129D7A2AEF55436591.C8ECE34353FF2CBC2319DCCDDE1BE3F2EEE653FC56587951CC11932BA31E3E940B82BBF0CF111EDCF9F9CD805517C0D1E058BF611D5EE10B9282BFB99A1E0705
2)sudo vim /etc/grub.d/40_custom
追加
set superusers= "用户名"
password_pbkdf2 用户名 grub.pbkdf2.sha512.10000.C093FE6825CDCC2F84934ABC406445E92EE098733C60E6D1EC037ED4BDC31D13DEC18DF2554800BBA6273E9073C10BE4018CA011700C05129D7A2AEF55436591.C8ECE34353FF2CBC2319DCCDDE1BE3F2EEE653FC56587951CC11932BA31E3E940B82BBF0CF111EDCF9F9CD805517C0D1E058BF611D5EE10B9282BFB99A1E0705
export superusers
3)sudo update-grub
时间: 2024-10-29 19:10:02