mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
add mechanism to add default kernel parameters during build
They are then automatically applied to all boot configurations
This commit is contained in:
parent
10d7f6ff50
commit
ba3a7eb06d
3
build.sh
3
build.sh
|
|
@ -19,6 +19,7 @@ arch="$(uname -m)"
|
||||||
sfs_comp="xz"
|
sfs_comp="xz"
|
||||||
sfs_opts="-Xbcj x86 -b 512k -Xdict-size 512k"
|
sfs_opts="-Xbcj x86 -b 512k -Xdict-size 512k"
|
||||||
snapshot_date=""
|
snapshot_date=""
|
||||||
|
default_kernel_param=""
|
||||||
|
|
||||||
verbose=""
|
verbose=""
|
||||||
|
|
||||||
|
|
@ -236,6 +237,7 @@ make_syslinux() {
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||||
s|%ISO_VERSION%|${iso_version}|g;
|
s|%ISO_VERSION%|${iso_version}|g;
|
||||||
s|%ISO_ARCH%|${arch}|g;
|
s|%ISO_ARCH%|${arch}|g;
|
||||||
|
s|%DEFAULTKERNELPARAM%|${default_kernel_param}|g;
|
||||||
s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}
|
s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}
|
||||||
done
|
done
|
||||||
cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux
|
cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux
|
||||||
|
|
@ -266,6 +268,7 @@ make_efi() {
|
||||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||||
s|%ISO_VERSION%|${iso_version}|g;
|
s|%ISO_VERSION%|${iso_version}|g;
|
||||||
s|%ISO_ARCH%|${arch}|g;
|
s|%ISO_ARCH%|${arch}|g;
|
||||||
|
s|%DEFAULTKERNELPARAM%|${default_kernel_param}|g;
|
||||||
s|%INSTALL_DIR%|${install_dir}|g" \
|
s|%INSTALL_DIR%|${install_dir}|g" \
|
||||||
${script_path}/efiboot/grub/grubsrcd.cfg > ${work_dir}/iso/boot/grub/grubsrcd.cfg
|
${script_path}/efiboot/grub/grubsrcd.cfg > ${work_dir}/iso/boot/grub/grubsrcd.cfg
|
||||||
cp -a /usr/share/edk2-shell/${edk2arch}/Shell_Full.efi ${work_dir}/iso/EFI/shell.efi
|
cp -a /usr/share/edk2-shell/${edk2arch}/Shell_Full.efi ${work_dir}/iso/EFI/shell.efi
|
||||||
|
|
|
||||||
|
|
@ -22,37 +22,37 @@ fi
|
||||||
|
|
||||||
menuentry "Boot SystemRescue using default options" {
|
menuentry "Boot SystemRescue using default options" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM%
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Boot SystemRescue and copy system to RAM (copytoram)" {
|
menuentry "Boot SystemRescue and copy system to RAM (copytoram)" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% copytoram
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Boot SystemRescue and verify integrity of the medium (checksum)" {
|
menuentry "Boot SystemRescue and verify integrity of the medium (checksum)" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% checksum
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% checksum
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Boot SystemRescue using basic display drivers (nomodeset)" {
|
menuentry "Boot SystemRescue using basic display drivers (nomodeset)" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nomodeset
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% nomodeset
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Boot a Linux operating system installed on the disk (findroot)" {
|
menuentry "Boot a Linux operating system installed on the disk (findroot)" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% findroot
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% findroot
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Stop during the boot process before mounting the root filesystem" {
|
menuentry "Stop during the boot process before mounting the root filesystem" {
|
||||||
set gfxpayload=keep
|
set gfxpayload=keep
|
||||||
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% break
|
linux /%INSTALL_DIR%/boot/%ISO_ARCH%/vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% break
|
||||||
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
initrd /%INSTALL_DIR%/boot/intel_ucode.img /%INSTALL_DIR%/boot/amd_ucode.img /%INSTALL_DIR%/boot/%ISO_ARCH%/sysresccd.img
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue (NBD)
|
MENU LABEL Boot SystemRescue (NBD)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver}
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} %DEFAULTKERNELPARAM%
|
||||||
SYSAPPEND 3
|
SYSAPPEND 3
|
||||||
|
|
||||||
LABEL sysresccd_nfs
|
LABEL sysresccd_nfs
|
||||||
|
|
@ -19,7 +19,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue (NFS)
|
MENU LABEL Boot SystemRescue (NFS)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/sysresccd/bootmnt
|
APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/sysresccd/bootmnt %DEFAULTKERNELPARAM%
|
||||||
SYSAPPEND 3
|
SYSAPPEND 3
|
||||||
|
|
||||||
LABEL sysresccd_http
|
LABEL sysresccd_http
|
||||||
|
|
@ -30,7 +30,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue (HTTP)
|
MENU LABEL Boot SystemRescue (HTTP)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/
|
APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ %DEFAULTKERNELPARAM%
|
||||||
SYSAPPEND 3
|
SYSAPPEND 3
|
||||||
|
|
||||||
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue using default options
|
MENU LABEL Boot SystemRescue using default options
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM%
|
||||||
|
|
||||||
LABEL sysresccd_copytoram
|
LABEL sysresccd_copytoram
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
|
|
@ -16,7 +16,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue and copy system to RAM (copytoram)
|
MENU LABEL Boot SystemRescue and copy system to RAM (copytoram)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% copytoram
|
||||||
|
|
||||||
LABEL sysresccd_checksum
|
LABEL sysresccd_checksum
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
|
|
@ -25,7 +25,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue and verify integrity of the medium (checksum)
|
MENU LABEL Boot SystemRescue and verify integrity of the medium (checksum)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% checksum
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% checksum
|
||||||
|
|
||||||
LABEL sysresccd_nomodeset
|
LABEL sysresccd_nomodeset
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
|
|
@ -34,7 +34,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot SystemRescue using basic display drivers (nomodeset)
|
MENU LABEL Boot SystemRescue using basic display drivers (nomodeset)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nomodeset
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% nomodeset
|
||||||
|
|
||||||
LABEL sysresccd_findroot
|
LABEL sysresccd_findroot
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
|
|
@ -43,7 +43,7 @@ ENDTEXT
|
||||||
MENU LABEL Boot a Linux operating system installed on the disk (findroot)
|
MENU LABEL Boot a Linux operating system installed on the disk (findroot)
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% findroot
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% findroot
|
||||||
|
|
||||||
LABEL sysresccd_break
|
LABEL sysresccd_break
|
||||||
TEXT HELP
|
TEXT HELP
|
||||||
|
|
@ -52,6 +52,6 @@ ENDTEXT
|
||||||
MENU LABEL Stop during the boot process before mounting the root filesystem
|
MENU LABEL Stop during the boot process before mounting the root filesystem
|
||||||
LINUX boot/%ISO_ARCH%/vmlinuz
|
LINUX boot/%ISO_ARCH%/vmlinuz
|
||||||
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/%ISO_ARCH%/sysresccd.img
|
||||||
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% break
|
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% %DEFAULTKERNELPARAM% break
|
||||||
|
|
||||||
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
INCLUDE boot/syslinux/sysresccd_tail.cfg
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue