Tweaks to support amd64 and i386

This commit is contained in:
Alexandre Aubin
2024-07-31 18:01:12 +02:00
parent 2c50ccee25
commit 92c24d89d1
2 changed files with 18 additions and 15 deletions

View File

@@ -20,18 +20,18 @@ menu tabmsg
default installgui
label install
menu label ^Text install
kernel /install.amd/vmlinuz
append preseed/file=/cdrom/preseeds/default.preseed vga=788 initrd=/install.amd/initrd.gz -- quiet
kernel /install.__ARCH__/vmlinuz
append preseed/file=/cdrom/preseeds/default.preseed vga=788 initrd=/install.__ARCH__/initrd.gz -- quiet
label installgui
menu label ^Graphical install (recommended)
menu default
kernel /install.amd/vmlinuz
append preseed/file=/cdrom/preseeds/default.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet
kernel /install.__ARCH__/vmlinuz
append preseed/file=/cdrom/preseeds/default.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.__ARCH__/gtk/initrd.gz -- quiet
label expert
menu label Expert text install
kernel /install.amd/vmlinuz
append preseed/file=/cdrom/preseeds/expert.preseed vga=788 initrd=/install.amd/initrd.gz -- quiet
kernel /install.__ARCH__/vmlinuz
append preseed/file=/cdrom/preseeds/expert.preseed vga=788 initrd=/install.__ARCH__/initrd.gz -- quiet
label expertgui
menu label Expert graphical install
kernel /install.amd/vmlinuz
append preseed/file=/cdrom/preseeds/expert.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.amd/gtk/initrd.gz -- quiet
kernel /install.__ARCH__/vmlinuz
append preseed/file=/cdrom/preseeds/expert.preseed video=vesa:ywrap,mtrr vga=788 initrd=/install.__ARCH__/gtk/initrd.gz -- quiet

View File

@@ -481,25 +481,28 @@ def inject_files_into_iso(
)
p.ok("MBR extraction complete.")
arch = "amd" if "amd64" in path_to_input_iso_file.name else "386"
# For some reason this 'xen' thing takes up an extra 50-70ish MB compared
# to the original iso ... not sure to understand ... but doesn't seem to be
# actually used anywhere so let's get rid of it to save space ...
os.system(f"chmod +w '{path_to_extracted_iso_dir}/install.amd'")
os.system(f"chmod -R +w '{path_to_extracted_iso_dir}/install.amd/xen'")
os.system(f"rm -rf '{path_to_extracted_iso_dir}/install.amd/xen'")
os.system(f"chmod -w '{path_to_extracted_iso_dir}/install.amd'")
os.system(f"chmod +w '{path_to_extracted_iso_dir}/install.{arch}'")
os.system(f"chmod -R +w '{path_to_extracted_iso_dir}/install.{arch}/xen'")
os.system(f"rm -rf '{path_to_extracted_iso_dir}/install.{arch}/xen'")
os.system(f"chmod -w '{path_to_extracted_iso_dir}/install.{arch}'")
# ADd the input files to the extracted ISO
os.system(f"chmod +w {path_to_extracted_iso_dir}/isolinux/*")
os.system(f"chmod -R +w {path_to_extracted_iso_dir}/isolinux")
os.system(f"cp -r ./files_to_inject/* {path_to_extracted_iso_dir}/")
os.system(f"chmod -w {path_to_extracted_iso_dir}/isolinux/*")
os.system(f'sed "s@__ARCH__@{arch}@g" -i "{path_to_extracted_iso_dir}/isolinux/menu.cfg"')
os.system(f"chmod -R -w {path_to_extracted_iso_dir}/isolinux")
# This stuff gotta go into the initrd with cpio trick etc
temp_file_dir = TemporaryDirectory()
os.system(f"mkdir -p {temp_file_dir.name}/usr/share/graphics/")
os.system(f"cp ./files_to_inject/logo.png {temp_file_dir.name}/usr/share/graphics/logo_debian.png")
append_file_contents_to_initrd_archive(
path_to_extracted_iso_dir/"install.amd"/"gtk"/"initrd.gz",
path_to_extracted_iso_dir/f"install.{arch}"/"gtk"/"initrd.gz",
temp_file_dir.name,
"usr/share/graphics/logo_debian.png"
)