mirror of
https://pagure.io/fedora-kickstarts.git
synced 2025-12-11 17:40:31 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3e9d978c7 | ||
|
|
ab0f96678e | ||
|
|
d8c1268e61 | ||
|
|
a600dd769e | ||
|
|
c3841ff35a | ||
|
|
d95b59ac3b | ||
|
|
9109d36075 | ||
|
|
1a55167415 | ||
|
|
5f1ff6c079 | ||
|
|
7e9f7558eb | ||
|
|
3721df6e5a | ||
|
|
2f5861cb1c | ||
|
|
8ca87ecf8d | ||
|
|
f1eae2ab45 | ||
|
|
ec4546fbb4 |
@@ -68,7 +68,7 @@ arch=$(uname -m)
|
|||||||
|
|
||||||
# Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes.
|
# Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes.
|
||||||
# We want consumers of this image to track the two week releases.
|
# We want consumers of this image to track the two week releases.
|
||||||
ostree admin set-origin --index 0 fedora-atomic https://kojipkgs.fedoraproject.org/atomic/28/ "fedora/28/${arch}/atomic-host"
|
ostree admin set-origin --index 0 fedora-atomic https://kojipkgs.fedoraproject.org/compose/atomic/repo/ "fedora/28/${arch}/atomic-host"
|
||||||
|
|
||||||
# Make sure the ref we're supposedly sitting on (according
|
# Make sure the ref we're supposedly sitting on (according
|
||||||
# to the updated origin) exists.
|
# to the updated origin) exists.
|
||||||
|
|||||||
@@ -5,10 +5,13 @@ services --enabled=sshd,NetworkManager,chronyd,initial-setup
|
|||||||
autopart
|
autopart
|
||||||
|
|
||||||
%packages
|
%packages
|
||||||
# install the default groups for the server evironment since installing the environment is not working
|
# install the default groups for the server environment since installing the environment is not working
|
||||||
@server-product
|
@server-product
|
||||||
@standard
|
@standard
|
||||||
@headless-management
|
@headless-management
|
||||||
|
@hardware-support
|
||||||
|
@networkmanager-submodules
|
||||||
|
|
||||||
@container-management
|
@container-management
|
||||||
@domain-client
|
@domain-client
|
||||||
-initial-setup-gui
|
-initial-setup-gui
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ autopart --noboot --nohome --noswap --nolvm
|
|||||||
%packages --excludedocs --instLangs=en --nocore
|
%packages --excludedocs --instLangs=en --nocore
|
||||||
fedora-release
|
fedora-release
|
||||||
bash
|
bash
|
||||||
coreutils-single
|
coreutils
|
||||||
glibc-minimal-langpack
|
glibc-minimal-langpack
|
||||||
libcrypt
|
libcrypt
|
||||||
rpm
|
rpm
|
||||||
@@ -49,6 +49,7 @@ util-linux
|
|||||||
-shared-mime-info
|
-shared-mime-info
|
||||||
-trousers
|
-trousers
|
||||||
-xkeyboard-config
|
-xkeyboard-config
|
||||||
|
-grubby
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|||||||
121
fedora-iot.ks
Normal file
121
fedora-iot.ks
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
# This is the kickstart for Fedora IoT disk images.
|
||||||
|
|
||||||
|
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
|
||||||
|
lang en_US.UTF-8
|
||||||
|
keyboard us
|
||||||
|
timezone --utc Etc/UTC
|
||||||
|
|
||||||
|
auth --useshadow --passalgo=sha512
|
||||||
|
selinux --enforcing
|
||||||
|
rootpw --lock --iscrypted locked
|
||||||
|
firstboot --reconfig --enable
|
||||||
|
|
||||||
|
# Add most common consoles console=ttyAMA0 console=ttyS0 console=ttyS1 as kernel boot parameter
|
||||||
|
bootloader --timeout=1 --append="console=tty1 console=ttyS0,115200n8 console=ttyS1,115200n8 console=ttyAMA0,115200n8 net.ifnames=0 modprobe.blacklist=vc4"
|
||||||
|
|
||||||
|
network --bootproto=dhcp --device=link --activate --onboot=on
|
||||||
|
services --enabled=NetworkManager,sshd,rngd,initial-setup
|
||||||
|
|
||||||
|
# tell Initial Setup to run in the reconfig mode
|
||||||
|
firstboot --reconfig --enable
|
||||||
|
|
||||||
|
zerombr
|
||||||
|
clearpart --all
|
||||||
|
autopart --nohome --noswap --type=plain
|
||||||
|
|
||||||
|
# Equivalent of %include fedora-repo.ks
|
||||||
|
# Pull from the ostree repo that was created during the compose
|
||||||
|
ostreesetup --nogpg --osname=fedora-iot --remote=fedora-iot --url=https://kojipkgs.fedoraproject.org/compose/iot/repo/ --ref=fedora/28/${basearch}/iot
|
||||||
|
|
||||||
|
reboot
|
||||||
|
|
||||||
|
%post --erroronfail
|
||||||
|
# Find the architecture we are on
|
||||||
|
arch=$(uname -m)
|
||||||
|
|
||||||
|
# Setup Raspberry Pi firmware
|
||||||
|
if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then
|
||||||
|
cp -Pr /usr/share/bcm283x-firmware/* /boot/efi/
|
||||||
|
if [[ $arch == "aarch64" ]]; then
|
||||||
|
mv -f /boot/efi/config-64.txt /boot/efi/config.txt
|
||||||
|
cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin
|
||||||
|
else
|
||||||
|
cp -P /usr/share/uboot/rpi_2/u-boot.bin /boot/fw/rpi2-u-boot.bin
|
||||||
|
cp -P /usr/share/uboot/rpi_3_32b/u-boot.bin /boot/fw/rpi3-u-boot.bin
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes.
|
||||||
|
# We want consumers of this image to track the two week releases.
|
||||||
|
ostree admin set-origin --index 0 fedora-iot https://kojipkgs.fedoraproject.org/iot/28/ "fedora/28/${arch}/iot"
|
||||||
|
|
||||||
|
# Make sure the ref we're supposedly sitting on (according
|
||||||
|
# to the updated origin) exists.
|
||||||
|
ostree refs "fedora-iot:fedora/28/${arch}/iot" --create "fedora-iot:fedora/28/${arch}/iot"
|
||||||
|
|
||||||
|
# Remove the old ref so that the commit eventually gets cleaned up.
|
||||||
|
ostree refs "fedora-iot:fedora/28/${arch}/iot" --delete
|
||||||
|
|
||||||
|
# delete/add the remote with new options to enable gpg verification
|
||||||
|
# and to point them at the cdn url
|
||||||
|
ostree remote delete fedora-iot
|
||||||
|
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-28-primary fedora-iot 'https://dl.fedoraproject.org/iot/repo/'
|
||||||
|
|
||||||
|
# older versions of livecd-tools do not follow "rootpw --lock" line above
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=964299
|
||||||
|
passwd -l root
|
||||||
|
|
||||||
|
# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1193590
|
||||||
|
cp /etc/skel/.bash* /var/roothome
|
||||||
|
|
||||||
|
echo -n "Network fixes"
|
||||||
|
# initscripts don't like this file to be missing.
|
||||||
|
cat > /etc/sysconfig/network << EOF
|
||||||
|
NETWORKING=yes
|
||||||
|
NOZEROCONF=yes
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Remove any persistent NIC rules generated by udev
|
||||||
|
rm -vf /etc/udev/rules.d/*persistent-net*.rules
|
||||||
|
# And ensure that we will do DHCP on eth0 on startup
|
||||||
|
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
|
||||||
|
DEVICE="eth0"
|
||||||
|
BOOTPROTO="dhcp"
|
||||||
|
ONBOOT="yes"
|
||||||
|
TYPE="Ethernet"
|
||||||
|
PERSISTENT_DHCLIENT="yes"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Removing random-seed so it's not the same in every image."
|
||||||
|
rm -f /var/lib/systemd/random-seed
|
||||||
|
|
||||||
|
echo "Packages within this iot image:"
|
||||||
|
echo "-----------------------------------------------------------------------"
|
||||||
|
rpm -qa
|
||||||
|
echo "-----------------------------------------------------------------------"
|
||||||
|
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||||
|
rm -f /var/lib/rpm/__db*
|
||||||
|
|
||||||
|
echo "Zeroing out empty space."
|
||||||
|
# This forces the filesystem to reclaim space from deleted files
|
||||||
|
dd bs=1M if=/dev/zero of=/var/tmp/zeros || :
|
||||||
|
rm -f /var/tmp/zeros
|
||||||
|
echo "(Don't worry -- that out-of-space error was expected.)"
|
||||||
|
|
||||||
|
# For trac ticket https://pagure.io/atomic-wg/issue/128
|
||||||
|
rm -f /etc/sysconfig/network-scripts/ifcfg-ens3
|
||||||
|
|
||||||
|
echo "Adding Developer Mode GRUB2 menu item."
|
||||||
|
/usr/libexec/atomic-devmode/bootentry add
|
||||||
|
|
||||||
|
# Disable network service here, as doing it in the services line
|
||||||
|
# fails due to RHBZ #1369794
|
||||||
|
/sbin/chkconfig network off
|
||||||
|
|
||||||
|
# Anaconda is writing an /etc/resolv.conf from the install environment.
|
||||||
|
# The system should start out with an empty file, otherwise cloud-init
|
||||||
|
# will try to use this information and may error:
|
||||||
|
# https://bugs.launchpad.net/cloud-init/+bug/1670052
|
||||||
|
truncate -s 0 /etc/resolv.conf
|
||||||
|
|
||||||
|
%end
|
||||||
Reference in New Issue
Block a user