Merge branch 'dev' of ssh://1201.ddns.net:2222/1201/WizardKit into dev
|
|
@ -59,8 +59,6 @@ ITEMS = {
|
||||||
),
|
),
|
||||||
'Linux': (
|
'Linux': (
|
||||||
('/arch', '/'),
|
('/arch', '/'),
|
||||||
('/EFI/boot', '/EFI/'),
|
|
||||||
('/syslinux', '/'),
|
|
||||||
),
|
),
|
||||||
'Main Kit': (
|
'Main Kit': (
|
||||||
('/', f'/{KIT_NAME_FULL}/'),
|
('/', f'/{KIT_NAME_FULL}/'),
|
||||||
|
|
@ -77,6 +75,25 @@ ITEMS = {
|
||||||
('/sources/boot.wim', '/sources/'),
|
('/sources/boot.wim', '/sources/'),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
ITEMS_FROM_LIVE = {
|
||||||
|
'WizardKit UFD base': (
|
||||||
|
('/usr/share/WizardKit/', '/'),
|
||||||
|
),
|
||||||
|
'rEFInd': (
|
||||||
|
('/usr/share/refind/drivers_x64/', '/EFI/Boot/drivers_x64/'),
|
||||||
|
('/usr/share/refind/icons/', '/EFI/Boot/icons/'),
|
||||||
|
('/usr/share/refind/refind_x64.efi', '/EFI/Boot/'),
|
||||||
|
),
|
||||||
|
'Syslinux': (
|
||||||
|
('/usr/lib/syslinux/bios/', '/syslinux/'),
|
||||||
|
),
|
||||||
|
'Memtest86': (
|
||||||
|
('/usr/share/memtest86-efi/', '/EFI/Memtest86/'),
|
||||||
|
),
|
||||||
|
'Wimboot': (
|
||||||
|
('/usr/share/wimboot/', '/syslinux/'),
|
||||||
|
),
|
||||||
|
}
|
||||||
ITEMS_HIDDEN = (
|
ITEMS_HIDDEN = (
|
||||||
# ESET
|
# ESET
|
||||||
'casper',
|
'casper',
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ from wk.cfg.ufd import (
|
||||||
BOOT_FILES,
|
BOOT_FILES,
|
||||||
IMAGE_BOOT_ENTRIES,
|
IMAGE_BOOT_ENTRIES,
|
||||||
ITEMS,
|
ITEMS,
|
||||||
|
ITEMS_FROM_LIVE,
|
||||||
ITEMS_HIDDEN,
|
ITEMS_HIDDEN,
|
||||||
SOURCES,
|
SOURCES,
|
||||||
)
|
)
|
||||||
|
|
@ -172,14 +173,25 @@ def build_ufd() -> None:
|
||||||
message='Removing Linux...',
|
message='Removing Linux...',
|
||||||
function=remove_arch,
|
function=remove_arch,
|
||||||
)
|
)
|
||||||
|
# Copy boot files
|
||||||
|
ui.print_standard(' ')
|
||||||
|
ui.print_info('Boot Files')
|
||||||
|
for s_section, s_items in ITEMS_FROM_LIVE.items():
|
||||||
|
s_section = pathlib.Path(s_section)
|
||||||
|
try_print.run(
|
||||||
|
message=f'Copying {s_section}...',
|
||||||
|
function=copy_source,
|
||||||
|
source=s_section,
|
||||||
|
items=s_items,
|
||||||
|
from_live=True,
|
||||||
|
overwrite=True,
|
||||||
|
)
|
||||||
|
os.rename('/mnt/UFD/EFI/Boot/refind_x64.efi', '/mnt/UFD/EFI/Boot/bootx64.efi')
|
||||||
|
|
||||||
|
|
||||||
# Copy sources
|
# Copy sources
|
||||||
ui.print_standard(' ')
|
ui.print_standard(' ')
|
||||||
ui.print_info('Copy Sources')
|
ui.print_info('Copy Sources')
|
||||||
try_print.run(
|
|
||||||
'Copying Memtest86...', io.recursive_copy,
|
|
||||||
'/usr/share/memtest86-efi/', '/mnt/UFD/EFI/Memtest86/', overwrite=True,
|
|
||||||
)
|
|
||||||
for s_label, s_path in sources.items():
|
for s_label, s_path in sources.items():
|
||||||
try_print.run(
|
try_print.run(
|
||||||
message=f'Copying {s_label}...',
|
message=f'Copying {s_label}...',
|
||||||
|
|
@ -275,9 +287,9 @@ def confirm_selections(update=False) -> None:
|
||||||
ui.print_standard(' ')
|
ui.print_standard(' ')
|
||||||
|
|
||||||
|
|
||||||
def copy_source(source, items, overwrite=False) -> None:
|
def copy_source(source, items, from_live=False, overwrite=False) -> None:
|
||||||
"""Copy source items to /mnt/UFD."""
|
"""Copy source items to /mnt/UFD."""
|
||||||
is_image = source.is_file()
|
is_image = not from_live and source.is_file()
|
||||||
items_not_found = False
|
items_not_found = False
|
||||||
|
|
||||||
# Mount source if necessary
|
# Mount source if necessary
|
||||||
|
|
@ -286,7 +298,14 @@ def copy_source(source, items, overwrite=False) -> None:
|
||||||
|
|
||||||
# Copy items
|
# Copy items
|
||||||
for i_source, i_dest in items:
|
for i_source, i_dest in items:
|
||||||
i_source = f'{"/mnt/Source" if is_image else source}{i_source}'
|
if from_live:
|
||||||
|
# Don't prepend source
|
||||||
|
pass
|
||||||
|
elif is_image:
|
||||||
|
i_source = f'/mnt/Source{i_source}'
|
||||||
|
else:
|
||||||
|
# Prepend source
|
||||||
|
i_source = f'{source}{i_source}'
|
||||||
i_dest = f'/mnt/UFD{i_dest}'
|
i_dest = f'/mnt/UFD{i_dest}'
|
||||||
try:
|
try:
|
||||||
io.recursive_copy(i_source, i_dest, overwrite=overwrite)
|
io.recursive_copy(i_source, i_dest, overwrite=overwrite)
|
||||||
|
|
@ -551,7 +570,7 @@ def update_boot_entries(ufd_dev, images=None) -> None:
|
||||||
'--in-place',
|
'--in-place',
|
||||||
'--regexp-extended',
|
'--regexp-extended',
|
||||||
(
|
(
|
||||||
f's#archisolabel={ISO_LABEL}#archisodevice=/dev/disk/by-uuid/{uuids[0]}#; '
|
f's/___+/{uuids[0]}/; '
|
||||||
f's#by-label/(eSysRescueLiveCD|{ISO_LABEL}|{UFD_LABEL})#by-uuid/{uuids[0]}#'
|
f's#by-label/(eSysRescueLiveCD|{ISO_LABEL}|{UFD_LABEL})#by-uuid/{uuids[0]}#'
|
||||||
),
|
),
|
||||||
*configs,
|
*configs,
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,16 @@ function copy_live_env() {
|
||||||
mkdir -p "$PROFILE_DIR/airootfs/usr/local/bin"
|
mkdir -p "$PROFILE_DIR/airootfs/usr/local/bin"
|
||||||
rsync -aI "$ROOT_DIR/scripts/" "$PROFILE_DIR/airootfs/usr/local/bin/"
|
rsync -aI "$ROOT_DIR/scripts/" "$PROFILE_DIR/airootfs/usr/local/bin/"
|
||||||
|
|
||||||
|
echo "Copying WizardKit UFD files..."
|
||||||
|
rsync -aI "$ROOT_DIR/setup/ufd/" "$PROFILE_DIR/airootfs/usr/share/WizardKit/"
|
||||||
|
cp "$ROOT_DIR/images/rEFInd.png" "$PROFILE_DIR/airootfs/usr/share/WizardKit/EFI/Boot/rEFInd.png"
|
||||||
|
cp "$ROOT_DIR/images/Syslinux.png" "$PROFILE_DIR/airootfs/usr/share/WizardKit/syslinux/syslinux.png"
|
||||||
|
|
||||||
|
echo "Copying Memtest86+ files..."
|
||||||
|
rsync -aI "/boot/memtest86+/memtest.bin" "$PROFILE_DIR/airootfs/usr/share/WizardKit/syslinux/"
|
||||||
|
rsync -aI "/boot/memtest86+/memtest.efi" "$PROFILE_DIR/airootfs/usr/share/WizardKit/EFI/Memtest86+/"
|
||||||
|
mv "$PROFILE_DIR/airootfs/usr/share/WizardKit/EFI/Memtest86+"/{memtest.efi,bootx64.efi}
|
||||||
|
|
||||||
# Pre-compile Python scripts
|
# Pre-compile Python scripts
|
||||||
unset PYTHONPYCACHEPREFIX
|
unset PYTHONPYCACHEPREFIX
|
||||||
python -m compileall "$PROFILE_DIR/airootfs/usr/local/bin/"
|
python -m compileall "$PROFILE_DIR/airootfs/usr/local/bin/"
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,4 @@ smartmontools-svn
|
||||||
ttf-font-awesome-4
|
ttf-font-awesome-4
|
||||||
udevil
|
udevil
|
||||||
wd719x-firmware
|
wd719x-firmware
|
||||||
|
wimboot-bin
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,6 @@ man-pages
|
||||||
mariadb-clients
|
mariadb-clients
|
||||||
mdadm
|
mdadm
|
||||||
mediainfo
|
mediainfo
|
||||||
memtest86+
|
|
||||||
memtest86-efi
|
memtest86-efi
|
||||||
mesa-demos
|
mesa-demos
|
||||||
mesa-utils
|
mesa-utils
|
||||||
|
|
@ -105,7 +104,6 @@ nvme-cli
|
||||||
open-iscsi
|
open-iscsi
|
||||||
openbox
|
openbox
|
||||||
openssh
|
openssh
|
||||||
openssh
|
|
||||||
opensuperclone-git
|
opensuperclone-git
|
||||||
otf-font-awesome-4
|
otf-font-awesome-4
|
||||||
p7zip
|
p7zip
|
||||||
|
|
@ -177,6 +175,7 @@ volumeicon
|
||||||
wd719x-firmware
|
wd719x-firmware
|
||||||
wezterm-terminfo
|
wezterm-terminfo
|
||||||
which
|
which
|
||||||
|
wimboot-bin
|
||||||
wimlib
|
wimlib
|
||||||
wmctrl
|
wmctrl
|
||||||
xarchiver
|
xarchiver
|
||||||
|
|
@ -184,6 +183,7 @@ xf86-input-libinput
|
||||||
xf86-video-amdgpu
|
xf86-video-amdgpu
|
||||||
xf86-video-fbdev
|
xf86-video-fbdev
|
||||||
xf86-video-nouveau
|
xf86-video-nouveau
|
||||||
|
xf86-video-qxl
|
||||||
xf86-video-vesa
|
xf86-video-vesa
|
||||||
xfsprogs
|
xfsprogs
|
||||||
xorg-server
|
xorg-server
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ curl
|
||||||
dos2unix
|
dos2unix
|
||||||
git
|
git
|
||||||
gtk3
|
gtk3
|
||||||
|
memtest86+
|
||||||
|
memtest86+-efi
|
||||||
p7zip
|
p7zip
|
||||||
perl-rename
|
perl-rename
|
||||||
pv
|
pv
|
||||||
|
|
|
||||||
BIN
setup/ufd/._.
Executable file
BIN
setup/ufd/._.Trashes
Executable file
BIN
setup/ufd/._.VolumeIcon.icns
Executable file
BIN
setup/ufd/EFI/Boot/._.disk_label
Executable file
BIN
setup/ufd/EFI/Boot/._.disk_label_2x
Executable file
BIN
setup/ufd/EFI/Boot/.disk_label
Executable file
BIN
setup/ufd/EFI/Boot/.disk_label_2x
Executable file
BIN
setup/ufd/EFI/Boot/icons/dgpu.png
Normal file
|
After Width: | Height: | Size: 3 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_arch.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_mac_10.11.png
Normal file
|
After Width: | Height: | Size: 338 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_mac_10.13.png
Normal file
|
After Width: | Height: | Size: 373 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_mac_10.15.png
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_mac_11.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_memtest.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
setup/ufd/EFI/Boot/icons/wk_win.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
87
setup/ufd/EFI/Boot/refind.conf
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
# refind.conf
|
||||||
|
|
||||||
|
timeout 0
|
||||||
|
scanfor manual
|
||||||
|
showtools firmware,reboot,shutdown
|
||||||
|
default_selection Linux
|
||||||
|
csr_values 10,77
|
||||||
|
#use_graphics_for osx,linux,windows
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
banner rEFInd.png
|
||||||
|
banner_scale fillscreen
|
||||||
|
selection_big selection_big.png
|
||||||
|
selection_small selection_small.png
|
||||||
|
hideui arrows,badges
|
||||||
|
|
||||||
|
# Entries
|
||||||
|
menuentry "Linux" {
|
||||||
|
icon /EFI/boot/icons/wk_arch.png
|
||||||
|
loader /arch/boot/x86_64/vmlinuz-linux
|
||||||
|
initrd /arch/boot/intel_ucode.img
|
||||||
|
initrd /arch/boot/amd_ucode.img
|
||||||
|
initrd /arch/boot/x86_64/initramfs-linux.img
|
||||||
|
options "archisobasedir=arch archisodevice=/dev/disk/by-uuid/_______ copytoram loglevel=3"
|
||||||
|
submenuentry "Linux (CLI)" {
|
||||||
|
add_options "nox"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "MemTest86+" {
|
||||||
|
icon /EFI/boot/icons/wk_memtest.png
|
||||||
|
options "nobigstatus nopause"
|
||||||
|
loader /EFI/Memtest86+/bootx64.efi
|
||||||
|
submenuentry "Memtest86+ (Open Source)" {
|
||||||
|
loader /EFI/Memtest86+/bootx64.efi
|
||||||
|
}
|
||||||
|
submenuentry "Memtest86 (Passmark)" {
|
||||||
|
loader /EFI/Memtest86/bootx64.efi
|
||||||
|
options
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#UFD-MACOS-10.11#menuentry "macOS (El Capitan)" {
|
||||||
|
#UFD-MACOS-10.11# icon /EFI/boot/icons/wk_mac_10.11.png
|
||||||
|
#UFD-MACOS-10.11# volume "PARTUUID"
|
||||||
|
#UFD-MACOS-10.11# loader /System/Library/CoreServices/secretboot.efi
|
||||||
|
#UFD-MACOS-10.11# graphics
|
||||||
|
#UFD-MACOS-10.11# submenuentry "Mac MemTest" {
|
||||||
|
#UFD-MACOS-10.11# add_options "-s"
|
||||||
|
#UFD-MACOS-10.11# }
|
||||||
|
#UFD-MACOS-10.11#}
|
||||||
|
|
||||||
|
#UFD-MACOS-10.13#menuentry "macOS (High Sierra)" {
|
||||||
|
#UFD-MACOS-10.13# icon /EFI/boot/icons/wk_mac_10.13.png
|
||||||
|
#UFD-MACOS-10.13# volume "PARTUUID"
|
||||||
|
#UFD-MACOS-10.13# loader /System/Library/CoreServices/secretboot.efi
|
||||||
|
#UFD-MACOS-10.13# graphics
|
||||||
|
#UFD-MACOS-10.13# submenuentry "Mac MemTest" {
|
||||||
|
#UFD-MACOS-10.13# add_options "-s"
|
||||||
|
#UFD-MACOS-10.13# }
|
||||||
|
#UFD-MACOS-10.13#}
|
||||||
|
|
||||||
|
#UFD-MACOS-10.15#menuentry "macOS (Catalina)" {
|
||||||
|
#UFD-MACOS-10.15# icon /EFI/boot/icons/wk_mac_10.15.png
|
||||||
|
#UFD-MACOS-10.15# volume "PARTUUID"
|
||||||
|
#UFD-MACOS-10.15# loader /System/Library/CoreServices/secretboot.efi
|
||||||
|
#UFD-MACOS-10.15# graphics
|
||||||
|
#UFD-MACOS-10.15# submenuentry "Mac MemTest" {
|
||||||
|
#UFD-MACOS-10.15# add_options "-s"
|
||||||
|
#UFD-MACOS-10.15# }
|
||||||
|
#UFD-MACOS-10.15#}
|
||||||
|
|
||||||
|
#UFD-WINPE#menuentry "WindowsPE" {
|
||||||
|
#UFD-WINPE# ostype windows
|
||||||
|
#UFD-WINPE# icon /EFI/boot/icons/wk_win.png
|
||||||
|
#UFD-WINPE# loader /EFI/microsoft/bootx64.efi
|
||||||
|
#UFD-WINPE#}
|
||||||
|
|
||||||
|
#UFD-DGPU#menuentry "Mac dGPU Disable Tool" {
|
||||||
|
#UFD-DGPU# icon /EFI/boot/icons/dgpu.png
|
||||||
|
#UFD-DGPU# loader /dgpu/vmlinuz-linux
|
||||||
|
#UFD-DGPU# initrd /arch/boot/intel_ucode.img
|
||||||
|
#UFD-DGPU# initrd /arch/boot/amd_ucode.img
|
||||||
|
#UFD-DGPU# initrd /dgpu/initramfs-linux.img
|
||||||
|
#UFD-DGPU# options "archisobasedir=dgpu archisolabel=%ARCHISO_LABEL% nomodeset"
|
||||||
|
#UFD-DGPU#}
|
||||||
|
|
||||||
BIN
setup/ufd/EFI/Boot/selection_big.png
Normal file
|
After Width: | Height: | Size: 538 B |
BIN
setup/ufd/EFI/Boot/selection_small.png
Normal file
|
After Width: | Height: | Size: 720 B |
21
setup/ufd/syslinux/linux.cfg
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
LABEL wk_linux
|
||||||
|
TEXT HELP
|
||||||
|
A live Linux environment
|
||||||
|
* HW diagnostics, file-based backups, data recovery, etc
|
||||||
|
ENDTEXT
|
||||||
|
MENU LABEL Linux
|
||||||
|
LINUX /arch/boot/x86_64/vmlinuz-linux
|
||||||
|
INITRD /arch/boot/intel-ucode.img,/arch/boot/amd-ucode.img,/arch/boot/x86_64/initramfs-linux.img
|
||||||
|
APPEND archisobasedir=arch archisodevice=/dev/disk/by-uuid/_______ copytoram loglevel=3
|
||||||
|
|
||||||
|
LABEL wk_linux_cli
|
||||||
|
TEXT HELP
|
||||||
|
A live Linux environment (CLI)
|
||||||
|
* HW diagnostics, file-based backups, data recovery, etc
|
||||||
|
ENDTEXT
|
||||||
|
MENU LABEL Linux (CLI)
|
||||||
|
LINUX /arch/boot/x86_64/vmlinuz-linux
|
||||||
|
INITRD /arch/boot/intel-ucode.img,/arch/boot/amd-ucode.img,/arch/boot/x86_64/initramfs-linux.img
|
||||||
|
APPEND archisobasedir=arch archisodevice=/dev/disk/by-uuid/_______ copytoram nox
|
||||||
|
SYSAPPEND 3
|
||||||
|
|
||||||
7
setup/ufd/syslinux/memtest.cfg
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# http://www.memtest.org/
|
||||||
|
LABEL memtest
|
||||||
|
MENU LABEL Memtest86+
|
||||||
|
TEXT HELP
|
||||||
|
Perform RAM diagnostics
|
||||||
|
ENDTEXT
|
||||||
|
LINUX memtest.bin
|
||||||
53
setup/ufd/syslinux/syslinux.cfg
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
SERIAL 0 115200
|
||||||
|
UI vesamenu.c32
|
||||||
|
MENU TITLE _______
|
||||||
|
MENU BACKGROUND syslinux.jpg
|
||||||
|
|
||||||
|
MENU WIDTH 80
|
||||||
|
MENU MARGIN 10
|
||||||
|
MENU ROWS 15
|
||||||
|
MENU VSHIFT 2
|
||||||
|
MENU TABMSGROW 22
|
||||||
|
MENU CMDLINEROW 22
|
||||||
|
MENU HELPMSGROW 24
|
||||||
|
MENU HELPMSGENDROW -1
|
||||||
|
MENU TABMSG
|
||||||
|
|
||||||
|
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
|
||||||
|
|
||||||
|
MENU COLOR screen 30;44 #a0000000 #a0000000 none
|
||||||
|
MENU COLOR border 30;44 #a0000000 #a0000000 none
|
||||||
|
MENU COLOR title 1;36;44 #9033ccff #a0000000 none
|
||||||
|
MENU COLOR sel 7;37;40 #e0ffffff #a0000000 std
|
||||||
|
MENU COLOR disabled 37;44 #50ffffff #a0000000 none
|
||||||
|
MENU COLOR unsel 37;44 #50ffffff #a0000000 none
|
||||||
|
MENU COLOR help 37;40 #c0ffffff #a0000000 none
|
||||||
|
MENU COLOR tabmsg 30;44 #a0000000 #a0000000 none
|
||||||
|
MENU COLOR cmdmark 1;36;44 #9033ccff #a0000000 none
|
||||||
|
MENU COLOR cmdline 37;40 #c0ffffff #a0000000 none
|
||||||
|
MENU COLOR timeout_msg 37;40 #80ffffff #a0000000 none
|
||||||
|
MENU COLOR timeout 1;37;40 #c0ffffff #a0000000 none
|
||||||
|
MENU COLOR msg07 37;40 #90ffffff #a0000000 none
|
||||||
|
MENU COLOR tabmsg 31;40 #30ffffff #a0000000 none
|
||||||
|
|
||||||
|
# Start entries
|
||||||
|
MENU SEPARATOR
|
||||||
|
|
||||||
|
MENU CLEAR
|
||||||
|
|
||||||
|
DEFAULT wk_linux
|
||||||
|
TIMEOUT 0
|
||||||
|
|
||||||
|
INCLUDE linux.cfg
|
||||||
|
INCLUDE memtest.cfg
|
||||||
|
#UFD-WINPE#INCLUDE winpe.cfg
|
||||||
|
|
||||||
|
MENU SEPARATOR
|
||||||
|
|
||||||
|
LABEL reboot
|
||||||
|
MENU LABEL Reboot
|
||||||
|
COM32 reboot.c32
|
||||||
|
|
||||||
|
LABEL poweroff
|
||||||
|
MENU LABEL Power Off
|
||||||
|
COM32 poweroff.c32
|
||||||
8
setup/ufd/syslinux/winpe.cfg
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
LABEL wk_winpe
|
||||||
|
TEXT HELP
|
||||||
|
A live Windows environment
|
||||||
|
* Create partition backups, Install Windows, etc
|
||||||
|
ENDTEXT
|
||||||
|
MENU LABEL Windows PE
|
||||||
|
COM32 linux.c32
|
||||||
|
APPEND wimboot gui initrdfile=/sources/bootmgr,/sources/BCD,/sources/boot.sdi,/sources/boot.wim
|
||||||