Kickstart Issues

General support questions
Post Reply
sfrazier1111
Posts: 4
Joined: 2019/02/13 14:08:18

Kickstart Issues

Post by sfrazier1111 » 2019/02/13 14:28:52

I have cobbled together a somewhat workable ks.cfg file that mostly works. In particular I have some things that does not work. I am sure it's syntax or perhaps I can't do what I am trying in a kickstart.cfg file. I have attached it and put comments on what doesn't work. For example, I am trying to limit the number of kernels I want to keep in the /etc/yum.conf file:

### Trying to set the limit to "2" from "5" --- doesn't work
sed -i 's/installonly_limit=5/installonly_limit=2/g' /etc/yum.conf

It doesn't change

Trying to install a MariaDB repo file and then install MariaDB, doesn't work:

### Trying to do yum -y update --- doesn't work
repo --name=updates

Code: Select all

%post
yum update -y

### Trying to install MariaDB Repo --- doesn't work

Code: Select all

%post
/usr/bin/curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
### Trying to install MariaDB after I set up the repo above which --- doesn't work

Code: Select all

%post
yum install MariaDB-server MariaDB-client

### Trying to install phpMyAdmin --- doesn't work
[code]%post
yum install phpMyAdmin
-y
###Trying to enable MariaDB --- doesn't work

Code: Select all

%post
systemctl enable mariadb
systemctl start mariadb
Attachments
Myks.cfg.txt
(4.12 KiB) Downloaded 51 times

tomkep
Posts: 38
Joined: 2018/04/25 13:30:50

Re: Kickstart Issues

Post by tomkep » 2019/02/13 18:18:35

I am using sed in %post script without a problem. Have you installed sed package? What is the error logged for sed invocation?

I am doing:

Code: Select all

set -x
exec >& /root/post.log
at the very beginning of my %post script to get the idea about what is going on and see any failures.

As for extra repositories I am also using them pretty extensively and they just work.

I have:

Code: Select all

repo --name=updates     --baseurl=http://install.example.com/install/linux/centos/$releasever/updates/$basearch
to always install the latest available updates during the installation step (which renders 'yum -y update' in %post completely unnecessary).

I also have

Code: Select all

repo --name=epel     --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch
and add any extra packages to %packages section and they are installed automagically by anaconda as well.

sfrazier1111
Posts: 4
Joined: 2019/02/13 14:08:18

Re: Kickstart Issues

Post by sfrazier1111 » 2019/02/14 16:21:30

Thanks, I am trying your suggestions now. I appreciate your help.

Post Reply