Compare commits
3 commits
cd14e88b19
...
296213448d
Author | SHA1 | Date | |
---|---|---|---|
296213448d | |||
9f2ff0530f | |||
3553564840 |
3 changed files with 21 additions and 6 deletions
|
@ -4,5 +4,5 @@ pipeline:
|
|||
commands:
|
||||
- apk add doas doas-sudo-shim lua5.1 squashfs-tools
|
||||
- echo "permit nopass root" >> /etc/doas.d/doas.conf
|
||||
- lua5.1 setup.lua
|
||||
- ls -l image.squashfs && du -h image.squashfs
|
||||
- time lua5.1 setup.lua
|
||||
- ls -l image.squashfs boot/initramfs-* && du -h image.squashfs boot/initramfs-*
|
||||
|
|
|
@ -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