rename vmlinuz_ and initramdisk_ to - usage

This commit is contained in:
Tobias Powalowski 2023-01-17 20:58:21 +01:00
parent e415cca1e2
commit f8be3cafe9
2 changed files with 18 additions and 18 deletions

View file

@ -46,17 +46,17 @@ _prepare_kernel_initramfs_files() {
mkdir -p "${_ISODIR}/boot"
#shellcheck disable=SC2154
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}-pre.img" || exit 1
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}-pre.img" || exit 1
# delete cachedir on archboot environment
[[ "$(cat /etc/hostname)" == "archboot" ]] && rm -rf /var/cache/pacman/pkg
# grub on x86_64 reports too big if near 1GB
split -b 950M -d --additional-suffix=.img -a 1 "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}-pre.img" \
"${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}-"
rm "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}-pre.img"
split -b 950M -d --additional-suffix=.img -a 1 "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}-pre.img" \
"${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}-"
rm "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}-pre.img"
if [[ "$(find "${_ISODIR}/boot" -name '*.img' | wc -l)" -lt "2" ]]; then
mv "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}-0.img" "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}.img"
mv "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}-0.img" "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}.img"
fi
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz_${_RUNNING_ARCH}"
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_RUNNING_ARCH}"
# needed to hash the kernel for secureboot enabled systems
# all uppercase to avoid issues with firmware and hashing eg. DELL firmware is case sensitive!
if [[ "${_RUNNING_ARCH}" == "aarch64" ]]; then
@ -88,7 +88,7 @@ _prepare_kernel_initramfs_files_RISCV64() {
source "${_PRESET}"
mkdir -p "${_ISODIR}"/boot
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz_${_RUNNING_ARCH}"
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs_${_RUNNING_ARCH}.img" || exit 1
mkinitcpio -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_RUNNING_ARCH}.img" || exit 1
}
_prepare_ucode() {
@ -202,7 +202,7 @@ default linux
label linux
menu label Boot System (automatic boot in 10 seconds ...)
kernel /boot/vmlinuz_${_RUNNING_ARCH}
initrd /boot/initramfs_${_RUNNING_ARCH}.img
initrd /boot/initramfs-${_RUNNING_ARCH}.img
append rootfstype=ramfs console=ttyS0,115200 console=tty0 audit=0 ${_SMP}
EOF
}

View file

@ -58,19 +58,19 @@ function _efi_shell {
}
function _initrd_x86_64 {
if [ -e /boot/initramfs_x86_64.img ]; then
initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs_x86_64.img
if [ -e /boot/initramfs-x86_64.img ]; then
initrd /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-x86_64.img
else
initrd /boot/intel-ucode.img /boot/amd-ucode.img \
/boot/initramfs_x86_64-0.img /boot/initramfs_x86_64-1.img
/boot/initramfs-x86_64-0.img /boot/initramfs-x86_64-1.img
fi
}
function _initrd_aarch64 {
if [ -e /boot/initramfs_aarch64.img ]; then
initrd /boot/amd-ucode.img /boot/initramfs_aarch64.img
if [ -e /boot/initramfs-aarch64.img ]; then
initrd /boot/amd-ucode.img /boot/initramfs-aarch64.img
else
initrd /boot/amd-ucode.img /boot/initramfs_aarch64-0.img /boot/initramfs_aarch64-1.img
initrd /boot/amd-ucode.img /boot/initramfs-aarch64-0.img /boot/initramfs-aarch64-1.img
fi
}
@ -78,7 +78,7 @@ if [ ${grub_platform} == "pc" ]; then
set default="Archboot Arch Linux X86_64 - BIOS Mode"
menuentry "Archboot Arch Linux x86_64 - BIOS Mode" {
_menu_running
linux /boot/vmlinuz_x86_64 rootfstype=ramfs console=ttyS0,115200 console=tty0 audit=0
linux /boot/vmlinuz-x86_64 rootfstype=ramfs console=ttyS0,115200 console=tty0 audit=0
_initrd_x86_64
}
@ -93,7 +93,7 @@ if [ ${grub_platform} == "efi" ]; then
set default="Archboot Arch Linux x86_64"
menuentry "Archboot Arch Linux x86_64" {
_menu_running
linux /boot/vmlinuz_x86_64 rootfstype=ramfs console=ttyS0,115200 console=tty0 audit=0
linux /boot/vmlinuz-x86_64 rootfstype=ramfs console=ttyS0,115200 console=tty0 audit=0
_initrd_x86_64
}
_efi_shell
@ -101,14 +101,14 @@ if [ ${grub_platform} == "efi" ]; then
set default="Archboot Arch Linux AA64"
menuentry "Archboot Arch Linux AA64" {
_menu_running
linux /boot/vmlinuz_aarch64 rootfstype=ramfs nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0
linux /boot/vmlinuz-aarch64 rootfstype=ramfs nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0
_initrd_aarch64
}
elif [ ${grub_cpu} == "i386" ]; then
set default="Archboot Arch Linux x86_64 - EFI MIXED MODE"
menuentry "Archboot Arch Linux x86_64 - EFI MIXED MODE" {
_menu_running
linux /boot/vmlinuz_x86_64 rootfstype=ramfs _IA32_UEFI=1 console=ttyS0,115200 console=tty0 audit=0
linux /boot/vmlinuz-x86_64 rootfstype=ramfs _IA32_UEFI=1 console=ttyS0,115200 console=tty0 audit=0
_initrd_x86_64
}
_efi_shell