-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathodroid-base-ks.cfg
114 lines (102 loc) · 2.94 KB
/
odroid-base-ks.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# System authorization information
auth --enableshadow --passalgo=sha512
# Shutdown after installation
shutdown
# Use network installation
url --url="http://csc.mcs.sdsmt.edu/fedora/linux/releases/$releasever/Everything/armhfp/os"
repo --name="updates" --baseurl=http://csc.mcs.sdsmt.edu/fedora/linux/updates/$releasever/armhfp
repo --name="smd-odroid" --baseurl=http://csc.mcs.sdsmt.edu/smd-odroid/fedora/linux/$releasever/armhfp
repo --name="smd-pub" --baseurl=http://csc.mcs.sdsmt.edu/smd-pub/fedora/linux/$releasever/armhfp
# Firewall configuration
firewall --disabled
firstboot --disable
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --ipv6=auto --activate
# Root password
rootpw --plaintext odroid
# SELinux configuration
selinux --disabled
# System services
services --disabled="auditd,avahi-daemon,bluetooth,chronyd,firewalld,lm_sensors,network,ntpdate,pcscd,sendmail,smartd,sm-client" --enabled="NetworkManager,sshd"
# Do not configure the X Window System
skipx
# System timezone
timezone America/Denver --isUtc
# System bootloader configuration
bootloader --append="quiet" --location=none
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part /boot/uboot --asprimary --fstype="vfat" --size=31 --fsoptions="umask=0077,shortname=winnt"
part / --fstype="ext4" --size=1503
%post --logfile /var/log/anaconda/post-install.log
#!/bin/bash
echo "Importing GPG keys..."; (
for i in /etc/pki/rpm-gpg/RPM-GPG-KEY-*; do /usr/bin/rpm --import $i; done
)
echo "Setting UUID in boot.ini..."; (set -e
ROOT_UUID=$(blkid `mount | grep "on / " | awk '{ print $1 }'` | awk '{ print $2 }' | sed 's/"//g')
sed -i "s/\/dev\/mmcblk0p2/$ROOT_UUID/" /boot/uboot/boot.ini
)
echo "Updating mlocate db..."; (
/usr/bin/updatedb
)
echo "Flagging rootfs resize on first boot..."; (
touch /.rootfs-repartition
)
echo "Adding additional space for u-boot..."; (set -e
UBOOT_MOUNT_POINT=/boot/uboot
UBOOT_PART=`mount | grep "on $UBOOT_MOUNT_POINT " | awk '{ print $1 }'`
UBOOT_PART_NUM=`echo $UBOOT_PART | rev | sed 's/^\([0-9]*\)[p]\{0,1\}\(.*\)/\1/' | rev`
UBOOT_DEVICE=`echo $UBOOT_PART | rev | sed 's/^\([0-9]*\)[p]\{0,1\}\(.*\)/\2/' | rev`
UBOOT_UUID=`blkid $UBOOT_PART -s UUID | sed 's/.*: UUID="\([0-9a-zA-Z\-]*\)"/\1/' | sed 's/-//g'`
mkdir -p /tmp/boottemp
cp -a $UBOOT_MOUNT_POINT/* /tmp/boottemp/
umount $UBOOT_PART
set +e
fdisk $UBOOT_DEVICE << EOF
d
$UBOOT_PART_NUM
n
p
$UBOOT_PART_NUM
4096
t
$UBOOT_PART_NUM
6
w
EOF
set -e
kpartx -u $UBOOT_DEVICE
mkfs.vfat -i $UBOOT_UUID $UBOOT_PART
mount $UBOOT_PART $UBOOT_MOUNT_POINT
cp -a /tmp/boottemp/* $UBOOT_MOUNT_POINT/
)
%end
%packages
chrony
htop
kpartx
mlocate
ntpdate
openssh-clients
rootfs-resize
rsyslog
smd-odroid-release
vim
wget
-abrt*
-dracut-config-rescue
-kernel
-kernel-core
-kernel-modules
-kernel-modules-extra
-libreport
-setroubleshoot
%end