Howto mkosi: Difference between revisions
Jump to navigation
Jump to search
Mandulete1 (talk | contribs) |
Mandulete1 (talk | contribs) No edit summary |
||
Line 43: | Line 43: | ||
boot image using qemu/kvm: | boot image using qemu/kvm: | ||
mkosi --output almalinux.img --qemu-smp 2 qemu | mkosi --output almalinux.img --qemu-smp 2 qemu | ||
= references = | = references = | ||
* https://github.com/systemd/mkosi | * https://github.com/systemd/mkosi | ||
* http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html | * http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html |
Revision as of 04:09, 15 May 2024
installation
install package on archlinux:
pacman -S mkosi mtools systemd-ukify --noconfirm
create temporary directory to store images:
mkdir mkosimages && cd mkosimages
create debian img
install packages:
pacman -S debootstrap debian-archive-keyring apt --noconfirm
create image:
mkosi --distribution debian --release bookworm --format disk --bootable --checksum --root-password password --package linux-image-generic,systemd,systemd-boot,systemd-sysv,udev,dbus --package openssh-client,vim --output debian.img
boot image using systemd:
systemd-nspawn --boot --image debian.img
boot image using qemu/kvm:
mkosi --output debian.img --qemu-smp 2 qemu
create arch img
install packages:
pacman -S arch-install-scripts --noconfirm
create image:
mkosi --distribution arch --format disk --bootable --checksum --root-password password --package linux,systemd,udev,dbus --package openssh-client,vim --output arch.img
boot image using systemd:
systemd-nspawn --boot --image arch.img
boot image using qemu/kvm:
mkosi --output arch.img --qemu-smp 2 qemu
create ubuntu img
install packages:
pacman -S debootstrap ubuntu-keyring apt --noconfirm
create image:
mkosi --distribution ubuntu --release noble --format disk --bootable --checksum --root-password password --package linux-image-generic,systemd,systemd-boot,systemd-sysv,udev,dbus --package openssh-client,vim --output ubuntu.img
boot image using systemd:
systemd-nspawn --boot --image ubuntu.img
boot image using qemu/kvm:
mkosi --output ubuntu.img --qemu-smp 2 qemu
create almalinux img
install the following package using yay:
yay -S dnf-legacy-utils
create image:
mkosi --distribution alma --release 9 --format disk --bootable --checksum --root-password password --package bash,coreutils,util-linux,systemd,rpm --output almalinux.img
boot image using systemd:
systemd-nspawn --boot --image almalinux.img
boot image using qemu/kvm:
mkosi --output almalinux.img --qemu-smp 2 qemu