114 lines
3.1 KiB
Django/Jinja
114 lines
3.1 KiB
Django/Jinja
#!/bin/sh
|
|
# Copy this file to /etc/grub.d/40_custom_sysresccd with mode 0755 and run grub-mkconfig -o /boot/grub/grub.cfg
|
|
exec tail -n +3 $0
|
|
# System Rescue CD
|
|
# Project: https://www.system-rescue.org/
|
|
# Details:
|
|
# https://www.system-rescue.org/manual/Installing_SystemRescue_on_the_disk/#first-approach-using-grub2-with-isoloop
|
|
# https://www.system-rescue.org/manual/Booting_SystemRescueCd/
|
|
submenu 'System Rescue CD >' {
|
|
|
|
load_video
|
|
insmod gzio
|
|
insmod part_gpt
|
|
insmod part_msdos
|
|
insmod ext2
|
|
insmod loopback
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
|
set isofile='{{ iso_path }}'
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
|
loopback loop (${root})/${isofile}
|
|
|
|
menuentry 'Default options' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'Run from RAM' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop \
|
|
copytoram
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'Confirm/verify checksum' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop \
|
|
checksum
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'Use basic display drivers' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop \
|
|
nomodeset
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'Find and boot a locally installed Linux' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop \
|
|
findroot
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'Stop during boot before the root filesystem is mounted' {
|
|
linux (loop)/sysresccd/boot/x86_64/vmlinuz \
|
|
archisobasedir=sysresccd \
|
|
img_dev=${imgdevpath} \
|
|
img_loop=${isofile} \
|
|
earlymodules=loop \
|
|
break
|
|
initrd (loop)/sysresccd/boot/intel_ucode.img \
|
|
(loop)/sysresccd/boot/amd_ucode.img \
|
|
(loop)/sysresccd/boot/x86_64/sysresccd.img
|
|
}
|
|
|
|
menuentry 'EFI shell' {
|
|
insmod fat
|
|
insmod chain
|
|
terminal_output console
|
|
chainloader (loop)/EFI/shell.efi
|
|
}
|
|
|
|
menuentry 'EFI firmware setup' {
|
|
fwsetup
|
|
}
|
|
|
|
menuentry 'Reboot' {
|
|
reboot
|
|
}
|
|
|
|
menuentry 'Power off' {
|
|
halt
|
|
}
|
|
|
|
}
|
|
|