mirror of
https://github.com/PhyllomeOS/phyllomeos.git
synced 2024-12-22 13:05:17 +00:00
add basic building files, for the the minimal system, the desktop, the hypervisor, etc
This commit is contained in:
parent
cf830035cd
commit
344101cfc3
17
leaves/bamd.cfg
Normal file
17
leaves/bamd.cfg
Normal file
@ -0,0 +1,17 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file further configures an hypervisor for AMD (tm) CPUs
|
||||
# 'b' for basic building block, 'a' for amd, 'm' for minimal, 'd' for development only.
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
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.
|
||||
dracut --force # Regenerate initramfs
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub
|
||||
|
||||
%end # End of the %post section
|
26
leaves/bdmd.cfg
Normal file
26
leaves/bdmd.cfg
Normal file
@ -0,0 +1,26 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file is a base for a minimal GNOME-based desktop-oriented machine.
|
||||
# 'b' for basic building block, 'd' for desktop, 'm' for minimal, 'd' for development only.
|
||||
|
||||
# xconfig --startxonboot --defaultdesktop=GNOME # Start GNOME on boot. Althought it says X, it works as well with Wayland
|
||||
# firstboot --enable --reconfig # Initial Setup will start after the first reboot
|
||||
|
||||
%packages --excludedocs # Beginning of the post-installation section
|
||||
|
||||
dejavu-sans-mono-fonts # the gnome-shell package doesn't include much fonts by default, resulting in weird spacings in the gnome-terminal.
|
||||
elementary-wallpapers-gnome.noarch # Gorgeous wallpapers
|
||||
wpa_supplicant # WPA Supplicant for Linux. Not integrated by default in gnome-shell, but necessary to configure wireless networks through the Network Manager.
|
||||
# initial-setup-gui # Wasn't able to make it working.
|
||||
# gnome-initial-setup # Add GNOME initial setup too. Does work.
|
||||
gnome-shell
|
||||
gnome-terminal
|
||||
-gnome-tour # We don't want GNOME-tour to open at launch so we delete it
|
||||
nano # Minimal GNOME shell or desktop environment plus the nano text editor
|
||||
|
||||
%end
|
46
leaves/bhmd.cfg
Normal file
46
leaves/bhmd.cfg
Normal file
@ -0,0 +1,46 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides the base configuration for a hypervisor.
|
||||
# 'b' for basic building block, 'h' for hypervisor', 'm' for minimal, 'd' for development only.
|
||||
|
||||
%packages
|
||||
|
||||
qemu-kvm
|
||||
libvirt
|
||||
libvirt-daemon-config-network
|
||||
libvirt-daemon-kvm # Install minimal tools dedicated to virtualization.
|
||||
virt-install
|
||||
virt-top
|
||||
libguestfs-tools
|
||||
python3-libguestfs
|
||||
guestfs-tools # Complementary tools useful for interacting with vith guest systems
|
||||
|
||||
%end
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
# 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
|
||||
|
||||
dracut --add-drivers " vfio vfio-pci vfio_iommu_type1 vfio_virqfd " --force # Instruct dracut to load the vfio drivers:
|
||||
mkdir /var/lib/libvirt/iso # Create a directory to store iso images
|
||||
# chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory
|
||||
virsh pool-create-as --name iso --type dir --target /var/lib/libvirt/iso # Make libvirt aware of this new directory by creating a so-called `poo>
|
||||
# mkdir /var/lib/libvirt/rom # Create a directory to store rom files
|
||||
# chown liveuser:liveuser /var/lib/libvirt/rom # Make the user "test" its owner
|
||||
# virsh pool-create-as --name rom --type dir --target /var/lib/libvirt/rom # Make libvirt aware of this new directory by creating a so-called `p>
|
||||
# chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory
|
||||
|
||||
nmcli con add ifname br0 type bridge con-name br0 # Add a network bridge
|
||||
nmcli con add type bridge-slave ifname enp1s0 master br0
|
||||
nmcli con up br0
|
||||
|
||||
%end # End of the %post section
|
21
leaves/bimd.cfg
Normal file
21
leaves/bimd.cfg
Normal file
@ -0,0 +1,21 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file further configures an hypervisor for Intel(tm) CPUs and Intel(tm) Graphics.
|
||||
# 'b' for basic building block, 'h' for hypervisor', 'i' for intel, 'm' for minimal, 'd' for development only.
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
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.
|
||||
echo "kvmgt" > /etc/modules-load.d/kvmgt.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel GVT-g and Nvidia
|
||||
echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel GVT-g and Nvidia
|
||||
|
||||
dracut --add-drivers "vfio-mdev kvmgt" --force # Instruct dracut to load the vfio drivers:
|
||||
dracut --force # Regenerate initramfs
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub
|
||||
|
||||
%end # End of the %post section
|
370
leaves/blmd.cfg
Normal file
370
leaves/blmd.cfg
Normal file
@ -0,0 +1,370 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file provides a base for a minimal live machine based on Fedora 34.
|
||||
# 'b' for basic building block, 'l' for live, 'm' for minimal, 'd' for development only.
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
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
|
||||
|
||||
selinux --enforcing
|
||||
firewall --enabled --service=mdns
|
||||
xconfig --startxonboot
|
||||
|
||||
zerombr
|
||||
clearpart --all
|
||||
part / --grow --fstype ext4 # change here
|
||||
bootloader --timeout=1
|
||||
|
||||
services --enabled=NetworkManager,ModemManager --disabled=sshd
|
||||
network --bootproto=dhcp --device=link --activate
|
||||
|
||||
rootpw --lock --iscrypted locked
|
||||
|
||||
shutdown
|
||||
|
||||
%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
|
||||
|
||||
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
|
||||
|
||||
%post
|
||||
# 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
|
79
leaves/bmd.cfg
Normal file
79
leaves/bmd.cfg
Normal file
@ -0,0 +1,79 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
#
|
||||
# What ? This kickstart file provides a base system based on Fedora 34 server.
|
||||
# 'b' for basic building block, 'm' for minimal, 'd' for development only.
|
||||
|
||||
# Know bug: Cannot resolve host name
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
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
|
||||
|
||||
# Set dummy encrypted root password and activate the root account
|
||||
rootpw --iscrypted $6$2rA58L/SQu5.xMTb$u8.zqBWE5bK1/N983qDpJEp41yg66GwQ3YVTpsRghVhNiZypWyo2Zq2Qwr2tCM3bt50mKMIgHzbPdtSq9ErPz.
|
||||
# rootpw --lock --iscrypted locked # Lock the root account
|
||||
|
||||
# Create "test" user account # Unnecessary if using inital-setup
|
||||
user --name=test --password=$6$wlB.n8fvumAXv3xn$clVIswjLUjb7MZoJ2JHi1zk1zmx5ViQuzbVkLYf70SDan5hdqI0tUkc89nHE8pVnHStO4mcl3c1Tk0WJvCet1. --iscrypted --gecos="test"
|
||||
|
||||
firewall --enabled # Make sure the firewall is enabled
|
||||
services --enabled=NetworkManager --disabled=sshd
|
||||
network --onboot=yes --bootproto=dhcp --device=link --activate --hostname=phyllome # Configure network interfaces and set hostname
|
||||
|
||||
# ignoredisk --only-use=vda # Only use disk labelled as vda
|
||||
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
clearpart --all --initlabel # --drives=vda # Partition clearing information. This setup uses GPT by default.
|
||||
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).
|
||||
bootloader --timeout=1 # Set the Grub bootloader timeout to 1
|
||||
|
||||
reboot --kexec # Reboot straight inot the system after a successfull installation
|
||||
# firstboot --enable # Initial Setup will start after the first reboot
|
||||
|
||||
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
|
||||
|
||||
@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
|
||||
|
||||
%post # Beginning of the post-installation section
|
||||
|
||||
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
|
||||
|
||||
# In the %post section of the kickstart file, add the following as the first line:
|
||||
# See : https://www.opensourceforu.com/2010/01/roll-out-a-fedora-remix/
|
||||
sed -i -e 's/Generic release/LFY Fedora Remix/g' /etc/fedora-release /etc/issue
|
||||
|
||||
%end # End of the %post section
|
94
leaves/bnd.cfg
Normal file
94
leaves/bnd.cfg
Normal file
@ -0,0 +1,94 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# What ? This kickstart file bootstraps a nano machine based on Fedora 34 server.
|
||||
# It tries to go beyond what the minimal machine offers.
|
||||
# 'b' for basic building block, 'n' for nano, 'd' for development only.
|
||||
|
||||
# known issue : name resolution doesn't work as of now
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents.
|
||||
# Bye bye
|
||||
|
||||
text # Perform installation in text mode
|
||||
|
||||
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
|
||||
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
|
||||
# #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
|
||||
|
||||
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
|
||||
|
||||
# Set dummy encrypted root password and activate the root account
|
||||
rootpw --iscrypted $6$2rA58L/SQu5.xMTb$u8.zqBWE5bK1/N983qDpJEp41yg66GwQ3YVTpsRghVhNiZypWyo2Zq2Qwr2tCM3bt50mKMIgHzbPdtSq9ErPz.
|
||||
# Create "test" user account # Unnecessary if using inital-setup
|
||||
user --name=test --password=$6$wlB.n8fvumAXv3xn$clVIswjLUjb7MZoJ2JHi1zk1zmx5ViQuzbVkLYf70SDan5hdqI0tUkc89nHE8pVnHStO4mcl3c1Tk0WJvCet1. --iscrypted --gecos="test"
|
||||
|
||||
firewall --enabled # Make sure the firewall is enabled
|
||||
services --enabled=NetworkManager --disabled=sshd
|
||||
network --bootproto=dhcp --device=link --activate --onboot=on
|
||||
|
||||
zerombr # WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
clearpart --all --initlabel # Partition clearing information. This setup uses GPT by default.
|
||||
part /boot/efi --fstype="efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi # Will create an efi partitition of 128 MiB
|
||||
part /boot --fstype="ext4" --size=384 --label=boot # Create a boot partition of 384 MiB using the ext4 filesystem.
|
||||
part / --fstype="ext4" --grow --label=root # The remaining space will be used for root.
|
||||
bootloader --timeout=1 # Set the Grub bootloader timeout to 1
|
||||
|
||||
reboot --kexec # Reboot the system after the installation is successfully completed
|
||||
# firstboot --enable --reconfig # Initial Setup will start after the first reboot
|
||||
|
||||
%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"
|
||||
grubby # "Command line tool for updating bootloader configs"
|
||||
grub2-efi-x64 # "GRUB for EFI systems"
|
||||
qemu-guest-agent # "QEMU guest agent"
|
||||
spice-vdagent # "Agent for Spice guests"
|
||||
pciutils # Pciutils provides lspci commandline tool and is not installed by default
|
||||
@networkmanager-submodules
|
||||
-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 # Beginning of the post-installation section
|
||||
|
||||
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
|
||||
|
||||
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
||||
# remove random seed, the newly installed instance should make it's own
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user