1# Root grub.cfg used either to boot raw kernel and/or initramfs.img, or to 2# chain to an installed distro's GRUB configuration file 3 4# These options are accessible to chain-loaded configurations as well: 5# 6# pnpacpi=off Disable on QEMU; allows serdev to claim platform serial 7# acpi=noirq Do not configure IRQ routing using ACPI tables 8# reboot=k Reboot using keyboard method, rather than ACPI 9# noexec=off Some kernels panic when setting up NX 10# noefi Some kernels panic when trying to use U-Boot EFI 11# panic=-1 Don't reboot on panic 12# console=hvc0 Switch kernel logging to virtio-console once available 13# console=ttyAMA0 QEMU on ARM64 uses alternative serial implementation 14# 15if [ "$grub_cpu" = "i386" ]; then 16 set cmdline="pnpacpi=off acpi=noirq reboot=k noexec=off console=ttyS0 noefi panic=-1 console=hvc0" 17elif [ "$grub_cpu" = "arm64" ]; then 18 set cmdline="console=ttyS0 console=ttyAMA0 noefi panic=-1 console=hvc0" 19else 20 echo "Warning: No architecture found for ${grub_cpu}" 21fi 22 23# Root filesystem is on a GUID partition with label "otheros_root" 24set rootfs="/dev/vda14" 25 26# Root filesystem with grub installed 27search --file --set root /boot/grub/grub.cfg --hint (hd0) 28if [ $? = 0 ]; then 29 set prefix=($root)/boot/grub 30 export cmdline 31 export rootfs 32 configfile $prefix/grub.cfg 33 normal_exit 34fi 35 36# Fall back if we couldn't chain to another GRUB install 37set timeout=0 38menuentry "Linux" { 39 linux /vmlinuz $cmdline root=$rootfs 40 if [ -e /initrd.img ]; then 41 initrd /initrd.img 42 fi 43} 44