set default="0" set timeout="3" set gfxpayload=keep search --label plfs_data --set=root # If the config file isn't found, fall back to rescue mode if [ -e (${root})/data/grub-source.cfg ]; then source (${root})/data/grub-source.cfg # selected_root and deviceinfo_codename is exported here echo "Booting Sineware ProLinux from partition ${selected_root} on ${deviceinfo_codename}..." sleep 1 menuentry 'Sineware ProLinux' { # Mount the SquashFS file # todo: eventually we need digital signatures (and replacing the grub-source.cfg setup with a custom module) echo "Starting up..." loopback loop (${root})/prolinux_${selected_root}.squish # Set the Linux kernel and initramfs locations linux (loop)/opt/device-support/${deviceinfo_codename}/vmlinuz earlycon=efifb initrd (loop)/opt/device-support/${deviceinfo_codename}/initramfs # Boot the kernel boot } submenu '-> Advanced options' { menuentry 'Sineware ProLinux (root slot a)' { loopback loop (${root})/prolinux_a.squish linux (loop)/opt/device-support/${deviceinfo_codename}/vmlinuz initrd (loop)/opt/device-support/${deviceinfo_codename}/initramfs boot } menuentry 'Sineware ProLinux (root slot b)' { loopback loop (${root})/prolinux_b.squish linux (loop)/opt/device-support/${deviceinfo_codename}/vmlinuz initrd (loop)/opt/device-support/${deviceinfo_codename}/initramfs boot } menuentry 'View Boot Environment Information' { echo "- Sineware ProLinux Boot Environment Information -" echo "Device root partition: ${root}" ls (${root})/ ls (${root})/data/ echo "--" echo "Selected root partition: $selected_root" echo "Device codename: $deviceinfo_codename" echo "Press any key to continue..." read } } else echo "Error: grub-source.cfg not found in a plfs_data partition!" echo "Consider joining the Sineware Matrix channel or Discord server for support." echo "Please provide a picture of the following information:" ls echo ${root} ls (${root}) ls (${root})/ ls (${root})/data/ echo "Press any key to enter GRUB rescue mode..." read insmod normal normal fi