2021-08-18 09:51:42 +00:00
|
|
|
# __ ____ ____ _____
|
|
|
|
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
|
|
|
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
|
|
|
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
|
|
|
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
|
|
|
# /_/ /____/
|
|
|
|
|
2021-08-18 13:01:51 +00:00
|
|
|
# What ? This kickstart file bootstraps a live desktop machine.
|
2021-11-04 12:09:12 +00:00
|
|
|
# 'l' for live, 'd' for desktop
|
2021-08-18 09:51:42 +00:00
|
|
|
|
2021-08-18 18:10:10 +00:00
|
|
|
# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one.
|
|
|
|
# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora :
|
2021-11-04 12:09:12 +00:00
|
|
|
# ksflatten -c ld.cfg -o ../flat/flat-ld.cfg
|
2021-11-10 08:45:28 +00:00
|
|
|
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
|
2021-08-18 18:10:10 +00:00
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
# Instructions for livecd-creator (about to be deprecated)
|
2021-08-19 10:07:22 +00:00
|
|
|
# An ISO file can be created using the following command as *root*:
|
2021-11-10 08:45:28 +00:00
|
|
|
# livecd-creator -c ../flat/flat-ld.cfg --fslabel=ld
|
2021-08-19 10:07:22 +00:00
|
|
|
# livecd-creator is part of the livecd-tools package
|
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
# Instructions for livemedia-creator
|
|
|
|
# An ISO file can be created using the following command as *root*:
|
|
|
|
# livemedia-creator --make-iso --ks flat-ld.cfg --no-virt --iso-only --iso-name phyllome-live-d-x86_64.iso --releasever 35
|
|
|
|
|
|
|
|
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
|
|
|
|
# UEFI test:
|
|
|
|
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-live-d-x86_64.iso
|
|
|
|
# BIOS test:
|
|
|
|
# qemu-kvm -m 2048 -vga qxl phyllome-live-d-x86_64.iso
|
2021-08-19 10:07:22 +00:00
|
|
|
|
2021-11-04 12:09:12 +00:00
|
|
|
%include bl.cfg # A base for a minimal live machine
|
|
|
|
%include bd.cfg # A base for a desktop environment
|
2021-08-18 09:51:42 +00:00
|
|
|
|
2021-11-04 12:09:12 +00:00
|
|
|
%post --log=/root/ld.log # Beginning of %post section. The following commands are executed inside a chroot environment. Add logging
|
2021-08-18 09:51:42 +00:00
|
|
|
|
|
|
|
cat >> /etc/rc.d/init.d/livesys << EOF
|
|
|
|
|
2021-08-18 16:22:10 +00:00
|
|
|
# disable gnome-software automatically downloading updates
|
2021-11-10 08:45:28 +00:00
|
|
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override << FOE
|
|
|
|
[org.gnome.software]
|
|
|
|
download-updates=false
|
|
|
|
FOE
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# don't autostart gnome-software session service
|
2021-11-10 08:45:28 +00:00
|
|
|
rm -f /etc/xdg/autostart/gnome-software-service.desktop
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# disable the gnome-software shell search provider
|
2021-11-10 08:45:28 +00:00
|
|
|
cat >> /usr/share/gnome-shell/search-providers/org.gnome.Software-search-provider.ini << FOE
|
|
|
|
DefaultDisabled=true
|
|
|
|
FOE
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# don't run gnome-initial-setup
|
|
|
|
mkdir ~liveuser/.config
|
|
|
|
touch ~liveuser/.config/gnome-initial-setup-done
|
|
|
|
|
|
|
|
# suppress anaconda spokes redundant with gnome-initial-setup
|
2021-11-10 08:45:28 +00:00
|
|
|
cat >> /etc/sysconfig/anaconda << FOE
|
|
|
|
[NetworkSpoke]
|
|
|
|
visited=1
|
2021-08-18 16:22:10 +00:00
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
[PasswordSpoke]
|
|
|
|
visited=1
|
2021-08-18 16:22:10 +00:00
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
[UserSpoke]
|
|
|
|
visited=1
|
|
|
|
FOE
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# make the installer show up
|
2021-11-10 08:45:28 +00:00
|
|
|
if [ -f /usr/share/applications/liveinst.desktop ]; then
|
2021-08-18 16:22:10 +00:00
|
|
|
# Show harddisk install in shell dash
|
2021-11-10 08:45:28 +00:00
|
|
|
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop ""
|
2021-08-18 16:22:10 +00:00
|
|
|
# need to move it to anaconda.desktop to make shell happy
|
2021-11-10 08:45:28 +00:00
|
|
|
mv /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
|
2021-08-18 16:22:10 +00:00
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
|
|
|
|
[org.gnome.shell]
|
|
|
|
favorite-apps=['firefox.desktop', 'org.gnome.Calendar.desktop', 'rhythmbox.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
|
|
|
|
FOE
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# Make the welcome screen show up
|
2021-11-10 08:45:28 +00:00
|
|
|
if [ -f /usr/share/anaconda/gnome/fedora-welcome.desktop ]; then
|
|
|
|
mkdir -p ~liveuser/.config/autostart
|
|
|
|
cp /usr/share/anaconda/gnome/fedora-welcome.desktop /usr/share/applications/
|
|
|
|
cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/
|
|
|
|
fi
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# Disable GNOME welcome tour so it doesn't overlap with Fedora welcome screen
|
2021-11-10 08:45:28 +00:00
|
|
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
|
|
|
|
welcome-dialog-last-shown-version='4294967295'
|
|
|
|
FOE
|
2021-08-18 16:22:10 +00:00
|
|
|
|
|
|
|
# Copy Anaconda branding in place
|
2021-11-10 08:45:28 +00:00
|
|
|
if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then
|
|
|
|
cp -a /usr/share/lorax/product/* /
|
|
|
|
fi
|
|
|
|
fi
|
2021-08-18 16:22:10 +00:00
|
|
|
|
2021-08-18 09:51:42 +00:00
|
|
|
# rebuild schema cache with any overrides we installed
|
|
|
|
glib-compile-schemas /usr/share/glib-2.0/schemas
|
|
|
|
|
|
|
|
# set up auto-login
|
|
|
|
cat > /etc/gdm/custom.conf << FOE
|
|
|
|
[daemon]
|
|
|
|
AutomaticLoginEnable=True
|
|
|
|
AutomaticLogin=liveuser
|
|
|
|
FOE
|
|
|
|
|
|
|
|
# Turn off PackageKit-command-not-found while uninstalled
|
|
|
|
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
|
|
|
|
sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
# make sure to set the right permissions and selinux contexts
|
|
|
|
chown -R liveuser:liveuser /home/liveuser/
|
|
|
|
restorecon -R /home/liveuser/
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2021-11-10 08:45:28 +00:00
|
|
|
%end
|