create new directories
it follows a cuisine analogy, with dishes made followed a recipe, using ingredients
This commit is contained in:
92
ingredients/base-desktop-gnome.cfg
Normal file
92
ingredients/base-desktop-gnome.cfg
Normal file
@ -0,0 +1,92 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic block to build a minimal and customized desktop-oriented operating system using GNOME Shell.
|
||||
|
||||
xconfig --startxonboot --defaultdesktop=GNOME # Start the display session on boot. Although it says --startx, which seems to imply xorg, it is actually generic and thus works also with Wayland.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies
|
||||
|
||||
gnome-shell # the version 3 of the GNOME desktop environment, without any presintalled applications
|
||||
gnome-terminal # install the default terminal for GNOME Shell
|
||||
-gnome-tour # delete GNOME Tour so it doesn't automatically launch on boot
|
||||
mesa-dri-drivers # add mesa drivers otherwise there is a blank screen when first booting a desktop-based kickstart without virtualization tools
|
||||
dejavu-sans-mono-fonts # the gnome-shell package doesn't include much fonts by default, resulting in weird spacings in GNOME Terminal. GNOME Terminal unfortunately doesn't automatically pick this font
|
||||
elementary-wallpapers-gnome.noarch # Gorgeous wallpapers from the elementary OS project
|
||||
wpa_supplicant # WPA Supplicant for Linux. It is not packaged by default in gnome-shell, but necessary to configure wireless networks using the Network Manager
|
||||
nano # The nano text editor
|
||||
|
||||
%end
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-desktop-gnome.log # Beginning of %post section. Those commands are executed outside the chroot environment
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.background.gschema.override<< EOF
|
||||
[org.gnome.desktop.background]
|
||||
picture-uri='file:///usr/share/backgrounds/elementary/Morskie Oko.jpg'
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.media-handling.gschema.override<< EOF
|
||||
[org.gnome.desktop.media-handling]
|
||||
automount-open=false
|
||||
autorun-never=true
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.override<< EOF
|
||||
[org.gnome.Terminal.Legacy.Profile]
|
||||
font='DejaVu Sans Mono 12'
|
||||
use-system-font=false
|
||||
audible-bell=false
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.override<< EOF
|
||||
[org.gnome.desktop.wm.preferences]
|
||||
button-layout=':minimize,maximize,close'
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.a11y.gschema.override<< EOF
|
||||
[org.gnome.desktop.a11y]
|
||||
always-show-universal-access-status=true
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override<< EOF
|
||||
[org.gnome.desktop.interface]
|
||||
enable-animations=false
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.privacy.gschema.override<< EOF
|
||||
[org.gnome.desktop.privacy]
|
||||
remove-old-temp-files=true
|
||||
remember-recent-files=false
|
||||
remember-app-usage=false
|
||||
disable-camera=true
|
||||
disable-microphone=true
|
||||
disable-sound-output=true
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.search-providers.gschema.override<< EOF
|
||||
[org.gnome.desktop.search-providers]
|
||||
disable-external=true
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.notifications.gschema.override<< EOF
|
||||
[org.gnome.desktop.notifications.application]
|
||||
enable-sound-alerts=false
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.sound.gschema.override<< EOF
|
||||
[org.gnome.desktop.sound]
|
||||
event-sounds=false
|
||||
EOF
|
||||
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.gnome.desktop.thumbnailers.gschema.override<< EOF
|
||||
[org.gnome.desktop.thumbnailers]
|
||||
disable-all=true
|
||||
EOF
|
||||
|
||||
glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/
|
||||
|
||||
%end # End of the %post section
|
77
ingredients/base-desktop-virtual-machine-manager.cfg
Normal file
77
ingredients/base-desktop-virtual-machine-manager.cfg
Normal file
@ -0,0 +1,77 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a virtual machine manager, sets it to auto-launch and tweaked it.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies
|
||||
|
||||
virt-manager # Install virt-manager, a graphical front-end for QEMU/KVM
|
||||
|
||||
%end
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-desktop-gnome-virtual-machine-manager.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
|
||||
|
||||
# Create a file to autostart virt-manager
|
||||
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Virtual Machine Manager
|
||||
Exec=virt-manager
|
||||
EOF
|
||||
|
||||
# Modify the default virt-manager behavior for misc. options
|
||||
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.override<< EOF
|
||||
|
||||
# Modify the default virt-manager behavior for misc. options
|
||||
[org.virt-manager.virt-manager]
|
||||
xmleditor-enabled=true
|
||||
manager-window-height=600
|
||||
manager-window-width=200
|
||||
|
||||
# Libvirt URIs listed in the manager window
|
||||
[org.virt-manager.virt-manager.connections]
|
||||
uris=['qemu:///system', 'qemu:///session']
|
||||
autoconnect=['qemu:///session']
|
||||
|
||||
# Show usage in the domain list
|
||||
[org.virt-manager.virt-manager.vmlist-fields]
|
||||
cpu-usage=false
|
||||
|
||||
# Settings related to statistics
|
||||
[org.virt-manager.virt-manager.stats]
|
||||
update-interval=3
|
||||
enable-disk-poll=true
|
||||
enable-memory-poll=true
|
||||
enable-net-poll=true
|
||||
|
||||
# Default behavior for the console
|
||||
[org.virt-manager.virt-manager.console]
|
||||
scaling=2
|
||||
resize-guest=1
|
||||
autoconnect=false
|
||||
|
||||
# Do not show toolbar
|
||||
[org.virt-manager.virt-manager.details]
|
||||
show-toolbar=false
|
||||
|
||||
# Modify default values for new VMs
|
||||
[org.virt-manager.virt-manager.new-vm]
|
||||
storage-format='raw'
|
||||
cpu-default='host-model'
|
||||
graphics-type='spice'
|
||||
|
||||
# Modify the default virt-manager behavior for confirmation dialogues
|
||||
[org.virt-manager.virt-manager.confirm]
|
||||
forcepoweroff=false
|
||||
removedev=false
|
||||
unapplied-dev=false
|
||||
|
||||
EOF
|
||||
|
||||
glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/
|
||||
|
||||
%end # End of the %post section
|
10
ingredients/base-fedora-repo-cdrom.cfg
Normal file
10
ingredients/base-fedora-repo-cdrom.cfg
Normal file
@ -0,0 +1,10 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file allows you to use the cdrom as a source for packages
|
||||
# Use the cdrom
|
||||
cdrom
|
12
ingredients/base-fedora-repo-rawhide.cfg
Normal file
12
ingredients/base-fedora-repo-rawhide.cfg
Normal file
@ -0,0 +1,12 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a the Fedora Rawhide official repositories
|
||||
|
||||
# Official Fedora rawhide repositories
|
||||
repo --name=rawhide --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
|
||||
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
|
13
ingredients/base-fedora-repo.cfg
Normal file
13
ingredients/base-fedora-repo.cfg
Normal file
@ -0,0 +1,13 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a the Fedora official repositories for free software
|
||||
|
||||
# Official Fedora repositories
|
||||
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora mirror
|
||||
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch # Official Fedora updates mirror
|
||||
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora updates mirror
|
15
ingredients/base-guest-agents.cfg
Normal file
15
ingredients/base-guest-agents.cfg
Normal file
@ -0,0 +1,15 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides guest-agents, which are useful for virtual machines
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Does not include weak dependencies.
|
||||
|
||||
qemu-guest-agent # "QEMU guest agent" The qemu-guest agent is unnecessary for a bare-metal system. However, it is included here to cover cases where this kickstart file is used to deploy a virtual machine
|
||||
spice-vdagent # "Agent for Spice guests" The spice agent is unnecessary for a bare-metal system. However, it is included here to cover cases where this kickstart file is used to deploy a virtual machine
|
||||
|
||||
%end # End of the packages section
|
16
ingredients/base-hypervisor-amdcpu.cfg
Normal file
16
ingredients/base-hypervisor-amdcpu.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file preloads the vfio-pci driver for devices that are binded to it, activates IOMMU and enables nested-virtualization for AMD (tm) CPUs
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-hypervisor-amdcpu.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
sed -i 's/\(quiet\)/\1 amd_iommu=on amd_iommu=pt rd.driver.pre=vfio-pci/i' /mnt/sysimage/etc/default/grub # Load kernel modules in GRUB.
|
||||
|
||||
echo "options kvm_amd nested=1" >> /mnt/sysimage/etc/modprobe.d/kvm.conf # Add support for nested-virtualization
|
||||
|
||||
%end # End of the %post section
|
16
ingredients/base-hypervisor-intelcpu.cfg
Normal file
16
ingredients/base-hypervisor-intelcpu.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file preloads the vfio-pci driver for devices that are binded to it, activates IOMMU and enables nested-virtualization for Intel(tm) CPUs
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-hypervisor-intelcpu.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
sed -i 's/\(quiet\)/\1 intel_iommu=on iommu=pt rd.driver.pre=vfio-pci/i' /mnt/sysimage/etc/default/grub # Load kernel modules in GRUB.
|
||||
|
||||
echo "options kvm_intel nested=1" >> /mnt/sysimage/etc/modprobe.d/kvm.conf # Add support for nested-virtualization
|
||||
|
||||
%end # End of the %post section
|
19
ingredients/base-hypervisor-intelgpu.cfg
Normal file
19
ingredients/base-hypervisor-intelgpu.cfg
Normal file
@ -0,0 +1,19 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file enables vfio-mdev and KVMGT for compatible Intel(tm) graphic cards, allowing a host to create virtual GPUs.
|
||||
# The fifth generation of Broadwell-based SoC are compatible, up to the ninth generation (Cannon Lake and Whiskey Lake). Tiger Lake and later SoC based on the new Xe GPU architecture are not compatible, as they use SR/IOV instead.
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-hypervisor-intelgpu.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installtion troubleshooting
|
||||
|
||||
sed -i 's/\(vfio-pci\)/\1 i915.enable_gvt=1/i' /mnt/sysimage/etc/default/grub # Load kernel modules in grub.
|
||||
|
||||
# Load extra kernel modules to enable vfio-mdev on selected hardware
|
||||
echo "kvmgt" > /mnt/sysimage/etc/modules-load.d/kvmgt.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm)
|
||||
echo "vfio-mdev" > /mnt/sysimage/etc/modules-load.d/vfio-mdev.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm)
|
||||
|
||||
%end # End of the %post section
|
47
ingredients/base-hypervisor.cfg
Normal file
47
ingredients/base-hypervisor.cfg
Normal file
@ -0,0 +1,47 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic, generic building block to build a virtualization host.
|
||||
|
||||
services --enabled="NetworkManager,libvirtd"
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Does not include weak dependencies.
|
||||
|
||||
qemu-kvm
|
||||
libvirt
|
||||
libvirt-daemon-config-network
|
||||
libvirt-daemon-kvm
|
||||
virt-install
|
||||
virt-top
|
||||
libguestfs-tools
|
||||
python3-libguestfs
|
||||
guestfs-tools # Complementary tools useful for interacting with vith guest systems
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-hypervisor.log # Beginning of %post section. Those commands are executed outside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd
|
||||
echo "vfio" > /mnt/sysimage/etc/modules-load.d/vfio.conf
|
||||
echo "vfio-pci" > /mnt/sysimage/etc/modules-load.d/vfio-pci.conf
|
||||
echo "vfio_iommu_type1" > /mnt/sysimage/etc/modules-load.d/vfio_iommu_type1.conf
|
||||
echo "vfio_virqfd" > /mnt/sysimage/etc/modules-load.d/vfio_virqfd.conf
|
||||
|
||||
mkdir /mnt/sysimage/var/lib/libvirt/iso # Create a directory to store iso images
|
||||
|
||||
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/iso/ # fetch netboot.xyz iso and store it to the newly created iso directory
|
||||
|
||||
# fetch custom script and make it executable
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/create-user-vms.sh -P /mnt/sysimage/usr/sbin/
|
||||
chmod +x /mnt/sysimage/usr/sbin/create-user-vms.sh
|
||||
|
||||
# fetch custom script and make it executable
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/virtualization-tweaks-root-needed.sh -P /mnt/sysimage/usr/sbin/
|
||||
chmod +x /mnt/sysimage/usr/sbin/virtualization-tweaks-root-needed.sh
|
||||
|
||||
%end # End of the %post section
|
||||
|
28
ingredients/base-initial-setup-gnome.cfg
Normal file
28
ingredients/base-initial-setup-gnome.cfg
Normal file
@ -0,0 +1,28 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides the basic plumbing for GNOME initial-setup to launch on the first system start-up.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
|
||||
|
||||
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --nochroot --log=/mnt/sysimage/opt/base-initial-setup-gnome.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
|
||||
|
||||
truncate -s 0 /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf # remove content of vendor.conf so that all options are made available
|
||||
|
||||
## Append lines to existing vendor.conf file, so that options are skipped upon reboot
|
||||
cat >> /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf<< EOF
|
||||
[pages]
|
||||
skip=privacy
|
||||
[goa]
|
||||
providers=local-first!
|
||||
EOF
|
||||
|
||||
%end # End of the %post section
|
16
ingredients/base-initial-setup.cfg
Normal file
16
ingredients/base-initial-setup.cfg
Normal file
@ -0,0 +1,16 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides the basic plumbing for initial-setup to launch on the first system start-up.
|
||||
|
||||
firstboot --enable --reconfig # Initial Setup will start after the first reboot
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
|
||||
|
||||
initial-setup # Install the initial setup package.
|
||||
|
||||
%end # End of the packages section
|
33
ingredients/base-live-hypervisor-a.cfg
Normal file
33
ingredients/base-live-hypervisor-a.cfg
Normal file
@ -0,0 +1,33 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file configures an hypervisor for AMD (tm) CPUs
|
||||
|
||||
%post --log=/root/bhla.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
sed -i 's/\(quiet\)/\1 amd_iommu=on amd_iommu=pt rd.driver.pre=vfio-pci/i' /etc/default/grub # Load kernel modules in GRUB.
|
||||
|
||||
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd
|
||||
echo "vfio" > /etc/modules-load.d/vfio.conf
|
||||
echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf
|
||||
echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf
|
||||
echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf
|
||||
|
||||
echo "options kvm_amd nested=1" >> /etc/modprobe.d/kvm.conf # Add support for nested-virtualization
|
||||
|
||||
# The following part seems useless
|
||||
# dracut --add-drivers " vfio vfio-pci vfio_iommu_type1 vfio_virqfd " --force # Instruct dracut to load the vfio drivers
|
||||
# dracut --force # Regenerate initramfs
|
||||
# Doesn't seem to work
|
||||
# dracut: Cannot find /usr/lib/dracut/dracut-init.sh.
|
||||
# dracut: Are you running from a git checkout?
|
||||
# dracut: Try passing -l as an argument to /usr/bin/dracut
|
||||
|
||||
# The following part seems useless too. No need to regenerate grub
|
||||
# grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub. Does it fail ? /usr/sbin/grub2-probe: error: failed to get canonical path of `LiveOS_rootfs'.
|
||||
|
||||
%end # End of the %post section
|
35
ingredients/base-live-hypervisor-ii.cfg
Normal file
35
ingredients/base-live-hypervisor-ii.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file configures an hypervisor for Intel(tm) CPUs and Intel(tm) graphic cards
|
||||
|
||||
%post --log=/root/blhi.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installtion troubleshooting
|
||||
|
||||
sed -i 's/\(quiet\)/\1 intel_iommu=on iommu=pt rd.driver.pre=vfio-pci i915.enable_gvt=1/i' /etc/default/grub # Load kernel modules in grub.
|
||||
|
||||
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd
|
||||
echo "vfio" > /etc/modules-load.d/vfio.conf
|
||||
echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf
|
||||
echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf
|
||||
echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf
|
||||
echo "kvmgt" > /etc/modules-load.d/kvmgt.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm)
|
||||
echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm)
|
||||
|
||||
echo "options kvm_intel nested=1" >> /etc/modprobe.d/kvm.conf # Add support for nested-virtualization
|
||||
|
||||
# The following part seems useless
|
||||
# dracut --add-drivers " vfio vfio-pci vfio_iommu_type1 vfio_virqfd vfio-mdev kvmgt " --force # Instruct dracut to load the vfio drivers
|
||||
# dracut --force # Regenerate initramfs
|
||||
# Doesn't seem to work
|
||||
# dracut: Cannot find /usr/lib/dracut/dracut-init.sh.
|
||||
# dracut: Are you running from a git checkout?
|
||||
# dracut: Try passing -l as an argument to /usr/bin/dracut
|
||||
|
||||
# The following part seems useless too. No need to regenerate grub
|
||||
# grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub. Does it fail ? /usr/sbin/grub2-probe: error: failed to get canonical path of `LiveOS_rootfs'.
|
||||
|
||||
%end # End of the %post sectionsud
|
67
ingredients/base-live-hypervisor.cfg
Normal file
67
ingredients/base-live-hypervisor.cfg
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic, generic building block to build a virtualization host.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Does not include weak dependencies.
|
||||
|
||||
qemu-kvm
|
||||
libvirt
|
||||
libvirt-daemon-config-network
|
||||
libvirt-daemon-kvm
|
||||
virt-install
|
||||
virt-top
|
||||
libguestfs-tools
|
||||
python3-libguestfs
|
||||
guestfs-tools # Complementary tools useful for interacting with vith guest systems
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --log=/root/bhl.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installation troubleshooting
|
||||
|
||||
mkdir /var/lib/libvirt/iso # Create a directory to store iso images
|
||||
|
||||
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/ # fetch netboot.xyz iso
|
||||
|
||||
# fetch custom script and make it executable
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/configure-vmm-and-desktop.sh -P /usr/sbin/
|
||||
chmod +x /usr/sbin/configure-vmm-and-desktop.sh
|
||||
|
||||
# fetch custom script and make it executable
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/create-live-vm.sh -P /usr/sbin/
|
||||
chmod +x /usr/sbin/create-live-vm.sh
|
||||
|
||||
# fetch custom script and make it executable
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/virtualization-tweaks-root-needed.sh -P /usr/sbin/
|
||||
chmod +x /usr/sbin/virtualization-tweaks-root-needed.sh
|
||||
|
||||
# # Create new file /etc/systemd/system/postinstall.service using cat:
|
||||
# cat > /etc/systemd/system/post-install.service<< EOF
|
||||
# [Unit]
|
||||
# Description=Post-installation configuration for Phyllome OS
|
||||
# After=gdm.service
|
||||
# Requires=gdm.service
|
||||
#
|
||||
# [Service]
|
||||
# Type=oneshot
|
||||
# ExecStart=/bin/bash /usr/sbin/post-install.sh
|
||||
# RemainAfterExit=yes
|
||||
#
|
||||
# [Install]
|
||||
# WantedBy=multi-user.target
|
||||
# EOF
|
||||
#
|
||||
# systemctl enable /etc/systemd/system/post-install.service # Enable systemd unit
|
||||
|
||||
# Add a network bridge. Still need to declare it to libvirt/virt-manager
|
||||
# nmcli con add ifname br0 type bridge con-name br0
|
||||
# nmcli con add type bridge-slave ifname enp1s0 master br0 # to-do : generalize this command so that it could regardless of the name of the ethernet device
|
||||
# nmcli con up br0
|
||||
|
||||
%end # End of the %post section
|
||||
|
434
ingredients/base-live.cfg
Normal file
434
ingredients/base-live.cfg
Normal file
@ -0,0 +1,434 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic block to build a minimal, live system
|
||||
|
||||
# text # Perform installation in text mode
|
||||
|
||||
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora mirror
|
||||
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch # Official Fedora updates mirror
|
||||
# #repo --name=updates-testing --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
|
||||
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch # Official Fedora updates mirror
|
||||
|
||||
keyboard --xlayouts='ch (fr)' # set keyboard layouts for Romandie # Unnecessary if using inital-setup
|
||||
lang en_US.UTF-8 # Set system language to American English # Unnecessary if using inital-setup
|
||||
timezone Europe/Paris --utc # Set System timezone to Paris # Unnecessary if using inital-setup
|
||||
# lang en_US.UTF-8
|
||||
# keyboard us
|
||||
# timezone US/Eastern
|
||||
|
||||
selinux --enforcing # Make sure SELinux is in enforced mode
|
||||
firewall --enabled --service=mdns
|
||||
# selinux --enforcing
|
||||
# firewall --enabled --service=mdns
|
||||
|
||||
# xconfig --startxonboot
|
||||
|
||||
zerombr
|
||||
clearpart --all
|
||||
part / --size 5120
|
||||
# bootloader --timeout=2
|
||||
|
||||
# services --enabled=NetworkManager --disabled=sshd
|
||||
# network --bootproto=dhcp --device=link --activate --hostname=phyllome
|
||||
#
|
||||
# rootpw --lock --iscrypted locked
|
||||
#
|
||||
# # shutdown
|
||||
|
||||
# zerombr
|
||||
# clearpart --all
|
||||
# part / --size 5120 --fstype ext4
|
||||
# services --enabled=NetworkManager,ModemManager --disabled=sshd
|
||||
network --bootproto=dhcp --device=link --activate
|
||||
rootpw --lock --iscrypted locked
|
||||
shutdown
|
||||
|
||||
#
|
||||
# %packages # Beginning of the packages section.
|
||||
#
|
||||
# # Explicitly specified here:
|
||||
# # <notting> walters: because otherwise dependency loops cause yum issues.
|
||||
# kernel
|
||||
# kernel-modules
|
||||
# kernel-modules-extra
|
||||
#
|
||||
# # This was added a while ago, I think it falls into the category of
|
||||
# # "Diagnosis/recovery tool useful from a Live OS image". Leaving this untouched
|
||||
# # for now.
|
||||
# #memtest86+
|
||||
# #@x86-baremetal-tools # memtest86+ is included
|
||||
#
|
||||
# # The point of a live image is to install
|
||||
# # anaconda
|
||||
# # anaconda-install-env-deps
|
||||
# # anaconda-live
|
||||
# # @anaconda-tools
|
||||
# # Anaconda has a weak dep on this and we don't want it on livecds, see
|
||||
# # https://fedoraproject.org/wiki/Changes/RemoveDeviceMapperMultipathFromWorkstationLiveCD
|
||||
# # -fcoe-utils
|
||||
# # -device-mapper-multipath
|
||||
#
|
||||
# # Need aajohan-comfortaa-fonts for the SVG rnotes images
|
||||
# # aajohan-comfortaa-fonts
|
||||
#
|
||||
# # Without this, initramfs generation during live image creation fails: #1242586
|
||||
# dracut-live
|
||||
# dracut-config-generic # add that as sugested here : https://www.brianlane.com/post/creating-live-isos-with-livemedia-creator/
|
||||
#
|
||||
# # For UEFI-boot, see https://github.com/weldr/lorax/blob/master/docs/fedora-livemedia.ks
|
||||
# shim
|
||||
# shim-ia32
|
||||
# grub2
|
||||
# grub2-efi
|
||||
# grub2-efi-*-cdboot
|
||||
# grub2-efi-ia32
|
||||
# efibootmgr
|
||||
#
|
||||
# # syslinux is in @x86-baremetal-tools
|
||||
#
|
||||
# # anaconda needs the locales available to run for different locales
|
||||
# glibc-all-langpacks
|
||||
#
|
||||
# # no longer in @core since 2018-10, but needed for livesys script
|
||||
# initscripts
|
||||
# chkconfig
|
||||
#
|
||||
# @core # minimal installation
|
||||
# pciutils # Pciutils provides lspci commandline tool and is not installed by default
|
||||
# # initial-setup # Install the initial setup package. For the GUI version, use initial-setup-gui instead.
|
||||
# qemu-guest-agent # "QEMU guest agent"
|
||||
# spice-vdagent # "Agent for Spice guests"
|
||||
# -fedora-logos # Fedora logos
|
||||
# -fedora-release # Fedora release-notes
|
||||
# -fedora-release-notes
|
||||
# -fedora-release-common # Fedora release files
|
||||
# -fedora-release-identity-basic # ???
|
||||
# fedora-remix-logos # Install Fedora remix logos
|
||||
# generic-release
|
||||
# generic-logos
|
||||
# generic-release-common # "Generic release files"
|
||||
# generic-release-notes # "Release Notes"
|
||||
|
||||
# %end # End of the packages section
|
||||
|
||||
%packages
|
||||
# Explicitly specified here:
|
||||
# <notting> walters: because otherwise dependency loops cause yum issues.
|
||||
kernel
|
||||
kernel-modules
|
||||
kernel-modules-extra
|
||||
|
||||
# This was added a while ago, I think it falls into the category of
|
||||
# "Diagnosis/recovery tool useful from a Live OS image". Leaving this untouched
|
||||
# for now.
|
||||
#memtest86+
|
||||
@x86-baremetal-tools # memtest86+ is included
|
||||
|
||||
# The point of a live image is to install
|
||||
anaconda
|
||||
anaconda-install-env-deps
|
||||
anaconda-live
|
||||
@anaconda-tools
|
||||
# Anaconda has a weak dep on this and we don't want it on livecds, see
|
||||
# https://fedoraproject.org/wiki/Changes/RemoveDeviceMapperMultipathFromWorkstationLiveCD
|
||||
-fcoe-utils
|
||||
-device-mapper-multipath
|
||||
|
||||
# Need aajohan-comfortaa-fonts for the SVG rnotes images
|
||||
aajohan-comfortaa-fonts
|
||||
|
||||
# Without this, initramfs generation during live image creation fails: #1242586
|
||||
dracut-live
|
||||
# syslinux is in @x86-baremetal-tools
|
||||
|
||||
# anaconda needs the locales available to run for different locales
|
||||
glibc-all-langpacks
|
||||
|
||||
# no longer in @core since 2018-10, but needed for livesys script
|
||||
initscripts
|
||||
chkconfig
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --log=/root/bl.log # Beginning of the post-installation section. Add logging.
|
||||
|
||||
# FIXME: it'd be better to get this installed from a package
|
||||
cat > /etc/rc.d/init.d/livesys << EOF
|
||||
#!/bin/bash
|
||||
#
|
||||
# live: Init script for live image
|
||||
#
|
||||
# chkconfig: 345 00 99
|
||||
# description: Init script for live image.
|
||||
### BEGIN INIT INFO
|
||||
# X-Start-Before: display-manager chronyd
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/init.d/functions
|
||||
|
||||
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -e /.liveimg-configured ] ; then
|
||||
configdone=1
|
||||
fi
|
||||
|
||||
exists() {
|
||||
which \$1 >/dev/null 2>&1 || return
|
||||
\$*
|
||||
}
|
||||
|
||||
livedir="LiveOS"
|
||||
for arg in \`cat /proc/cmdline\` ; do
|
||||
if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
|
||||
livedir=\${arg##rd.live.dir=}
|
||||
continue
|
||||
fi
|
||||
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
|
||||
livedir=\${arg##live_dir=}
|
||||
fi
|
||||
done
|
||||
|
||||
# enable swapfile if it exists
|
||||
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
|
||||
action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
|
||||
fi
|
||||
|
||||
mountPersistentHome() {
|
||||
# support label/uuid
|
||||
if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
|
||||
homedev=\`/sbin/blkid -o device -t "\$homedev"\`
|
||||
fi
|
||||
|
||||
# if we're given a file rather than a blockdev, loopback it
|
||||
if [ "\${homedev##mtd}" != "\${homedev}" ]; then
|
||||
# mtd devs don't have a block device but get magic-mounted with -t jffs2
|
||||
mountopts="-t jffs2"
|
||||
elif [ ! -b "\$homedev" ]; then
|
||||
loopdev=\`losetup -f\`
|
||||
if [ "\${homedev##/run/initramfs/live}" != "\${homedev}" ]; then
|
||||
action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live
|
||||
fi
|
||||
losetup \$loopdev \$homedev
|
||||
homedev=\$loopdev
|
||||
fi
|
||||
|
||||
# if it's encrypted, we need to unlock it
|
||||
if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
|
||||
echo
|
||||
echo "Setting up encrypted /home device"
|
||||
plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
|
||||
homedev=/dev/mapper/EncHome
|
||||
fi
|
||||
|
||||
# and finally do the mount
|
||||
mount \$mountopts \$homedev /home
|
||||
# if we have /home under what's passed for persistent home, then
|
||||
# we should make that the real /home. useful for mtd device on olpc
|
||||
if [ -d /home/home ]; then mount --bind /home/home /home ; fi
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon /home
|
||||
if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
|
||||
}
|
||||
|
||||
findPersistentHome() {
|
||||
for arg in \`cat /proc/cmdline\` ; do
|
||||
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
|
||||
homedev=\${arg##persistenthome=}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
|
||||
findPersistentHome
|
||||
elif [ -e /run/initramfs/live/\${livedir}/home.img ]; then
|
||||
homedev=/run/initramfs/live/\${livedir}/home.img
|
||||
fi
|
||||
|
||||
# if we have a persistent /home, then we want to go ahead and mount it
|
||||
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
|
||||
action "Mounting persistent /home" mountPersistentHome
|
||||
fi
|
||||
|
||||
if [ -n "\$configdone" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# add liveuser user with no passwd
|
||||
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
||||
passwd -d liveuser > /dev/null
|
||||
usermod -aG wheel liveuser > /dev/null
|
||||
|
||||
# Remove root password lock
|
||||
passwd -d root > /dev/null
|
||||
|
||||
# turn off firstboot for livecd boots
|
||||
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
|
||||
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
|
||||
systemctl stop firstboot-text.service 2> /dev/null || :
|
||||
systemctl stop firstboot-graphical.service 2> /dev/null || :
|
||||
|
||||
# don't use prelink on a running live image
|
||||
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
|
||||
|
||||
# turn off mdmonitor by default
|
||||
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
|
||||
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
|
||||
systemctl stop mdmonitor.service 2> /dev/null || :
|
||||
systemctl stop mdmonitor-takeover.service 2> /dev/null || :
|
||||
|
||||
# don't start cron/at as they tend to spawn things which are
|
||||
# disk intensive that are painful on a live image
|
||||
systemctl --no-reload disable crond.service 2> /dev/null || :
|
||||
systemctl --no-reload disable atd.service 2> /dev/null || :
|
||||
systemctl stop crond.service 2> /dev/null || :
|
||||
systemctl stop atd.service 2> /dev/null || :
|
||||
|
||||
# turn off abrtd on a live image
|
||||
systemctl --no-reload disable abrtd.service 2> /dev/null || :
|
||||
systemctl stop abrtd.service 2> /dev/null || :
|
||||
|
||||
# Don't sync the system clock when running live (RHBZ #1018162)
|
||||
sed -i 's/rtcsync//' /etc/chrony.conf
|
||||
|
||||
# Mark things as configured
|
||||
touch /.liveimg-configured
|
||||
|
||||
# add static hostname to work around xauth bug
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
|
||||
# the hostname must be something else than 'localhost'
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1370222
|
||||
hostnamectl set-hostname "localhost-live"
|
||||
|
||||
EOF
|
||||
|
||||
# bah, hal starts way too late
|
||||
cat > /etc/rc.d/init.d/livesys-late << EOF
|
||||
#!/bin/bash
|
||||
#
|
||||
# live: Late init script for live image
|
||||
#
|
||||
# chkconfig: 345 99 01
|
||||
# description: Late init script for live image.
|
||||
|
||||
. /etc/init.d/functions
|
||||
|
||||
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exists() {
|
||||
which \$1 >/dev/null 2>&1 || return
|
||||
\$*
|
||||
}
|
||||
|
||||
touch /.liveimg-late-configured
|
||||
|
||||
# read some variables out of /proc/cmdline
|
||||
for o in \`cat /proc/cmdline\` ; do
|
||||
case \$o in
|
||||
ks=*)
|
||||
ks="--kickstart=\${o#ks=}"
|
||||
;;
|
||||
xdriver=*)
|
||||
xdriver="\${o#xdriver=}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# if liveinst or textinst is given, start anaconda
|
||||
if strstr "\`cat /proc/cmdline\`" liveinst ; then
|
||||
plymouth --quit
|
||||
/usr/sbin/liveinst \$ks
|
||||
fi
|
||||
if strstr "\`cat /proc/cmdline\`" textinst ; then
|
||||
plymouth --quit
|
||||
/usr/sbin/liveinst --text \$ks
|
||||
fi
|
||||
|
||||
# configure X, allowing user to override xdriver
|
||||
if [ -n "\$xdriver" ]; then
|
||||
cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
|
||||
Section "Device"
|
||||
Identifier "Videocard0"
|
||||
Driver "\$xdriver"
|
||||
EndSection
|
||||
FOE
|
||||
fi
|
||||
|
||||
EOF
|
||||
|
||||
chmod 755 /etc/rc.d/init.d/livesys
|
||||
/sbin/restorecon /etc/rc.d/init.d/livesys
|
||||
/sbin/chkconfig --add livesys
|
||||
|
||||
chmod 755 /etc/rc.d/init.d/livesys-late
|
||||
/sbin/restorecon /etc/rc.d/init.d/livesys-late
|
||||
/sbin/chkconfig --add livesys-late
|
||||
|
||||
# enable tmpfs for /tmp
|
||||
systemctl enable tmp.mount
|
||||
|
||||
# make it so that we don't do writing to the overlay for things which
|
||||
# are just tmpdirs/caches
|
||||
# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475
|
||||
cat >> /etc/fstab << EOF
|
||||
vartmp /var/tmp tmpfs defaults 0 0
|
||||
EOF
|
||||
|
||||
# work around for poor key import UI in PackageKit
|
||||
rm -f /var/lib/rpm/__db*
|
||||
echo "Packages within this LiveCD"
|
||||
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
||||
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
# go ahead and pre-make the man -k cache (#455968)
|
||||
/usr/bin/mandb
|
||||
|
||||
# make sure there aren't core files lying around
|
||||
rm -f /core*
|
||||
|
||||
# remove random seed, the newly installed instance should make it's own
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
# convince readahead not to collect
|
||||
# FIXME: for systemd
|
||||
|
||||
echo 'File created by kickstart. See systemd-update-done.service(8).' \
|
||||
| tee /etc/.updated >/var/.updated
|
||||
|
||||
# Drop the rescue kernel and initramfs, we don't need them on the live media itself.
|
||||
# See bug 1317709
|
||||
rm -f /boot/*-rescue*
|
||||
|
||||
# Disable network service here, as doing it in the services line
|
||||
# fails due to RHBZ #1369794
|
||||
/sbin/chkconfig network off
|
||||
|
||||
# Remove machine-id on pre generated images
|
||||
rm -f /etc/machine-id
|
||||
touch /etc/machine-id
|
||||
|
||||
%end
|
||||
|
||||
|
||||
%post --nochroot
|
||||
# For livecd-creator builds only (lorax/livemedia-creator handles this directly)
|
||||
if [ -n "$LIVE_ROOT" ]; then
|
||||
cp "$INSTALL_ROOT"/usr/share/licenses/*-release-common/* "$LIVE_ROOT/"
|
||||
|
||||
# only installed on x86, x86_64
|
||||
if [ -f /usr/bin/livecd-iso-to-disk ]; then
|
||||
mkdir -p "$LIVE_ROOT/LiveOS"
|
||||
cp /usr/bin/livecd-iso-to-disk "$LIVE_ROOT/LiveOS"
|
||||
fi
|
||||
fi
|
||||
|
||||
%end
|
||||
|
88
ingredients/base-nano.cfg
Normal file
88
ingredients/base-nano.cfg
Normal file
@ -0,0 +1,88 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file intends to provide a basic block smaller than the minimal operating system.
|
||||
|
||||
text # Perform installation in text mode
|
||||
|
||||
keyboard --xlayouts='ch (fr)' # set keyboard layouts for Romandie
|
||||
lang en_US.UTF-8 # Set system language to American English. More languages could be supported: --addsupport=cs_CZ,de_DE,en_UK
|
||||
timezone Europe/Paris --utc # Set system timezone to Paris
|
||||
|
||||
rootpw --lock --iscrypted locked # Lock the root account
|
||||
|
||||
selinux --enforcing # Make sure SELinux is in enforced mode
|
||||
firewall --enabled --service=mdns # Make sure the firewall is enabled
|
||||
services --enabled=NetworkManager --disabled=sshd
|
||||
network --onboot=yes --bootproto=dhcp --device=link --activate --hostname=phyllome-alpha # Configure network interfaces and set hostname. "link" selects the first device reaching an up state
|
||||
|
||||
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
clearpart --all --initlabel # Partition clearing information. This setup uses GPT by default.
|
||||
|
||||
%packages --excludedocs --nocore --exclude-weakdeps
|
||||
|
||||
kernel # The Linux kernel
|
||||
bash # "The GNU Bourne Again shell"
|
||||
filesystem # "The basic directory layout for a Linux system"
|
||||
rpm # "The RPM package management system"
|
||||
dnf # "Package manager"
|
||||
util-linux #
|
||||
coreutils # Core GNU utilities
|
||||
systemd # System and Service Manager
|
||||
glibc-minimal-langpack # "Minimal language packs for glibc"
|
||||
glibc
|
||||
efibootmgr # "EFI Boot Manager"
|
||||
pciutils # Pciutils provides lspci commandline tool and is not installed by default
|
||||
audit
|
||||
basesystem
|
||||
curl
|
||||
dhcp-client
|
||||
e2fsprogs
|
||||
hostname
|
||||
iproute
|
||||
iputils
|
||||
kbd
|
||||
less
|
||||
man-db
|
||||
ncurses
|
||||
parted
|
||||
passwd
|
||||
policycoreutils
|
||||
procps-ng
|
||||
rootfiles
|
||||
selinux-policy-targeted
|
||||
setup
|
||||
shadow-utils
|
||||
sudo
|
||||
vim-minimal
|
||||
yum
|
||||
NetworkManager
|
||||
dnf-plugins-core
|
||||
dracut-config-rescue
|
||||
fedora-repos-modular
|
||||
firewalld
|
||||
plymouth
|
||||
systemd-oomd-defaults
|
||||
systemd-resolved
|
||||
zram-generator-defaults
|
||||
-fedora-release # Fedora release-notes
|
||||
-fedora-release-common # Fedora release files
|
||||
-fedora-release-identity-basic # ???
|
||||
fedora-remix-logos # Install Fedora remix logos
|
||||
generic-release # "Generic release files"
|
||||
generic-release-common # "Generic release files"
|
||||
generic-release-notes # "Release Notes"
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --log=/root/bnd.log # Beginning of the post-installation section. Add logging.
|
||||
|
||||
localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked.
|
||||
dnf update -y # Update the system
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub otherwise the system won't boot properly
|
||||
|
||||
%end # End of the %post section
|
12
ingredients/base-storage-encrypted.cfg
Normal file
12
ingredients/base-storage-encrypted.cfg
Normal file
@ -0,0 +1,12 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic EXT4 layout for EFI-based systems, with full-disk encryption. User input is necessary during deployment, as there is no hardcoded password.
|
||||
|
||||
part /boot/efi --fstype="efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi # Will create an efi partitition of 128 MiB (vda1)
|
||||
part /boot --fstype="ext4" --size=384 --label=boot # Create a boot partition of 384 MiB using the ext4 filesystem (vda2).
|
||||
part / --fstype="ext4" --grow --label=root --encrypted --luks-version=luks2 # The remaining space will be used for an encrypted root (vda3).
|
12
ingredients/base-storage.cfg
Normal file
12
ingredients/base-storage.cfg
Normal file
@ -0,0 +1,12 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a basic EXT4 layout for EFI-based systems, without encryption.
|
||||
|
||||
part /boot/efi --fstype="efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi # Will create an efi partitition of 128 MiB (vda1)
|
||||
part /boot --fstype="ext4" --size=384 --label=boot # Create a boot partition of 384 MiB using the ext4 filesystem (vda2).
|
||||
part / --fstype="ext4" --grow --label=root # The remaining space will be used for root (vda3).
|
54
ingredients/base.cfg
Normal file
54
ingredients/base.cfg
Normal file
@ -0,0 +1,54 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
#
|
||||
# What ? This kickstart file provides a basic block to build a minimal operating system.
|
||||
|
||||
text # Perform installation in text mode
|
||||
|
||||
keyboard --xlayouts='ch (fr)' # set keyboard layouts for Romandie
|
||||
lang en_US.UTF-8 # Set system language to American English. More languages could be supported: --addsupport=cs_CZ,de_DE,en_UK
|
||||
timezone Europe/Paris --utc # Set system timezone to Paris
|
||||
|
||||
rootpw --lock --iscrypted locked # Lock the root account
|
||||
|
||||
selinux --enforcing # Make sure SELinux is in enforced mode
|
||||
firewall --enabled --service=mdns # Make sure the firewall is enabled
|
||||
services --enabled=NetworkManager --disabled=sshd
|
||||
network --onboot=yes --bootproto=dhcp --device=link --activate --hostname=phyllome-alpha # Configure network interfaces and set hostname. "link" selects the first device reaching an up state
|
||||
|
||||
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
clearpart --all --initlabel # Partition clearing information. This setup uses GPT by default.
|
||||
bootloader --timeout=1 # Set the GNU GRUB bootloader timeout to 1.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the package section. Does not include weak dependencies.
|
||||
|
||||
@core # minimal installation
|
||||
@hardware-support # Provides extended hardware support, and especially extra wireless drivers
|
||||
pciutils # Pciutils provides lspci commandline tool, which is not installed by default
|
||||
wget # "The non-interactive network downloader. " Used to fetch files during installation
|
||||
neofetch # a simple tool to show hardware-related informations inside a terminal
|
||||
nano # The nano text editor
|
||||
-fedora-logos # Remove Fedora logos to comply with [Fedora Remix legal guidelines](https://fedoraproject.org/wiki/Remix)
|
||||
-fedora-release # Remove Fedora release-notes
|
||||
-fedora-release-notes # Remove Fedora release-notes
|
||||
-fedora-release-common # Remove Fedora release files
|
||||
-fedora-release-identity-basic # ???
|
||||
fedora-remix-logos # Add Fedora Remix logos
|
||||
generic-release # Add Fedora Remix logos
|
||||
generic-logos # Add Fedora Remix logos
|
||||
generic-release-common # "Generic release files"
|
||||
generic-release-notes # "Release Notes"
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --log=/opt/base.log # Beginning of the post-installation section. Add logging.
|
||||
|
||||
localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked.
|
||||
dnf update -y # Update the system
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Unsure it is actually useful
|
||||
|
||||
%end # End of the %post section
|
57
ingredients/dev-base.cfg
Normal file
57
ingredients/dev-base.cfg
Normal file
@ -0,0 +1,57 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
#
|
||||
# FOR DEVELOPMENT ONLY!
|
||||
#
|
||||
# What ? This kickstart file provides a basic block to build a minimal operating system for development.
|
||||
# Password is hardcoded!
|
||||
|
||||
text # Perform installation in text mode
|
||||
|
||||
keyboard --xlayouts='ch (fr)' # set keyboard layouts for Romandie
|
||||
lang en_US.UTF-8 # Set system language to American English. More languages could be supported: --addsupport=cs_CZ,de_DE,en_UK
|
||||
timezone Europe/Paris --utc # Set system timezone to Paris
|
||||
|
||||
rootpw --plaintext carpediem # set root password to 'carpediem'
|
||||
|
||||
selinux --disabled # Make sure SELinux is disabled
|
||||
firewall --disabled --service=mdns # Make sure the firewall is disabled
|
||||
services --enabled=NetworkManager --disabled=sshd
|
||||
network --onboot=yes --bootproto=dhcp --device=link --activate --hostname=phyllome-alpha # Configure network interfaces and set hostname. "link" selects the first device reaching an up state
|
||||
|
||||
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
clearpart --all --initlabel # Partition clearing information. This setup uses GPT by default.
|
||||
bootloader --timeout=1 # Set the GNU GRUB bootloader timeout to 1.
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the package section. Does not include weak dependencies.
|
||||
|
||||
@core # minimal installation
|
||||
@hardware-support # Provides extended hardware support, and especially extra wireless drivers
|
||||
pciutils # Pciutils provides lspci commandline tool, which is not installed by default
|
||||
wget # "The non-interactive network downloader. " Used to fetch files during installation
|
||||
neofetch # a simple tool to show hardware-related informations inside a terminal
|
||||
nano # The nano text editor
|
||||
-fedora-logos # Remove Fedora logos to comply with [Fedora Remix legal guidelines](https://fedoraproject.org/wiki/Remix)
|
||||
-fedora-release # Remove Fedora release-notes
|
||||
-fedora-release-notes # Remove Fedora release-notes
|
||||
-fedora-release-common # Remove Fedora release files
|
||||
-fedora-release-identity-basic # ???
|
||||
fedora-remix-logos # Add Fedora Remix logos
|
||||
generic-release # Add Fedora Remix logos
|
||||
generic-logos # Add Fedora Remix logos
|
||||
generic-release-common # "Generic release files"
|
||||
generic-release-notes # "Release Notes"
|
||||
|
||||
%end # End of the packages section
|
||||
|
||||
%post --log=/root/b.log # Beginning of the post-installation section. Add logging.
|
||||
|
||||
localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked.
|
||||
dnf update -y # Update the system
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Unsure it is actually useful
|
||||
|
||||
%end # End of the %post section
|
Reference in New Issue
Block a user