39 lines
868 B
TypeScript
39 lines
868 B
TypeScript
|
import { Alpine } from "./alpine";
|
||
|
|
||
|
export async function setupKernel(alpine: Alpine): Promise<void> {
|
||
|
await alpine.writeFile(
|
||
|
"/etc/update-extlinux.conf",
|
||
|
`# configuration for extlinux config builder
|
||
|
|
||
|
# Overwrite current /boot/extlinux.conf.
|
||
|
overwrite=1
|
||
|
|
||
|
# vesa_menu
|
||
|
# use fancy vesa menu (vesamenu.c32) menus, won't work with serial
|
||
|
vesa_menu=1
|
||
|
|
||
|
#default_kernel_opts=quiet
|
||
|
default_kernel_opts=
|
||
|
modules=loop,squashfs,sd-mod,usb-storage,ext4,vfat
|
||
|
|
||
|
# root device - if not specified, will be guessed using
|
||
|
# blkid -o export /dev/root
|
||
|
root=/dev/sda
|
||
|
|
||
|
# if set to non-zero, update-extlinux will be a lot more verbose.
|
||
|
verbose=0
|
||
|
|
||
|
hidden=0
|
||
|
timeout=3
|
||
|
default=lts
|
||
|
`
|
||
|
);
|
||
|
|
||
|
await alpine.writeFile(
|
||
|
"/etc/mkinitfs/mkinitfs.conf",
|
||
|
'features="squashfs ata base cdrom ext4 keymap kms mmc nvme scsi usb virtio"'
|
||
|
);
|
||
|
|
||
|
await alpine.addPackages(["linux-virt"]);
|
||
|
}
|