diff --git a/Earthfile b/Earthfile index 90e5a1d74..80bf70e48 100644 --- a/Earthfile +++ b/Earthfile @@ -431,11 +431,17 @@ base-image: END - IF [ -e "/usr/bin/dracut" ] + RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" + + IF [ -f "/usr/bin/dracut" ] # Regenerate initrd if necessary - RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}" RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd END + + IF [ -f "/sbin/mkinitfs" ] + # Proper config files with immucore and custom initrd should already be in there installled by framework + RUN --no-cache kernel=$(ls /lib/modules | head -n1) && mkinitfs -o /boot/initrd $kernel + END END # Set /boot/vmlinuz pointing to our kernel so kairos-agent can use it @@ -444,12 +450,6 @@ base-image: RUN rm -rf /boot/initramfs-* END - # Cleanup for alpine as this gets installed as a side-effect - # we already provide a /boot/initrd with the luet package - IF [ -e "/boot/initramfs-lts" ] - RUN rm /boot/initramfs-lts - END - IF [ ! -e "/boot/vmlinuz" ] IF [ -e "/boot/vmlinuz-lts" ] # Alpine provides the kernel under this name diff --git a/framework-profile.yaml b/framework-profile.yaml index 59625856d..a4158c395 100755 --- a/framework-profile.yaml +++ b/framework-profile.yaml @@ -80,22 +80,14 @@ flavors: - common-packages - kairos-toolchain - openrc - - alpine-init alpine-arm-rpi: - common-packages - kairos-toolchain - openrc - - alpine-init-rpi -# See https://github.com/kairos-io/packages/pull/67 for rationale -alpine-init: - packages: - - distro-kernel/alpine -alpine-init-rpi: - packages: - - distro-kernel/alpine-rpi openrc: packages: - init-svc/openrc + - initrd/alpine systemd-base: packages: - init-svc/systemd @@ -147,9 +139,9 @@ repositories: priority: 2 urls: - "quay.io/kairos/packages" - reference: 20231018075943-repository.yaml + reference: 20231019093159-repository.yaml - !!merge <<: *kairos arch: arm64 urls: - "quay.io/kairos/packages-arm64" - reference: 20231018075844-repository.yaml + reference: 20231019092540-repository.yaml diff --git a/images/Dockerfile.alpine b/images/Dockerfile.alpine index 6b6cb5e1f..99215df26 100644 --- a/images/Dockerfile.alpine +++ b/images/Dockerfile.alpine @@ -22,6 +22,7 @@ RUN apk --no-cache add \ coreutils \ cryptsetup \ curl \ + device-mapper-udev \ dbus \ dmidecode \ dosfstools \ @@ -29,8 +30,10 @@ RUN apk --no-cache add \ e2fsprogs-extra \ efibootmgr \ eudev \ + eudev-hwids \ fail2ban \ findutils \ + findmnt \ gawk \ gcompat \ gettext \ @@ -76,6 +79,7 @@ RUN apk --no-cache add \ rbd-nbd \ rng-tools \ rsync \ + sgdisk \ smartmontools \ squashfs-tools \ strace \ @@ -88,6 +92,7 @@ RUN apk --no-cache add \ wireguard-tools \ wpa_supplicant \ xfsprogs \ + xfsprogs-extra \ xz ############################################################### @@ -100,12 +105,15 @@ RUN apk --no-cache add \ bonding \ bridge \ rbd-nbd +RUN apk --no-cache add linux-lts --no-scripts FROM common as rpicommon COPY rpi/config.txt /boot/config.txt FROM rpicommon AS rpi3 +RUN apk --no-cache add linux-rpi --no-scripts # use --no-scripts to avoid building initramfs FROM rpicommon AS rpi4 +RUN apk --no-cache add linux-rpi4 --no-scripts # use --no-scripts to avoid building initramfs ###############################################################