okay, sysresc refined a little bit...
This commit is contained in:
parent
efc02fa4d9
commit
5ac4f35c93
7
TODO
Normal file
7
TODO
Normal 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)
|
2
_base.py
2
_base.py
@ -142,7 +142,7 @@ class BaseUpdater(object):
|
||||
fh.write(tpl.render(iso_path = os.path.abspath(
|
||||
os.path.expanduser(
|
||||
os.path.join(self.grub_iso_dir,
|
||||
self.dest_file))),
|
||||
self.dest_file))).lstrip('/'),
|
||||
disk_uuid = self.boot_uuid))
|
||||
os.chmod(self.grub_cfg, 0o0755)
|
||||
cmd = subprocess.run(['grub-mkconfig',
|
||||
|
@ -1,8 +1,11 @@
|
||||
#!/bin/sh
|
||||
# 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
|
||||
# Arch ISO
|
||||
# https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Arch_Linux_monthly_release
|
||||
# Arch Vanilla ISO
|
||||
# Project: https://archlinux.org/
|
||||
# Details:
|
||||
# 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' {
|
||||
|
||||
menuentry 'Default Options' {
|
||||
@ -11,7 +14,7 @@ submenu 'Arch Install ISO' {
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
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
|
||||
}
|
||||
|
||||
@ -21,7 +24,7 @@ submenu 'Arch Install ISO' {
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
exec tail -n +3 $0
|
||||
# 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' {
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
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 }}'
|
||||
probe -u $root --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/$imgdevuuid"
|
||||
probe -u ${root} --set=imgdevuuid
|
||||
set imgdevpath="/dev/disk/by-uuid/${imgdevuuid}"
|
||||
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user