2018-09-06 19:15:44 +00:00
|
|
|
|
# Kickstart file for Fedora RISC-V (riscv64) Minimal Rawhide
|
|
|
|
|
|
2019-11-22 20:11:46 +00:00
|
|
|
|
#repo --name="koji-override-0" --baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
|
|
|
|
install
|
|
|
|
|
text
|
|
|
|
|
#reboot
|
|
|
|
|
lang en_US.UTF-8
|
|
|
|
|
keyboard us
|
|
|
|
|
# short hostname still allows DHCP to assign domain name
|
|
|
|
|
network --bootproto dhcp --device=link --hostname=fedora-riscv
|
2019-11-22 20:11:46 +00:00
|
|
|
|
rootpw --plaintext fedora_rocks!
|
2018-09-06 19:15:44 +00:00
|
|
|
|
firewall --enabled --ssh
|
|
|
|
|
timezone --utc America/New_York
|
2019-11-22 20:11:46 +00:00
|
|
|
|
selinux --enforcing
|
|
|
|
|
services --enabled=sshd,NetworkManager,chronyd,haveged
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
2019-11-22 20:11:46 +00:00
|
|
|
|
bootloader --location=none --extlinux
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
|
|
|
|
zerombr
|
|
|
|
|
clearpart --all --initlabel --disklabel=gpt
|
2019-11-22 20:11:46 +00:00
|
|
|
|
part /boot --size=512 --fstype ext4 --asprimary
|
2018-11-12 08:13:26 +00:00
|
|
|
|
part / --fstype="ext4" --size=1536
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
|
|
|
|
# Halt the system once configuration has finished.
|
|
|
|
|
poweroff
|
|
|
|
|
|
|
|
|
|
%packages
|
|
|
|
|
@core
|
2019-11-22 20:11:46 +00:00
|
|
|
|
@hardware-support
|
|
|
|
|
-initial-setup-gui
|
|
|
|
|
-glibc-all-langpacks
|
|
|
|
|
-iproute-tc
|
|
|
|
|
-trousers
|
|
|
|
|
-xkeyboard-config
|
|
|
|
|
-usb_modeswitch
|
|
|
|
|
-ipw*
|
|
|
|
|
-iwl*
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
2018-11-12 07:50:22 +00:00
|
|
|
|
kernel
|
|
|
|
|
kernel-core
|
|
|
|
|
kernel-modules
|
|
|
|
|
linux-firmware
|
2019-11-22 20:11:46 +00:00
|
|
|
|
opensbi-unstable-images-riscv64
|
|
|
|
|
extlinux-bootloader
|
|
|
|
|
uboot-tools
|
|
|
|
|
freedom-u540-c000-bootloader
|
|
|
|
|
# Remove this in %post
|
|
|
|
|
dracut-config-generic
|
|
|
|
|
-dracut-config-rescue
|
2018-11-12 07:50:22 +00:00
|
|
|
|
|
2018-09-06 19:15:44 +00:00
|
|
|
|
glibc-langpack-en
|
|
|
|
|
nano
|
|
|
|
|
chrony
|
2019-11-22 20:11:46 +00:00
|
|
|
|
haveged
|
2018-10-14 10:42:26 +00:00
|
|
|
|
qemu-guest-agent
|
2019-01-18 10:20:52 +00:00
|
|
|
|
|
|
|
|
|
-grubby
|
|
|
|
|
grubby-deprecated
|
2019-11-22 20:11:46 +00:00
|
|
|
|
|
|
|
|
|
# No longer in @core since 2018-10, but needed for livesys script
|
|
|
|
|
initscripts
|
2019-11-25 07:59:32 +00:00
|
|
|
|
chkconfig
|
2019-11-22 20:11:46 +00:00
|
|
|
|
|
|
|
|
|
# Lets resize / on first boot
|
2019-11-23 06:53:12 +00:00
|
|
|
|
#dracut-modules-growroot
|
2018-09-06 19:15:44 +00:00
|
|
|
|
%end
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
# Disable default repositories (not riscv64 in upstream)
|
2019-01-21 16:35:58 +00:00
|
|
|
|
dnf config-manager --set-disabled rawhide updates updates-testing fedora fedora-modular fedora-cisco-openh264 updates-modular updates-testing-modular rawhide-modular
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
2019-11-22 20:11:46 +00:00
|
|
|
|
dnf -y remove dracut-config-generic
|
|
|
|
|
|
|
|
|
|
# systemd on no-SMP boots (i.e. single core) sometimes timeout waiting for storage
|
|
|
|
|
# devices. After entering emergency prompt all disk are mounted.
|
|
|
|
|
# For more information see:
|
|
|
|
|
# https://www.suse.com/support/kb/doc/?id=7018491
|
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.mount.html
|
|
|
|
|
# https://github.com/systemd/systemd/issues/3446
|
|
|
|
|
# We modify /etc/fstab to give more time for device detection (the problematic part)
|
|
|
|
|
# and mounting processes. This should help on systems where boot takes longer.
|
|
|
|
|
sed -i 's|noatime|noatime,x-systemd.device-timeout=300s,x-systemd.mount-timeout=300s|g' /etc/fstab
|
|
|
|
|
|
|
|
|
|
# Fedora 31
|
|
|
|
|
# https://fedoraproject.org/wiki/Changes/DisableRootPasswordLoginInSshd
|
|
|
|
|
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/rc.d/init.d/functions
|
|
|
|
|
|
|
|
|
|
useradd -c "Fedora RISCV User" riscv
|
|
|
|
|
echo fedora_rocks! | passwd --stdin riscv > /dev/null
|
|
|
|
|
usermod -aG wheel riscv > /dev/null
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
chmod 755 /etc/rc.d/init.d/livesys
|
|
|
|
|
/sbin/restorecon /etc/rc.d/init.d/livesys
|
|
|
|
|
/sbin/chkconfig --add livesys
|
|
|
|
|
|
2018-09-06 19:15:44 +00:00
|
|
|
|
# Create Fedora RISC-V repo
|
|
|
|
|
cat << EOF > /etc/yum.repos.d/fedora-riscv.repo
|
|
|
|
|
[fedora-riscv]
|
|
|
|
|
name=Fedora RISC-V
|
2019-11-22 20:11:46 +00:00
|
|
|
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/
|
2019-01-08 18:00:11 +00:00
|
|
|
|
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/
|
|
|
|
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/
|
2018-09-06 19:15:44 +00:00
|
|
|
|
enabled=1
|
|
|
|
|
gpgcheck=0
|
2018-10-03 10:08:56 +00:00
|
|
|
|
|
2019-01-08 18:00:11 +00:00
|
|
|
|
|
2018-10-03 10:08:56 +00:00
|
|
|
|
[fedora-riscv-debuginfo]
|
|
|
|
|
name=Fedora RISC-V - Debug
|
2019-11-22 20:11:46 +00:00
|
|
|
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/debug/
|
2019-01-08 18:00:11 +00:00
|
|
|
|
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/debug/
|
|
|
|
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/debug/
|
2018-10-03 10:08:56 +00:00
|
|
|
|
enabled=0
|
|
|
|
|
gpgcheck=0
|
|
|
|
|
|
|
|
|
|
[fedora-riscv-source]
|
|
|
|
|
name=Fedora RISC-V - Source
|
2019-11-22 20:11:46 +00:00
|
|
|
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/src/
|
2019-01-08 18:00:11 +00:00
|
|
|
|
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/src/
|
|
|
|
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/src/
|
2018-10-03 10:08:56 +00:00
|
|
|
|
enabled=0
|
|
|
|
|
gpgcheck=0
|
2018-09-06 19:15:44 +00:00
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# Create Fedora RISC-V Koji repo
|
|
|
|
|
cat << EOF > /etc/yum.repos.d/fedora-riscv-koji.repo
|
|
|
|
|
[fedora-riscv-koji]
|
|
|
|
|
name=Fedora RISC-V Koji
|
2019-11-22 20:11:46 +00:00
|
|
|
|
baseurl=http://fedora.riscv.rocks/repos/rawhide/latest/riscv64/
|
2018-09-06 19:15:44 +00:00
|
|
|
|
enabled=0
|
|
|
|
|
gpgcheck=0
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# systemd starts serial consoles on /dev/ttyS0 and /dev/hvc0. The
|
|
|
|
|
# only problem is they are the same serial console. Mask one.
|
|
|
|
|
systemctl mask serial-getty@hvc0.service
|
|
|
|
|
|
|
|
|
|
# setup login message
|
|
|
|
|
cat << EOF | tee /etc/issue /etc/issue.net
|
|
|
|
|
Welcome to the Fedora/RISC-V disk image
|
|
|
|
|
https://fedoraproject.org/wiki/Architectures/RISC-V
|
|
|
|
|
|
|
|
|
|
Build date: $(date --utc)
|
|
|
|
|
|
|
|
|
|
Kernel \r on an \m (\l)
|
|
|
|
|
|
2019-11-22 20:11:46 +00:00
|
|
|
|
The root password is 'fedora_rocks!'.
|
|
|
|
|
root password logins are disabled in SSH starting Fedora 31.
|
|
|
|
|
User 'riscv' with password 'fedora_rocks!' in 'wheel' group is provided.
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
|
|
|
|
To install new packages use 'dnf install ...'
|
|
|
|
|
|
|
|
|
|
To upgrade disk image use 'dnf upgrade --best'
|
|
|
|
|
|
|
|
|
|
If DNS isn’t working, try editing ‘/etc/yum.repos.d/fedora-riscv.repo’.
|
|
|
|
|
|
|
|
|
|
For updates and latest information read:
|
2019-11-22 20:11:46 +00:00
|
|
|
|
https://fedoraproject.org/wiki/Architectures/RISC-V
|
2018-09-06 19:15:44 +00:00
|
|
|
|
|
|
|
|
|
Fedora/RISC-V
|
|
|
|
|
-------------
|
2019-11-22 20:11:46 +00:00
|
|
|
|
Koji: http://fedora.riscv.rocks/koji/
|
|
|
|
|
SCM: http://fedora.riscv.rocks:3000/
|
|
|
|
|
Distribution rep.: http://fedora.riscv.rocks/repos-dist/
|
|
|
|
|
Koji internal rep.: http://fedora.riscv.rocks/repos/
|
2018-09-06 19:15:44 +00:00
|
|
|
|
EOF
|
2019-11-22 20:11:46 +00:00
|
|
|
|
|
|
|
|
|
# setup systemd to boot to the right runlevel
|
|
|
|
|
echo -n "Setting default runlevel to multiuser text mode"
|
|
|
|
|
rm -f /etc/systemd/system/default.target
|
|
|
|
|
ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
|
|
|
|
|
echo .
|
|
|
|
|
|
|
|
|
|
# Remove machine-id on pre generated images
|
|
|
|
|
rm -f /etc/machine-id
|
|
|
|
|
touch /etc/machine-id
|
|
|
|
|
|
|
|
|
|
# remove random seed, the newly installed instance should make it's own
|
|
|
|
|
rm -f /var/lib/systemd/random-seed
|
|
|
|
|
|
2018-09-06 19:15:44 +00:00
|
|
|
|
%end
|
|
|
|
|
|
|
|
|
|
# EOF
|