ฉันจะรับ update-grub เพื่อจดจำเคอร์เนล linux-surface ได้อย่างไร
Aug 18 2020
ฉันมี Surface Pro 4 เคอร์เนลพื้นผิว linux ( github ) ให้การสนับสนุนฮาร์ดแวร์ที่ดีกว่าเมล็ดในสต็อก แต่น่าเสียดายที่update-grub
ไม่รู้จัก
ฉันสามารถใส่รายการได้/etc/grub.d/40_custom/
แต่ต้องทำด้วยตนเองทุกครั้งที่มีการอัปเดตเคอร์เนล
### BEGIN /etc/grub.d/40_custom ###
# 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.
menuentry 'Ubuntu (4.19.139-surface-lts)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
savedefault
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root cf93f3eb-59be-4eba-835b-03ac8f082424
else
search --no-floppy --fs-uuid --set=root cf93f3eb-59be-4eba-835b-03ac8f082424
fi
linux /boot/vmlinuz-4.19.139-surface-lts root=UUID=cf93f3eb-59be-4eba-835b-03ac8f082424 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.19.139-surface-lts
}
### END /etc/grub.d/40_custom ###
ฉันupdate-grub
จะรับรู้เมล็ด linux-surface โดยอัตโนมัติได้อย่างไร
แก้ไข: ข้อมูลเพิ่มเติม
- dpkg - รายการ | grep linux-image
- grub.cfg - โปรดสังเกตว่ามันเพิ่ม "timeout: menu" ที่ไม่เกี่ยวข้องหลังจาก 30_OS_Prober
- อัปเดตด้วง 40_custom และ ls / boot
คำตอบ
Sub-ZeroXXX Aug 20 2020 at 06:28
เพิ่มเป็นไฟล์ 06_custom ใน /etc/grub.d/06_custom ใน / etc / default / grub เปลี่ยน GRUB_DEFAULT = 6 ค่าเริ่มต้นตั้งเป็น 0 เพื่อบูต 00_header 6 เพื่อให้ตรงกับ 06_custom
ฉันคิดว่านั่นเป็นวิธีที่ตัวเลขทำงานสำหรับรายการเมนูที่ฉันอาจพลาด ไม่กี่ขั้นตอน :)
คู่มือด้วงนี้มีทุกสิ่งที่คุณต้องการมีประโยชน์มาก :)
https://www.gnu.org/software/grub/manual/grub/grub.html#Overview