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

Thu Jan 12 15:23:58 UTC 2017
Valeri Galtsev <galtsev at kicp.uchicago.edu>

On Wed, January 11, 2017 7:22 am, Tru Huynh wrote:
> On Wed, Jan 11, 2017 at 04:47:49AM +0000, Ian Mortimer wrote:
>> On Tue, 2017-01-10 at 16:02 -0600, Valeri Galtsev wrote:
>>
>> > My question is: how do you avoid "firstboot" screen in latest CentOS
>> > 7.3
>> > kickstart.
>> > ...
>> > Here are relevant lines from my kickstart that I assume should have
>> > taken
>> > care of everything (in the order of their appearance, I dropped
>> > irrelevant
>> > lines):
>> >
>> > firstboot --disable
>> > eula --agreed
>>
>> You could try adding in your %packages stanza:
>>
>> -firstboot
>>
> https://bugs.centos.org/view.php?id=12584
> ...
> %post
> # workaround required but should be handled by anaconda. imho
> systemctl disable initial-setup-graphical.service

Thanks Tru!

The above placed in postinstall does disable "firstboot" - and it works
both for system configured to be booted into runlevel 5 and runlevel 3, no
matter that "...setup-graphical" intuitively suggests only runlevel 5. So
much for straight thinking when naming things these days (sorry about
runt). Incidentally, this setting does not disable introduction to the
system on first login for local logins on runlevel 5 (I probably msiread
someone's post and was under impression it will or may, so I specifically
tested whether it does or does not - it does not).

Here is my relevant part of kickstart file postinstall (with runlevel 3):

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

# turning off firstboot
# works both for runlevel 5 and runlevel 3
# does not disable introduction for local
# user when one first logs into system on runlevel 5
systemctl disable initial-setup-graphical.service
##########
%end

Thanks again, everybody, for your help!

Valeri


> ..
>
> Cheers
>
> Tru
> --
> Tru Huynh
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B
> _______________________________________________
> 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
++++++++++++++++++++++++++++++++++++++++