- Reference
kickstart
files here - https://github.com/weldr/lorax/tree/master/docs - Simple how-to of Lorax by Brian Lane - https://www.brianlane.com/post/creating-the-anaconda-bootiso-with-lorax/
- How to generate Anaconda boot ISO - https://weldr.io/lorax/lorax.html
- How to generate livemedia from the created Anaconda boot ISO - https://weldr.io/lorax/livemedia-creator.html
Last active
August 25, 2023 05:26
-
-
Save gridhead/5f8eb15d4f995151229539d85f009a7c to your computer and use it in GitHub Desktop.
Messing Around With Building Images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the file to a local directory | |
# Rename the file to `mkosi.conf` | |
# Run `sudo mkosi build` in that directory | |
# mkosi 15.1 on fedora rawhide (i.e. 40) works the best | |
[Distribution] | |
Distribution=centos | |
Release=9 | |
Architecture=x86-64 | |
Bootable=yes | |
[Output] | |
Format=disk | |
Output=centgrid | |
# CompressOutput=xz | |
ImageVersion=0.1.1 | |
[Content] | |
Packages=kernel | |
systemd | |
systemd-boot | |
udev | |
dnf | |
NetworkManager | |
iproute | |
ncurses | |
basesystem | |
sudo | |
Bootable=yes | |
Locale=en_US.UTF-8 | |
Timezone=Asia/Kolkata | |
Hostname=centgrid | |
RootPassword=centgrid | |
RootShell=/usr/bin/bash | |
Autologin=yes | |
[Validation] | |
Checksum=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the file to a local directory | |
# Rename the file to `mkosi.conf` | |
# Run `sudo mkosi build` in that directory | |
# mkosi 15.1 on fedora rawhide (i.e. 40) works the best | |
[Distribution] | |
Distribution=fedora | |
Release=40 | |
Architecture=x86-64 | |
Bootable=yes | |
[Output] | |
Format=disk | |
Output=fedogrid | |
CompressOutput=yes | |
ImageVersion=0.1.1 | |
[Content] | |
Packages=kernel | |
systemd | |
systemd-boot | |
udev | |
util-linux | |
NetworkManager | |
iproute | |
ncurses | |
basesystem | |
sudo | |
Bootable=yes | |
Locale=en_US.UTF-8 | |
Timezone=Asia/Kolkata | |
Hostname=fedogrid | |
RootPassword=fedogrid | |
RootShell=/usr/bin/bash | |
Autologin=yes | |
[Validation] | |
Checksum=yes |
Install mkosi
and arch-install-scripts
on your Fedora Rawhide installation.
$ sudo dnf install mkosi arch-install-scripts
Initialize the client GPG key for the pacman
package manager and populate the official repositories for archlinuxarm
.
$ sudo pacman-key --init
$ sudo pacman-key --populate archlinux
Create a directory for building the Arch Linux OS image and make it the present working directory.
$ mkdir archgrid
$ cd archgrid
Configure the OS image specification using the text editor of your choice.
$ nano mkosi.conf
[Distribution]
Distribution=arch
Architecture=x86-64
Bootable=yes
[Output]
Format=disk
Output=archgrid
# CompressOutput=xz
ImageVersion=0.1.0
[Content]
Packages=linux
systemd
Bootable=yes
Locale=en_US.UTF-8
Timezone=Asia/Kolkata
Hostname=archgrid
RootPassword=archgrid
RootShell=/usr/bin/bash
Autologin=yes
[Validation]
Checksum=yes
Start building the operating system image by executing the following command.
$ sudo mkosi build
sudo dnf install qemu --setopt=install_weak_deps=False
sudo dnf install qemu-user-static --setopt=install_weak_deps=False
nano mkosi.conf
[Distribution]
Distribution=fedora
Release=40
Architecture=arm64
# Bootable=yes
[Output]
Format=disk
Output=fedogrid
# CompressOutput=yes
ImageVersion=0.1.2
[Content]
Packages=kernel
systemd
systemd-boot
udev
util-linux
ncurses
basesystem
sudo
dnf
# Bootable=yes
Locale=en_US.UTF-8
Timezone=Asia/Kolkata
Hostname=fedogrid
RootPassword=fedogrid
RootShell=/usr/bin/bash
Autologin=yes
[Validation]
Checksum=yes
sudo mkosi build
Copy over the image to a Raspberry Pi device running aarch64-based operating system and set up symbolic link
In the Raspberry Pi device
ln -sf fedogrid_0.1.2.raw fedogrid
In the Raspberry Pi device
sudo machinectl import-raw fedogrid
In the Raspberry Pi device
sudo machinectl start fedogrid
In the Raspberry Pi device
sudo machinectl shell fedogrid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the file to a local directory | |
# Rename the file to `mkosi.conf` | |
# Run `sudo mkosi build` in that directory | |
# Ensure that `zypper` is installed | |
# mkosi 15.1 on fedora rawhide (i.e. 40) works the best | |
[Distribution] | |
Distribution=opensuse | |
Release=tumbleweed | |
Architecture=x86-64 | |
Bootable=yes | |
[Output] | |
Format=disk | |
Output=susegrid | |
# CompressOutput=xz | |
ImageVersion=0.1.1 | |
[Content] | |
Packages=kernel-default | |
systemd | |
systemd-boot | |
udev | |
Bootable=yes | |
Locale=en_US.UTF-8 | |
Timezone=Asia/Kolkata | |
Hostname=susegrid | |
RootPassword=susegrid | |
RootShell=/usr/bin/bash | |
Autologin=yes | |
[Validation] | |
Checksum=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download the fedora-minimal kickstart file | |
``` | |
wget https://github.com/weldr/lorax/raw/master/docs/fedora-minimal.ks | |
``` | |
2. Disable the SELinux first | |
``` | |
setenforce 0 | |
``` | |
3. Create an Anaconda boot ISO | |
``` | |
sudo \ | |
lorax \ | |
--product Fedora \ | |
--version 38 \ | |
--release 38 \ | |
--source http://dl.fedoraproject.org/pub/fedora/linux/releases/38/Everything/x86_64/os/ \ | |
rslt/ | |
``` | |
4. Make the resulting directory as the present working directory of the livemedia generation. | |
``` | |
cd rslt/ | |
``` | |
5. Create a live media from the generated ISO with logs being displayed on 0 port offset from the default VNC port (i.e. 5900) | |
``` | |
sudo \ | |
livemedia-creator \ | |
--make-iso \ | |
--iso=/path/to/the/generated/anaconda/boot/ISO/in/previous/step \ | |
--ks=fedora-minimal.ks | |
sudo \ | |
livemedia-creator \ | |
--make-iso \ | |
--iso=rslt/images/boot.iso \ | |
--ks=fedora-minimal.ks \ | |
--vnc=vnc=0.0.0.0:0 \ | |
--virt-uefi | |
``` | |
6. Re-enable the SELinux after completion | |
``` | |
setenforce 1 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment