From 7faab1b46dbd5391c1f3871aece6179be4f2e419 Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 6 Dec 2024 15:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20grub=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E7=AE=80=E5=8C=96=E6=A8=A1=E5=9D=97=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=B9=B6=E8=B0=83=E6=95=B4=E7=BB=88=E7=AB=AF=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/mnt/p1/boot/grub/grub.cfg | 79 +++++++++++++-------------------- 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/files/mnt/p1/boot/grub/grub.cfg b/files/mnt/p1/boot/grub/grub.cfg index 718ef236..b074205a 100644 --- a/files/mnt/p1/boot/grub/grub.cfg +++ b/files/mnt/p1/boot/grub/grub.cfg @@ -1,30 +1,14 @@ -insmod search -insmod echo -insmod terminal -insmod test -insmod font -insmod loadenv -insmod serial -insmod usb_keyboard -insmod linux -insmod gzio -insmod fat -insmod ext2 -insmod ata -insmod btrfs -insmod ntfs -insmod part_msdos -insmod part_gpt -insmod png -insmod jpeg - set default="boot" set timeout="5" set timeout_style="menu" +set pager=1 set vesa_mode=1 +set color_normal=white/black +set menu_color_normal=light-cyan/black +set menu_color_highlight=black/cyan -if [ -s $prefix/grubenv ]; then - load_env +if [ -s ${prefix}/grubenv ]; then + load_env --skip-sig fi if [ "${next_entry}" ]; then set default="${next_entry}" @@ -35,38 +19,37 @@ if [ "${vesa_mode}" ]; then set vesa_mode=${vesa_mode} fi -function load_video { - if [ x$feature_all_video_module = xy ]; then - insmod all_video - else - insmod efi_gop - insmod efi_uga - insmod ieee1275_fb - insmod vbe - insmod vga - insmod video_bochs - insmod video_cirrus - fi -} +terminal_input console +terminal_output console + +if [ "${feature_all_video_module}" = "y" ]; then + insmod all_video +else + insmod efi_gop + insmod efi_uga + insmod vbe + insmod vga + insmod video_bochs + insmod video_cirrus +fi -load_video if loadfont unicode; then set gfxmode=auto - insmod gfxterm - terminal_output gfxterm + if [ "${grub_platform}" = "efi" ]; then + terminal_output --append gfxterm + else + terminal_output gfxterm + fi fi -background_image $prefix/logo.png - -set color_normal=white/black -set menu_color_normal=light-cyan/black -set menu_color_highlight=black/cyan - -if serial --unit=0 --speed=115200; then - terminal_input --append serial_com0 - terminal_output --append serial_com0 +if serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1; then + terminal_input --append serial + terminal_output --append serial fi +insmod png +background_image ${prefix}/logo.png + function set_gfxpayload { if [ ${vesa_mode} -eq 1 ]; then set gfxpayload=keep @@ -75,7 +58,7 @@ function set_gfxpayload { fi } -set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait nointremap net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable nox2apic nomodeset" +set RR_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable nox2apic nomodeset" search --set=root --label "RR3" if [ -s /zImage-dsm -a -s /initrd-dsm ]; then