How To Avoid “firstboot” In CentOS 7 Kickstart

Home » CentOS » How To Avoid “firstboot” In CentOS 7 Kickstart
CentOS 6 Comments

Dear Experts,

Sorry about taking shortcut and asking everybody…

My question is: how do you avoid “firstboot” screen in latest CentOS 7.3
kickstart.

I have installed about a dozen of CentOS 7 (none of which was 7.3) with that kickstart file. None of them ever went to firstboot screen on first boot. Now after kickstart installation of CentOS 7.3 it goes into firstboot screen showing two configuration options:

1. [x] License information
(license accepted)

2. [ ] User creation
(no user will be created

Please, make your choice from the above { quit, continue or refresh }

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

(I always were creating one regular user in a post install section, which I do have in this KS file, and that user is successfully created)

Thanks for all your help!

Valeri

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

6 thoughts on - How To Avoid “firstboot” In CentOS 7 Kickstart

  • 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. 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.

  • 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…)

    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

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

  • 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

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

LEAVE A COMMENT