Correr mkinitfs manualmente con zstd sin -19
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Cat /dev/Nulo 2022-07-02 15:34:46 -03:00
parent 26e1eb41d8
commit cd14e88b19
2 changed files with 19 additions and 4 deletions

View file

@ -1,6 +1,17 @@
modules.kernel = {}
local t = require("../utils/templater")
add_packages({ "linux-virt" })
modules.kernel = {
flavor = "virt",
mkinitfs = function(rootfs_path)
local status = os.execute(t("sudo sed -i 's/^esac/esac;comp=zstd/' '{{rootfs_path}}'/sbin/mkinitfs && sudo chroot '{{rootfs_path}}' mkinitfs -o /boot/initramfs-{{flavor}} $(cat '{{rootfs_path}}'/usr/share/kernel/'{{flavor}}'/kernel.release)", {
rootfs_path = rootfs_path,
flavor = modules.kernel.flavor,
}))
if not (status == 0) then return status end
end,
}
add_packages({ "linux-" .. modules.kernel.flavor, "zstd" })
add_file("/etc/update-extlinux.conf", [[# configuration for extlinux config builder
# Overwrite current /boot/extlinux.conf.
@ -26,5 +37,7 @@ timeout=3
default=lts
]])
add_file("/etc/mkinitfs/mkinitfs.conf",
'features="squashfs ata base cdrom ext4 keymap kms mmc nvme scsi usb virtio"')
add_file("/etc/mkinitfs/mkinitfs.conf", [[
features="squashfs ata base cdrom ext4 keymap kms mmc nvme scsi usb virtio"
disable_trigger=yes
]])

View file

@ -51,6 +51,8 @@ module "nginx"
print("=> Installing and upgrading packages...")
utils.expect_nil(alpine.make_world(root, packages))
print("=> Generating initramfs...")
utils.expect_nil(modules.kernel.mkinitfs(root))
print("=> Setting password...")
utils.expect_nil(alpine.set_password(root, "root", "1"))
print("=> Moving boot...")