Correr mkinitfs manualmente con zstd sin -19 #3
2 changed files with 19 additions and 4 deletions
|
@ -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
|
||||
]])
|
||||
|
|
|
@ -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...")
|
||||
|
|
Loading…
Reference in a new issue