[CentOS] How to avoid "firstboot" in CentOS 7 kickstart

Valeri Galtsev galtsev at kicp.uchicago.edu
Wed Jan 11 16:00:12 UTC 2017


On Wed, January 11, 2017 9:36 am, Gordon Messmer wrote:
> On 01/11/2017 05:22 AM, Tru Huynh wrote:
>> %post
>> # workaround required but should be handled by anaconda. imho
>> systemctl disable initial-setup-graphical.service
>

First of all, thanks everybody who answered, I'm going through all your
suggestions - nothing to report yet (just started this morning, each
kickstart install takes time...)

>
> Has this been tested?  My understanding is that systemctl doesn't work
> in chroots, and can't be used in %post.
>
> Regardless of that, the graphical initial setup on 7.3 is probably
> provided by gnome-initial-setup under GDM, not by
> initial-setup-graphical at all.

Not as an argument, but just to mention (as I don't know how relevant it
is). I switched to runlevel 3 (sorry for using old terminology...) in the
postinstall kickstart section as follows:

# blasted new way of setting default runlevel
systemctl set-default multi-user.target

So, after kickstart it indeed boots into runlevel 3 (i.e. systemctl
command worked for me in postinstall section). Yet, first time booting
(even into runlevel 3) gives me the same firstboot choices (TUI though
instead of GUI that was in runlevel 5). Note, that this all was before I
tried any of your suggestions (Thanks again, Tru, Gordon, and everybody
else who replied!!)

Valeri

>  The only way I've been able to disable
> it is to remove that rpm entirely, which means that new users also don't
> get the initial-setup prompts when they log in for the first time.
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



More information about the CentOS mailing list