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 .. Cheers Tru -- Tru Huynh http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20170111/1acd605d/attachment-0001.sig>
Gordon Messmer
2017-Jan-11 15:36 UTC
[CentOS] How to avoid "firstboot" in CentOS 7 kickstart
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.serviceHas 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.
> Has this been tested? My understanding is that systemctl doesn't work in > chroots, and can't be used in %post.I've certainly used it that way in Fedora. chroot /mnt/systemimage systemctl --no-reload disable ...
Valeri Galtsev
2017-Jan-11 16:00 UTC
[CentOS] How to avoid "firstboot" in CentOS 7 kickstart
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 ++++++++++++++++++++++++++++++++++++++++