okay, sysresc refined a little bit...

This commit is contained in:
brent s. 2021-01-20 17:45:05 -05:00
parent efc02fa4d9
commit 5ac4f35c93
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
4 changed files with 79 additions and 30 deletions

7
TODO Normal file
View File

@ -0,0 +1,7 @@
- logging
- GPG sig checking
- incorporate bootsync integration
- config file... i think i unfortunately need it
- insmod loopback before setting root

fallback works but main one doesn't for bootsync... main one keeps using grub.cfg from /boot/grub instead of /mnt/boot1/grub (but fallback doesn't for some reason)

View File

@ -142,7 +142,7 @@ class BaseUpdater(object):
fh.write(tpl.render(iso_path = os.path.abspath( fh.write(tpl.render(iso_path = os.path.abspath(
os.path.expanduser( os.path.expanduser(
os.path.join(self.grub_iso_dir, os.path.join(self.grub_iso_dir,
self.dest_file))), self.dest_file))).lstrip('/'),
disk_uuid = self.boot_uuid)) disk_uuid = self.boot_uuid))
os.chmod(self.grub_cfg, 0o0755) os.chmod(self.grub_cfg, 0o0755)
cmd = subprocess.run(['grub-mkconfig', cmd = subprocess.run(['grub-mkconfig',

View File

@ -1,8 +1,11 @@
#!/bin/sh #!/bin/sh
# Copy this file to /etc/grub.d/40_custom_arch with mode 0755 and run grub-mkconfig -o /boot/grub/grub.cfg # Copy this file to /etc/grub.d/40_custom_arch with mode 0755 and run grub-mkconfig -o /boot/grub/grub.cfg
exec tail -n +3 $0 exec tail -n +3 $0
# Arch ISO # Arch Vanilla ISO
# Project: https://archlinux.org/
# Details:
# https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Arch_Linux_monthly_release # https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Arch_Linux_monthly_release
# https://git.archlinux.org/archiso.git/tree/docs/README.bootparams
submenu 'Arch Install ISO' { submenu 'Arch Install ISO' {


menuentry 'Default Options' { menuentry 'Default Options' {
@ -11,7 +14,7 @@ submenu 'Arch Install ISO' {
probe -u $root --set=imgdevuuid probe -u $root --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=$imgdevpath img_loop=$isofile earlymodules=loop linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=$imgdevpath img_loop=${isofile} earlymodules=loop
initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img
} }


@ -21,7 +24,7 @@ submenu 'Arch Install ISO' {
probe -u $root --set=imgdevuuid probe -u $root --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=$imgdevpath img_loop=$isofile earlymodules=loop accessibility=on linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=$imgdevpath img_loop=${isofile} earlymodules=loop accessibility=on
initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img
} }



View File

@ -2,66 +2,105 @@
# Copy this file to /etc/grub.d/40_custom_sysresccd with mode 0755 and run grub-mkconfig -o /boot/grub/grub.cfg # 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 exec tail -n +3 $0
# System Rescue CD # System Rescue CD
# https://www.system-rescue.org/ # 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' { submenu 'System Rescue CD' {


menuentry 'Default options' { menuentry 'Default options' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop 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 initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
} }


menuentry 'Run from RAM' { menuentry 'Run from RAM' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop copytoram 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 initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
} }


menuentry 'Confirm/verify checksum' { menuentry 'Confirm/verify checksum' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop 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 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' { menuentry 'Use basic display drivers' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop nomodeset 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 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' { menuentry 'Find and boot a locally installed Linux' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop findroot 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 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' { menuentry 'Stop during boot before the root filesystem is mounted' {
search --no-floppy --fs-uuid --set=root {{ disk_uuid }} 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 isofile='{{ iso_path }}'
probe -u $root --set=imgdevuuid probe -u ${root} --set=imgdevuuid
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid" set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
loopback loop (${root})/${isofile} loopback loop (${root})/${isofile}
linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd img_dev=$imgdevpath img_loop=$isofile earlymodules=loop break 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 initrd (loop)/sysresccd/boot/intel_ucode.img (loop)/sysresccd/boot/amd_ucode.img (loop)/sysresccd/boot/x86_64/sysresccd.img
} }