Expanded boot entries sections
* Update Arch labels from ISO_LABEL to UFD_LABEL * Added Linux (Minimal) to syslinux * Added Linux (Minimal) and Linux (dGPU) entries to rEFInd * Removed Linux (i3) entries * I guess this is a hidden feature now...
This commit is contained in:
parent
4115f3cfe1
commit
89ac824d82
5 changed files with 50 additions and 22 deletions
|
|
@ -77,10 +77,12 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Update boot entries
|
# Update boot entries
|
||||||
try_and_print(
|
try_and_print(
|
||||||
message='Enabling boot entries...',
|
message='Updating boot entries...',
|
||||||
function=enable_boot_entries,
|
function=update_boot_entries,
|
||||||
boot_entries=BOOT_ENTRIES,
|
boot_entries=BOOT_ENTRIES,
|
||||||
boot_files=BOOT_FILES,
|
boot_files=BOOT_FILES,
|
||||||
|
iso_label=ISO_LABEL,
|
||||||
|
ufd_label=UFD_LABEL,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install syslinux
|
# Install syslinux
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ def copy_source(source, items, overwrite=False):
|
||||||
unmount('/mnt/Source')
|
unmount('/mnt/Source')
|
||||||
|
|
||||||
|
|
||||||
def enable_boot_entries(boot_entries, boot_files):
|
def update_boot_entries(boot_entries, boot_files, iso_label, ufd_label):
|
||||||
"""Enable boot entries if related paths exist."""
|
"""Update boot files for UFD usage"""
|
||||||
configs = []
|
configs = []
|
||||||
|
|
||||||
# Find config files
|
# Find config files
|
||||||
|
|
@ -79,7 +79,17 @@ def enable_boot_entries(boot_entries, boot_files):
|
||||||
if item.name.lower().endswith(c_ext.lower()):
|
if item.name.lower().endswith(c_ext.lower()):
|
||||||
configs.append(item.path)
|
configs.append(item.path)
|
||||||
|
|
||||||
# Uncomment found entries
|
# Update Linux labels
|
||||||
|
cmd = [
|
||||||
|
'sed',
|
||||||
|
'--in-place',
|
||||||
|
'--regexp-extended',
|
||||||
|
's/{}/{}/'.format(iso_label, ufd_label),
|
||||||
|
*configs,
|
||||||
|
]
|
||||||
|
run_program(cmd)
|
||||||
|
|
||||||
|
# Uncomment extra entries if present
|
||||||
for b_path, b_comment in boot_entries:
|
for b_path, b_comment in boot_entries:
|
||||||
try:
|
try:
|
||||||
find_path('/mnt/UFD{}'.format(b_path))
|
find_path('/mnt/UFD{}'.format(b_path))
|
||||||
|
|
@ -87,7 +97,7 @@ def enable_boot_entries(boot_entries, boot_files):
|
||||||
# Entry not found, continue to next entry
|
# Entry not found, continue to next entry
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Update config files
|
# Entry found, update config files
|
||||||
cmd = [
|
cmd = [
|
||||||
'sed',
|
'sed',
|
||||||
'--in-place',
|
'--in-place',
|
||||||
|
|
|
||||||
BIN
.linux_items/include/EFI/boot/icons/dgpu.png
Normal file
BIN
.linux_items/include/EFI/boot/icons/dgpu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -26,15 +26,30 @@ menuentry "Linux" {
|
||||||
initrd /arch/boot/amd_ucode.img
|
initrd /arch/boot/amd_ucode.img
|
||||||
initrd /arch/boot/x86_64/archiso.img
|
initrd /arch/boot/x86_64/archiso.img
|
||||||
options "archisobasedir=arch archisolabel=%ARCHISO_LABEL% copytoram loglevel=3"
|
options "archisobasedir=arch archisolabel=%ARCHISO_LABEL% copytoram loglevel=3"
|
||||||
submenuentry "Linux (i3)" {
|
|
||||||
add_options "i3"
|
|
||||||
}
|
|
||||||
submenuentry "Linux (CLI)" {
|
submenuentry "Linux (CLI)" {
|
||||||
add_options "loglevel=4 nomodeset nox"
|
add_options "nox"
|
||||||
}
|
}
|
||||||
|
#UFD-MINIMAL#submenuentry "Linux (Minimal)" {
|
||||||
|
#UFD-MINIMAL# loader /arch_minimal/vmlinuz
|
||||||
|
#UFD-MINIMAL# initrd
|
||||||
|
#UFD-MINIMAL# initrd /arch/boot/intel_ucode.img
|
||||||
|
#UFD-MINIMAL# initrd /arch/boot/amd_ucode.img
|
||||||
|
#UFD-MINIMAL# initrd /arch_minimal/archiso.img
|
||||||
|
#UFD-MINIMAL# options
|
||||||
|
#UFD-MINIMAL# options "archisobasedir=arch_minimal archisolabel=%ARCHISO_LABEL% copytoram loglevel=3"
|
||||||
|
#UFD-MINIMAL#}
|
||||||
}
|
}
|
||||||
#UFD-WINPE#menuentry "WindowsPE" {
|
#UFD-WINPE#menuentry "WindowsPE" {
|
||||||
#UFD-WINPE# ostype windows
|
#UFD-WINPE# ostype windows
|
||||||
#UFD-WINPE# icon /EFI/boot/icons/wk_win.png
|
#UFD-WINPE# icon /EFI/boot/icons/wk_win.png
|
||||||
#UFD-WINPE# loader /EFI/microsoft/bootx64.efi
|
#UFD-WINPE# loader /EFI/microsoft/bootx64.efi
|
||||||
#UFD-WINPE#}
|
#UFD-WINPE#}
|
||||||
|
#UFD-DGPU#menuentry "Mac dGPU Disable Tool" {
|
||||||
|
#UFD-DGPU# icon /EFI/boot/icons/dgpu.png
|
||||||
|
#UFD-DGPU# loader /dgpu/vmlinuz
|
||||||
|
#UFD-DGPU# initrd /arch/boot/intel_ucode.img
|
||||||
|
#UFD-DGPU# initrd /arch/boot/amd_ucode.img
|
||||||
|
#UFD-DGPU# initrd /dgpu/archiso.img
|
||||||
|
#UFD-DGPU# options "archisobasedir=dgpu archisolabel=%ARCHISO_LABEL% nomodeset"
|
||||||
|
#UFD-DGPU#}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,17 +8,6 @@ LINUX boot/x86_64/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram loglevel=3
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram loglevel=3
|
||||||
|
|
||||||
LABEL wk_linux_i3
|
|
||||||
TEXT HELP
|
|
||||||
A live Linux environment (i3)
|
|
||||||
* HW diagnostics, file-based backups, data recovery, etc
|
|
||||||
ENDTEXT
|
|
||||||
MENU LABEL Linux (i3)
|
|
||||||
LINUX boot/x86_64/vmlinuz
|
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
|
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram loglevel=3 i3
|
|
||||||
SYSAPPEND 3
|
|
||||||
|
|
||||||
LABEL wk_linux_cli
|
LABEL wk_linux_cli
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
A live Linux environment (CLI)
|
A live Linux environment (CLI)
|
||||||
|
|
@ -27,5 +16,17 @@ ENDTEXT
|
||||||
MENU LABEL Linux (CLI)
|
MENU LABEL Linux (CLI)
|
||||||
LINUX boot/x86_64/vmlinuz
|
LINUX boot/x86_64/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram nox nomodeset
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram nox
|
||||||
SYSAPPEND 3
|
SYSAPPEND 3
|
||||||
|
|
||||||
|
#UFD-MINIMAL#LABEL wk_linux_minimal
|
||||||
|
#UFD-MINIMAL#TEXT HELP
|
||||||
|
#UFD-MINIMAL#A live Linux environment (Minimal)
|
||||||
|
#UFD-MINIMAL# * HW diagnostics, file-based backups, data recovery, etc
|
||||||
|
#UFD-MINIMAL#ENDTEXT
|
||||||
|
#UFD-MINIMAL#MENU LABEL Linux (Minimal)
|
||||||
|
#UFD-MINIMAL#LINUX ../arch_minimal/vmlinuz
|
||||||
|
#UFD-MINIMAL#INITRD boot/intel_ucode.img,boot/amd_ucode.img,../arch_minimal/archiso.img
|
||||||
|
#UFD-MINIMAL#APPEND archisobasedir=arch_minimal archisolabel=%ARCHISO_LABEL% copytoram loglevel=3
|
||||||
|
#UFD-MINIMAL#SYSAPPEND 3
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue