Skip "Initial setup of CentOS Linux 7 (Core)" screen

General support questions
Post Reply
ehf
Posts: 8
Joined: 2015/10/23 12:05:04

Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ehf » 2015/10/23 12:10:11

After generating a fresh Centos 7 minimal virtual machine using Packer, I always see the "Initial setup of CentOS Linux 7 (Core)" screen. The two requirements for this screen, "Create user" and "License information", both have "x"s to indicate that I have already met their requirements before arriving at this screen. However, I am still required to type "c" and "enter" to continue. This happens only once right after creating the VM, so it may seem like it's not a big deal. However, the reason I'd like to bypass this is that this VM is part of a larger system of automated VM creation and deployment that is not supposed to involve any human intervention, and this is the only step in my pipeline that still requires it, so I'd like to remove it. Is there any setting in the kickstart file or any file I can modify via ssh during the Packer provisioning step that would prevent this screen from showing up on initial boot?

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by TrevorH » 2015/10/23 12:12:27

You have "eula --agreed" in your kickstart?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ehf
Posts: 8
Joined: 2015/10/23 12:05:04

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ehf » 2015/10/23 12:15:51

TrevorH wrote:You have "eula --agreed" in your kickstart?
Yes, I do, and the License information section has a "x" on it indicating that I have already accepted the license by the time I reach this screen. The only thing I need to do once I see this screen is to hit "c" to continue.

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by stevemowbray » 2015/10/23 12:19:33

Add "firstboot --disable"

ehf
Posts: 8
Joined: 2015/10/23 12:05:04

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ehf » 2015/10/23 12:55:59

stevemowbray wrote:Add "firstboot --disable"
I actually already had that in my kickstart file as well (I had forgotten to mention it in my initial post) and yet it still does not work.

ehf
Posts: 8
Joined: 2015/10/23 12:05:04

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ehf » 2015/10/23 12:59:55

Maybe I should add that as part of my Packer provisioning, I change the runlevel from 3 to 5 using the following command:

Code: Select all

systemctl enable graphical.target --force
I'm not sure if that does anything strange but maybe it's worth mentioning? I wonder if the firstboot is applied for each runlevel... I'll test that out...

ehf
Posts: 8
Joined: 2015/10/23 12:05:04

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ehf » 2015/10/23 15:25:36

ehf wrote:Maybe I should add that as part of my Packer provisioning, I change the runlevel from 3 to 5 using the following command:

Code: Select all

systemctl enable graphical.target --force
I'm not sure if that does anything strange but maybe it's worth mentioning? I wonder if the firstboot is applied for each runlevel... I'll test that out...
I tried running this command right after the above command to try to disable firstboot on runlevel 5 but it didn't end up working. I do think the solution likely lies in me disabling the firstboot task though so I will continue to test this.

Code: Select all

chkconfig --level 5 firstboot off

vikas027
Posts: 6
Joined: 2007/05/13 06:08:05

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by vikas027 » 2017/09/20 10:08:16

I use the below command in kickstart post-installation script for CentOS 1708

Code: Select all

# rpm -e initial-setup initial-setup-gui

ach
Posts: 2
Joined: 2017/11/27 11:05:53

Re: Skip "Initial setup of CentOS Linux 7 (Core)" screen

Post by ach » 2018/02/26 16:04:22

This has also been reported on the CentOS bug tracker: https://bugs.centos.org/view.php?id=7177, and turns out to be an issue with the interplay between systemd presets and the initial-setup service.

We've had to modify the workaround suggested in the above link - we ended up adding the following to our post-installation kickstart section to work around the issue

Code: Select all

# remove initial setup screen by disabling systemd service
# cf. https://bugs.centos.org/view.php?id=7177
# and https://bugzilla.redhat.com/show_bug.cgi?id=1213114
systemctl disable initial-setup-graphical.service
systemctl mask initial-setup-graphical.service
systemctl disable initial-setup.service
systemctl mask initial-setup.service

Post Reply