2021-01-12 14:33:17 -05:00
|
|
|
#!/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
|
2021-01-20 17:45:05 -05:00
|
|
|
# Project: https://www.system-rescue.org/
|
|
|
|
# Details:
|
2021-01-21 13:27:31 -05:00
|
|
|
# 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/
|
2021-01-12 14:33:17 -05:00
|
|
|
submenu 'System Rescue CD' {
|
|
|
|
|
|
|
|
menuentry 'Default options' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 21:24:49 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry 'Run from RAM' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 23:55:17 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry 'Confirm/verify checksum' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 23:55:17 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry 'Use basic display drivers' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 23:55:17 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry 'Find and boot a locally installed Linux' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 23:55:17 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
menuentry 'Stop during boot before the root filesystem is mounted' {
|
2021-01-20 17:45:05 -05:00
|
|
|
load_video
|
|
|
|
insmod gzio
|
|
|
|
insmod part_gpt
|
|
|
|
insmod part_msdos
|
|
|
|
insmod ext2
|
|
|
|
insmod loopback
|
|
|
|
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
|
2021-01-12 14:33:17 -05:00
|
|
|
set isofile='{{ iso_path }}'
|
2021-01-20 23:55:17 -05:00
|
|
|
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
|
2021-01-20 04:33:51 -05:00
|
|
|
loopback loop (${root})/${isofile}
|
2021-01-21 11:34:06 -05:00
|
|
|
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
|
2021-01-12 14:33:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-01-20 04:51:44 -05:00
|
|
|
|