fedora-livemedia: Update example kickstart
This commit is contained in:
parent
c4aba2e47f
commit
f2ae286739
@ -18,7 +18,7 @@ network --bootproto=dhcp --device=link --activate
|
|||||||
selinux --enforcing
|
selinux --enforcing
|
||||||
|
|
||||||
# System services
|
# System services
|
||||||
services --disabled="network,sshd" --enabled="NetworkManager,ModemManager"
|
services --disabled="sshd" --enabled="NetworkManager,ModemManager"
|
||||||
|
|
||||||
# livemedia-creator modifications.
|
# livemedia-creator modifications.
|
||||||
shutdown
|
shutdown
|
||||||
@ -63,21 +63,14 @@ livedir="LiveOS"
|
|||||||
for arg in \`cat /proc/cmdline\` ; do
|
for arg in \`cat /proc/cmdline\` ; do
|
||||||
if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
|
if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
|
||||||
livedir=\${arg##rd.live.dir=}
|
livedir=\${arg##rd.live.dir=}
|
||||||
return
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
|
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
|
||||||
livedir=\${arg##live_dir=}
|
livedir=\${arg##live_dir=}
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# enable swaps unless requested otherwise
|
# enable swapfile unless requested otherwise
|
||||||
swaps=\`blkid -t TYPE=swap -o device\`
|
|
||||||
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
|
|
||||||
for s in \$swaps ; do
|
|
||||||
action "Enabling swap partition \$s" swapon \$s
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
|
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
|
action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
|
||||||
fi
|
fi
|
||||||
@ -122,7 +115,6 @@ findPersistentHome() {
|
|||||||
for arg in \`cat /proc/cmdline\` ; do
|
for arg in \`cat /proc/cmdline\` ; do
|
||||||
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
|
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
|
||||||
homedev=\${arg##persistenthome=}
|
homedev=\${arg##persistenthome=}
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -142,7 +134,7 @@ if [ -n "\$configdone" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add fedora user with no passwd
|
# add liveuser user with no passwd
|
||||||
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
||||||
passwd -d liveuser > /dev/null
|
passwd -d liveuser > /dev/null
|
||||||
usermod -aG wheel liveuser > /dev/null
|
usermod -aG wheel liveuser > /dev/null
|
||||||
@ -186,9 +178,7 @@ sed -i 's/rtcsync//' /etc/chrony.conf
|
|||||||
touch /.liveimg-configured
|
touch /.liveimg-configured
|
||||||
|
|
||||||
# add static hostname to work around xauth bug
|
# add static hostname to work around xauth bug
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
|
hostnamectl set-hostname "localhost-live"
|
||||||
echo "localhost" > /etc/hostname
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# bah, hal starts way too late
|
# bah, hal starts way too late
|
||||||
@ -271,7 +261,7 @@ releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
|
|||||||
basearch=$(uname -i)
|
basearch=$(uname -i)
|
||||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||||
echo "Packages within this LiveCD"
|
echo "Packages within this LiveCD"
|
||||||
rpm -qa
|
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
|
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
||||||
rm -f /var/lib/rpm/__db*
|
rm -f /var/lib/rpm/__db*
|
||||||
|
|
||||||
@ -281,18 +271,23 @@ rm -f /var/lib/rpm/__db*
|
|||||||
# make sure there aren't core files lying around
|
# make sure there aren't core files lying around
|
||||||
rm -f /core*
|
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
|
# convince readahead not to collect
|
||||||
# FIXME: for systemd
|
# FIXME: for systemd
|
||||||
|
|
||||||
echo 'File created by kickstart. See systemd-update-done.service(8).' \
|
echo 'File created by kickstart. See systemd-update-done.service(8).' \
|
||||||
| tee /etc/.updated >/var/.updated
|
| tee /etc/.updated >/var/.updated
|
||||||
|
|
||||||
# Remove random-seed
|
|
||||||
rm /var/lib/systemd/random-seed
|
|
||||||
|
|
||||||
# Remove the rescue kernel and image to save space
|
# Remove the rescue kernel and image to save space
|
||||||
# Installation will recreate these on the target
|
# Installation will recreate these on the target
|
||||||
rm -f /boot/*-rescue*
|
rm -f /boot/*-rescue*
|
||||||
|
|
||||||
|
# Remove machine-id on pre generated images
|
||||||
|
rm -f /etc/machine-id
|
||||||
|
touch /etc/machine-id
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@ -318,6 +313,18 @@ FOE
|
|||||||
mkdir ~liveuser/.config
|
mkdir ~liveuser/.config
|
||||||
touch ~liveuser/.config/gnome-initial-setup-done
|
touch ~liveuser/.config/gnome-initial-setup-done
|
||||||
|
|
||||||
|
# suppress anaconda spokes redundant with gnome-initial-setup
|
||||||
|
cat >> /etc/sysconfig/anaconda << FOE
|
||||||
|
[NetworkSpoke]
|
||||||
|
visited=1
|
||||||
|
|
||||||
|
[PasswordSpoke]
|
||||||
|
visited=1
|
||||||
|
|
||||||
|
[UserSpoke]
|
||||||
|
visited=1
|
||||||
|
FOE
|
||||||
|
|
||||||
# make the installer show up
|
# make the installer show up
|
||||||
if [ -f /usr/share/applications/liveinst.desktop ]; then
|
if [ -f /usr/share/applications/liveinst.desktop ]; then
|
||||||
# Show harddisk install in shell dash
|
# Show harddisk install in shell dash
|
||||||
@ -327,7 +334,7 @@ if [ -f /usr/share/applications/liveinst.desktop ]; then
|
|||||||
|
|
||||||
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
|
||||||
[org.gnome.shell]
|
[org.gnome.shell]
|
||||||
favorite-apps=['firefox.desktop', 'evolution.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
|
favorite-apps=['firefox.desktop', 'org.gnome.Calendar.desktop', 'rhythmbox.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop', 'anaconda.desktop']
|
||||||
FOE
|
FOE
|
||||||
|
|
||||||
# Make the welcome screen show up
|
# Make the welcome screen show up
|
||||||
@ -337,6 +344,11 @@ FOE
|
|||||||
cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/
|
cp /usr/share/anaconda/gnome/fedora-welcome.desktop ~liveuser/.config/autostart/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Disable GNOME welcome tour so it doesn't overlap with Fedora welcome screen
|
||||||
|
cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
|
||||||
|
welcome-dialog-last-shown-version='4294967295'
|
||||||
|
FOE
|
||||||
|
|
||||||
# Copy Anaconda branding in place
|
# Copy Anaconda branding in place
|
||||||
if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then
|
if [ -d /usr/share/lorax/product/usr/share/anaconda ]; then
|
||||||
cp -a /usr/share/lorax/product/* /
|
cp -a /usr/share/lorax/product/* /
|
||||||
@ -367,20 +379,11 @@ EOF
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
||||||
|
@^workstation-product-environment
|
||||||
@anaconda-tools
|
@anaconda-tools
|
||||||
@base-x
|
aajohan-comfortaa-fonts
|
||||||
@core
|
|
||||||
@firefox
|
|
||||||
@fonts
|
|
||||||
@guest-desktop-agents
|
|
||||||
@hardware-support
|
|
||||||
@libreoffice
|
|
||||||
@multimedia
|
|
||||||
@networkmanager-submodules
|
|
||||||
@printing
|
|
||||||
@workstation-product
|
|
||||||
gnome-terminal
|
|
||||||
anaconda
|
anaconda
|
||||||
|
anaconda-install-env-deps
|
||||||
anaconda-live
|
anaconda-live
|
||||||
dracut-config-generic
|
dracut-config-generic
|
||||||
dracut-live
|
dracut-live
|
||||||
@ -389,13 +392,12 @@ kernel
|
|||||||
# Make sure that DNF doesn't pull in debug kernel to satisfy kmod() requires
|
# Make sure that DNF doesn't pull in debug kernel to satisfy kmod() requires
|
||||||
kernel-modules
|
kernel-modules
|
||||||
kernel-modules-extra
|
kernel-modules-extra
|
||||||
memtest86+
|
|
||||||
syslinux
|
syslinux
|
||||||
-@dial-up
|
-@dial-up
|
||||||
-@input-methods
|
-@input-methods
|
||||||
-@standard
|
-@standard
|
||||||
-gfs2-utils
|
-gfs2-utils
|
||||||
-reiserfs-utils
|
-gnome-boxes
|
||||||
|
|
||||||
# This package is needed to boot the iso on UEFI
|
# This package is needed to boot the iso on UEFI
|
||||||
shim
|
shim
|
||||||
|
Loading…
Reference in New Issue
Block a user