Compare commits

...

3 commits

Author SHA1 Message Date
296213448d 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
2022-07-02 16:02:09 -03:00
9f2ff0530f ci: Mostrar tamaño de initramfs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-07-02 16:01:51 -03:00
3553564840 ci: Mostrar cuanto tarda en generar squashfs 2022-07-02 16:01:37 -03:00
3 changed files with 21 additions and 6 deletions

View file

@ -4,5 +4,5 @@ pipeline:
commands: commands:
- apk add doas doas-sudo-shim lua5.1 squashfs-tools - apk add doas doas-sudo-shim lua5.1 squashfs-tools
- echo "permit nopass root" >> /etc/doas.d/doas.conf - echo "permit nopass root" >> /etc/doas.d/doas.conf
- lua5.1 setup.lua - time lua5.1 setup.lua
- ls -l image.squashfs && du -h image.squashfs - ls -l image.squashfs boot/initramfs-* && du -h image.squashfs boot/initramfs-*

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 add_file("/etc/update-extlinux.conf", [[# configuration for extlinux config builder
# Overwrite current /boot/extlinux.conf. # Overwrite current /boot/extlinux.conf.
@ -26,5 +37,7 @@ timeout=3
default=lts default=lts
]]) ]])
add_file("/etc/mkinitfs/mkinitfs.conf", add_file("/etc/mkinitfs/mkinitfs.conf", [[
'features="squashfs ata base cdrom ext4 keymap kms mmc nvme scsi usb virtio"') 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...") print("=> Installing and upgrading packages...")
utils.expect_nil(alpine.make_world(root, packages)) utils.expect_nil(alpine.make_world(root, packages))
print("=> Generating initramfs...")
utils.expect_nil(modules.kernel.mkinitfs(root))
print("=> Setting password...") print("=> Setting password...")
utils.expect_nil(alpine.set_password(root, "root", "1")) utils.expect_nil(alpine.set_password(root, "root", "1"))
print("=> Moving boot...") print("=> Moving boot...")