Update Minimal kickstart
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
parent
d3aadc6d27
commit
ebb5b22e6d
|
@ -1,6 +1,6 @@
|
||||||
# Kickstart file for Fedora RISC-V (riscv64) Minimal Rawhide
|
# Kickstart file for Fedora RISC-V (riscv64) Minimal Rawhide
|
||||||
|
|
||||||
#repo --name="koji-override-0" --baseurl=http://fedora-riscv.tranquillity.se/repos-dist/rawhide/latest/riscv64/
|
#repo --name="koji-override-0" --baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/
|
||||||
|
|
||||||
install
|
install
|
||||||
text
|
text
|
||||||
|
@ -9,16 +9,17 @@ lang en_US.UTF-8
|
||||||
keyboard us
|
keyboard us
|
||||||
# short hostname still allows DHCP to assign domain name
|
# short hostname still allows DHCP to assign domain name
|
||||||
network --bootproto dhcp --device=link --hostname=fedora-riscv
|
network --bootproto dhcp --device=link --hostname=fedora-riscv
|
||||||
rootpw riscv
|
rootpw --plaintext fedora_rocks!
|
||||||
firewall --enabled --ssh
|
firewall --enabled --ssh
|
||||||
timezone --utc America/New_York
|
timezone --utc America/New_York
|
||||||
selinux --permissive
|
selinux --enforcing
|
||||||
services --enabled=sshd,NetworkManager,chronyd
|
services --enabled=sshd,NetworkManager,chronyd,haveged
|
||||||
|
|
||||||
bootloader --location=none --disabled
|
bootloader --location=none --extlinux
|
||||||
|
|
||||||
zerombr
|
zerombr
|
||||||
clearpart --all --initlabel --disklabel=gpt
|
clearpart --all --initlabel --disklabel=gpt
|
||||||
|
part /boot --size=512 --fstype ext4 --asprimary
|
||||||
part / --fstype="ext4" --size=1536
|
part / --fstype="ext4" --size=1536
|
||||||
|
|
||||||
# Halt the system once configuration has finished.
|
# Halt the system once configuration has finished.
|
||||||
|
@ -26,34 +27,91 @@ poweroff
|
||||||
|
|
||||||
%packages
|
%packages
|
||||||
@core
|
@core
|
||||||
@buildsys-build
|
@hardware-support
|
||||||
|
-initial-setup-gui
|
||||||
|
-glibc-all-langpacks
|
||||||
|
-iproute-tc
|
||||||
|
-trousers
|
||||||
|
-xkeyboard-config
|
||||||
|
-usb_modeswitch
|
||||||
|
-ipw*
|
||||||
|
-iwl*
|
||||||
|
|
||||||
kernel
|
kernel
|
||||||
kernel-core
|
kernel-core
|
||||||
kernel-devel
|
|
||||||
kernel-modules
|
kernel-modules
|
||||||
kernel-modules-extra
|
|
||||||
linux-firmware
|
linux-firmware
|
||||||
fedora-bbl
|
opensbi-unstable-images-riscv64
|
||||||
|
extlinux-bootloader
|
||||||
|
uboot-tools
|
||||||
|
freedom-u540-c000-bootloader
|
||||||
|
# Remove this in %post
|
||||||
|
dracut-config-generic
|
||||||
|
-dracut-config-rescue
|
||||||
|
|
||||||
glibc-langpack-en
|
glibc-langpack-en
|
||||||
nano
|
nano
|
||||||
chrony
|
chrony
|
||||||
|
haveged
|
||||||
qemu-guest-agent
|
qemu-guest-agent
|
||||||
|
|
||||||
-grubby
|
-grubby
|
||||||
grubby-deprecated
|
grubby-deprecated
|
||||||
|
|
||||||
|
# No longer in @core since 2018-10, but needed for livesys script
|
||||||
|
initscripts
|
||||||
|
|
||||||
|
# Lets resize / on first boot
|
||||||
|
dracut-modules-growroot
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Disable default repositories (not riscv64 in upstream)
|
# Disable default repositories (not riscv64 in upstream)
|
||||||
dnf config-manager --set-disabled rawhide updates updates-testing fedora fedora-modular fedora-cisco-openh264 updates-modular updates-testing-modular rawhide-modular
|
dnf config-manager --set-disabled rawhide updates updates-testing fedora fedora-modular fedora-cisco-openh264 updates-modular updates-testing-modular rawhide-modular
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
# Create Fedora RISC-V repo
|
# Create Fedora RISC-V repo
|
||||||
cat << EOF > /etc/yum.repos.d/fedora-riscv.repo
|
cat << EOF > /etc/yum.repos.d/fedora-riscv.repo
|
||||||
[fedora-riscv]
|
[fedora-riscv]
|
||||||
name=Fedora RISC-V
|
name=Fedora RISC-V
|
||||||
baseurl=http://fedora-riscv.tranquillity.se/repos-dist/rawhide/latest/riscv64/
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/
|
||||||
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/
|
#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/
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/
|
||||||
enabled=1
|
enabled=1
|
||||||
|
@ -62,7 +120,7 @@ gpgcheck=0
|
||||||
|
|
||||||
[fedora-riscv-debuginfo]
|
[fedora-riscv-debuginfo]
|
||||||
name=Fedora RISC-V - Debug
|
name=Fedora RISC-V - Debug
|
||||||
baseurl=http://fedora-riscv.tranquillity.se/repos-dist/rawhide/latest/riscv64/debug/
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/debug/
|
||||||
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/debug/
|
#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/
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/riscv64/debug/
|
||||||
enabled=0
|
enabled=0
|
||||||
|
@ -70,7 +128,7 @@ gpgcheck=0
|
||||||
|
|
||||||
[fedora-riscv-source]
|
[fedora-riscv-source]
|
||||||
name=Fedora RISC-V - Source
|
name=Fedora RISC-V - Source
|
||||||
baseurl=http://fedora-riscv.tranquillity.se/repos-dist/rawhide/latest/src/
|
baseurl=http://fedora.riscv.rocks/repos-dist/rawhide/latest/src/
|
||||||
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/rawhide/latest/src/
|
#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/
|
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/rawhide/latest/src/
|
||||||
enabled=0
|
enabled=0
|
||||||
|
@ -81,7 +139,7 @@ EOF
|
||||||
cat << EOF > /etc/yum.repos.d/fedora-riscv-koji.repo
|
cat << EOF > /etc/yum.repos.d/fedora-riscv-koji.repo
|
||||||
[fedora-riscv-koji]
|
[fedora-riscv-koji]
|
||||||
name=Fedora RISC-V Koji
|
name=Fedora RISC-V Koji
|
||||||
baseurl=http://fedora-riscv.tranquillity.se/repos/rawhide/latest/riscv64/
|
baseurl=http://fedora.riscv.rocks/repos/rawhide/latest/riscv64/
|
||||||
enabled=0
|
enabled=0
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
EOF
|
EOF
|
||||||
|
@ -99,7 +157,9 @@ Build date: $(date --utc)
|
||||||
|
|
||||||
Kernel \r on an \m (\l)
|
Kernel \r on an \m (\l)
|
||||||
|
|
||||||
The root password is ‘riscv’.
|
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.
|
||||||
|
|
||||||
To install new packages use 'dnf install ...'
|
To install new packages use 'dnf install ...'
|
||||||
|
|
||||||
|
@ -108,15 +168,29 @@ To upgrade disk image use 'dnf upgrade --best'
|
||||||
If DNS isn’t working, try editing ‘/etc/yum.repos.d/fedora-riscv.repo’.
|
If DNS isn’t working, try editing ‘/etc/yum.repos.d/fedora-riscv.repo’.
|
||||||
|
|
||||||
For updates and latest information read:
|
For updates and latest information read:
|
||||||
https://fedorapeople.org/groups/risc-v/disk-images/readme.txt
|
https://fedoraproject.org/wiki/Architectures/RISC-V
|
||||||
|
|
||||||
Fedora/RISC-V
|
Fedora/RISC-V
|
||||||
-------------
|
-------------
|
||||||
Koji: http://fedora-riscv.tranquillity.se/koji/
|
Koji: http://fedora.riscv.rocks/koji/
|
||||||
SCM: http://fedora-riscv.tranquillity.se:3000/
|
SCM: http://fedora.riscv.rocks:3000/
|
||||||
Distribution rep.: http://fedora-riscv.tranquillity.se/repos-dist/
|
Distribution rep.: http://fedora.riscv.rocks/repos-dist/
|
||||||
Koji internal rep.: http://fedora-riscv.tranquillity.se/repos/
|
Koji internal rep.: http://fedora.riscv.rocks/repos/
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
Loading…
Reference in New Issue