2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-10-30 21:20:16 +00:00

add support for newer systemrescuecd isos on grub2

This commit is contained in:
Luís Pedro Algarvio 2021-03-06 05:03:14 +00:00 committed by GitHub
parent fa89b28f27
commit 96d10712b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,78 @@
for isofile in $isopath/systemrescue-*.iso; do
if [ -e "$isofile" ]; then
regexp --set=isoname "$isopath/(.*)" "$isofile"
submenu "$isoname ->" "$isofile" {
iso_path="$2"
loopback loop "$iso_path"
menuentry "Default boot options" {
bootoptions="isoloop=$iso_path scandelay=1"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "All files cached to memory (docache)" {
bootoptions="isoloop=$iso_path docache"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "Framebuffer console in high resolution" {
bootoptions="isoloop=$iso_path nomodeset vga=791"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "Do not ask for keyboard, use US keymap" {
bootoptions="isoloop=$iso_path setkmap=us"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "Boot an existing Linux system installed on the disk" {
bootoptions="isoloop=$iso_path root=auto"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "Alternative kernel with default boot options" {
bootoptions="isoloop=$iso_path scandelay=1"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/isolinux/altker64 $bootoptions
else
linux (loop)/isolinux/altker32 $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
menuentry "Directly start the graphical environment" {
bootoptions="isoloop=$iso_path dostartx"
if cpuid -l; then # Check whether CPU is 64-bit
linux (loop)/sysresccd/boot/x86_64/vmlinuz $bootoptions
else
linux (loop)/sysresccd/boot/i686/vmlinuz $bootoptions
fi
initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}
submenu "System Tools ->" {
menuentry "MEMTEST: Memory test using Memtest86+" {
bootoptions="-"
linux16 (loop)/sysresccd/boot/memtest $bootoptions
}
}
}
fi
done