Add livecd packages, bump elemental

This commit is contained in:
Ettore Di Giacinto
2022-09-21 14:39:12 +00:00
parent 78702adfdb
commit 61effffbb0
5 changed files with 100 additions and 2 deletions

View File

@@ -0,0 +1,50 @@
image: "opensuse/leap:15.3"
prelude:
{{ if .Values.arch }}
{{if eq .Values.arch "x86_64"}}
- zypper in -y --no-recommends syslinux grub2-i386-pc grub2-x86_64-efi shim
{{end}}
{{if eq .Values.arch "aarch64"}}
- zypper in -y --no-recommends syslinux-x86_64 grub2-i386-pc grub2-arm64-efi shim
{{end}}
- zypper cc
- grub2-mkimage -O i386-pc -o /usr/share/grub2/i386-pc/core.img -p /boot/grub2 -d /usr/share/grub2/i386-pc ext2 iso9660 linux echo configfile search_label search_fs_file search search_fs_uuid ls normal gzio png fat gettext font minicmd gfxterm gfxmenu all_video xfs btrfs lvm luks gcry_rijndael gcry_sha256 gcry_sha512 crypto cryptodisk test true loadenv part_gpt part_msdos biosdisk vga vbe chain boot
- cat /usr/share/grub2/i386-pc/cdboot.img /usr/share/grub2/i386-pc/core.img > /usr/share/grub2/i386-pc/eltorito.img
{{end}}
steps:
{{if eq .Values.name "grub2"}}
{{ if .Values.arch }}
{{if eq .Values.arch "x86_64"}}
- mkdir -p /boot/x86_64/loader/grub2/fonts && cp -p /usr/share/grub2/unicode.pf2 /boot/x86_64/loader/grub2/fonts
- mkdir -p /boot/grub2/x86_64-efi/ && cp -p /usr/share/grub2/x86_64-efi/* /boot/grub2/x86_64-efi/
{{end}}
{{if eq .Values.arch "aarch64"}}
- mkdir -p /boot/arm64/loader/grub2/fonts && cp -p /usr/share/grub2/unicode.pf2 /boot/arm64/loader/grub2/fonts
{{end}}
{{end}}
- mkdir -p /boot/grub2/i386-pc && cp -p /usr/share/grub2/i386-pc/* /boot/grub2/i386-pc/
- mkdir -p /boot/x86_64/loader
- cp -p /usr/share/grub2/i386-pc/eltorito.img /usr/share/grub2/i386-pc/boot_hybrid.img /usr/share/syslinux/isolinux.bin /usr/share/syslinux/menu.c32 /usr/share/syslinux/chain.c32 /usr/share/syslinux/mboot.c32 /boot/x86_64/loader
- cp -p config/grub_live.cfg /boot/grub2/grub.cfg
{{end}}
{{if eq .Values.name "grub2-efi-image"}}
{{if .Values.arch }}
{{if eq .Values.arch "x86_64"}}
- mkdir -p /EFI/BOOT
# For removable drives the name of the efi needs to be bootx64.efi
- cp /usr/share/efi/x86_64/shim.efi /EFI/BOOT/bootx64.efi
- cp /usr/share/efi/x86_64/grub.efi /EFI/BOOT/grub.efi
- cp /usr/share/efi/x86_64/MokManager.efi /EFI/BOOT/MokManager.efi
{{end}}
{{if eq .Values.arch "aarch64"}}
- mkdir -p /EFI/BOOT
# For removable drives the name of the efi needs to be bootaa64.efi
- cp /usr/share/efi/aarch64/shim.efi /EFI/BOOT/bootaa64.efi
- cp /usr/share/efi/aarch64/grub.efi /EFI/BOOT/grub.efi
- cp /usr/share/efi/aarch64/MokManager.efi /EFI/BOOT/MokManager.efi
{{end}}
{{end}}
- cp config/grub_live_efi.cfg /EFI/BOOT/grub.cfg
{{end}}

View File

@@ -0,0 +1,11 @@
packages:
- name: "grub2"
category: "livecd"
version: 0.0.3-2
arch: x86_64
description: "Grub2 booloader for live systems"
- name: "grub2-efi-image"
category: "livecd"
version: 0.0.2-3
arch: x86_64
description: "Grub2 booloader EFI image for live systems"

View File

@@ -0,0 +1,34 @@
search --no-floppy --file --set=root /boot/kernel
set default=0
set timeout=10
set timeout_style=menu
set linux=linux
set initrd=initrd
if [ "${grub_cpu}" = "x86_64" -o "${grub_cpu}" = "i386" -o "${grub_cpu}" = "arm64" ];then
if [ "${grub_platform}" = "efi" ]; then
if [ "${grub_cpu}" != "arm64" ]; then
set linux=linuxefi
set initrd=initrdefi
fi
fi
fi
if [ "${grub_platform}" = "efi" ]; then
echo "Please press 't' to show the boot menu on this console"
fi
set font=($root)/boot/${grub_cpu}/loader/grub2/fonts/unicode.pf2
if [ -f ${font} ];then
loadfont ${font}
fi
menuentry "cOS" --class os --unrestricted {
echo Loading kernel...
$linux ($root)/boot/kernel cdroot root=live:CDLABEL=COS_LIVE rd.live.dir=/ rd.live.squashimg=rootfs.squashfs console=tty1 console=ttyS0 rd.cos.disable
echo Loading initrd...
$initrd ($root)/boot/initrd
}
if [ "${grub_platform}" = "efi" ]; then
hiddenentry "Text mode" --hotkey "t" {
set textmode=true
terminal_output console
}
fi

View File

@@ -0,0 +1,3 @@
search --no-floppy --file --set=root /boot/kernel
set prefix=($root)/boot/grub2
configfile $prefix/grub.cfg

View File

@@ -1,6 +1,6 @@
name: "elemental-cli"
category: "system"
version: "0.20220808"
version: "0.20220921"
bin_name: "elemental"
fips: false
labels:
@@ -9,4 +9,4 @@ labels:
autobump.revdeps: "true"
autobump.strategy: "git_hash"
autobump.git.branch: "main"
git.hash: "8a7e7a1098ca9e527a4a075240092b4a4d56b390"
git.hash: "129edf91fc47e7c1563c3da5efe60ef4d57bd72f"