LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-02-2015, 05:05 PM   #1
bjozsa
LQ Newbie
 
Registered: Feb 2004
Location: Raleigh, NC
Posts: 5

Rep: Reputation: 0
Help regarding automatic installation via Kickstart for CentOS 7


Hey everyone...I could use a little bit of help.

I am trying to create a kickstart file to automatically build a CentOS 7 image (using virt-install) for Openstack. I keep running into the anaconda text menu, and I am trying to build an unattended installation. The menu always interrupts the installation and requires user input. It's been a long time since I've worked with Kickstart files.

Here's my .ks file:
Code:
# version RHEL7
install

# from where
url --url=http://mirrors.kernel.org/centos/7/os/x86_64

# language
lang en_US.UTF-8

# keyboard
keyboard --vckeymap=us --xlayouts='us'

# clear the MBR (Master Boot Record)
zerombr yes

# because nobody disagrees to a eula
eula --agreed
services --enabled=NetworkManager,sshd
reboot

# security? (seriously change this later)
firewall --disabled
selinux --disabled

# timezone
timezone America/New_York

# bootloader
bootloader --location=mbr --append="console=tty console=ttyS0 notsc"

# disk partitioning
clearpart --all --initlabel
part / --fstype=ext4 --size=1 --grow

# power off after installation
poweroff

# root password
rootpw openstack

packages nobase
@core
@server-policy
cloud-init
cloud-utils
cloud-utils-growpart
vim-enhanced
screen
end


%post                                                                                                                                                                                 
# set eth0 to recover from dhcp errors                                                                                                                                                  
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF                                                                                                                                  
DEVICE="eth0"                                                                                                                                                                           
BOOTPROTO="dhcp"                                                                                                                                                                        
ONBOOT="yes"                                                                                                                                                                            
TYPE="Ethernet"                                                                                                                                                                         
USERCTL="yes"                                                                                                                                                                           
PEERDNS="yes"                                                                                                                                                                           
IPV6INIT="no"                                                                                                                                                                           
PERSISTENT_DHCLIENT="1"                                                                                                                                                                 
EOF                                                                                                                                                                                     
                                                                                                                                                                                        
# eth1...the "other" interface                                                                                                                                                              
cat > /etc/sysconfig/network-scripts/ifcfg-eth1 << EOF                                                                                                                                  
DEVICE="eth1"                                                                                                                                                                           
BOOTPROTO="dhcp"                                                                                                                                                                        
ONBOOT="yes"                                                                                                                                                                            
TYPE="Ethernet"                                                                                                                                                                         
USERCTL="yes"                                                                                                                                                                           
PEERDNS="yes"                                                                                                                                                                           
IPV6INIT="no"                                                                                                                                                                           
PERSISTENT_DHCLIENT="1"                                                                                                                                                                 
EOF                                                                                                                                                                                     
                                                                                                                                                                                        
# invite packer to the fun                                                                                                                                  
/usr/bin/yum -y install sudo                                                                                                                                                            
/usr/sbin/groupadd packer                                                                                                                                                               
/usr/sbin/useradd packer -g packer -G wheel                                                                                                                                             
echo "packer"|passwd --stdin packer                                                                                                                                                     
echo "packer        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers.d/packer                                                                                                             
chmod 0440 /etc/sudoers.d/packer                                                                                                                                                        

# drop the mic, we out
yum clean all

%end
EDIT: After a little bit of research, it seems I might have to download the mirror.centos.org/centos-7/7.1.1503/os/x86_64/ directory, place it somewhere and edit the isolinux.cfg file in order to make this work. Is that right?

Last edited by bjozsa; 08-02-2015 at 05:36 PM.
 
Old 08-07-2015, 08:45 AM   #2
Cebrian
LQ Newbie
 
Registered: Jul 2015
Location: Barcelona, Spain
Distribution: CentOS
Posts: 12

Rep: Reputation: Disabled
The menu always interrupts the installation and requires user input.

¿Which input is required? - Maybe you need to provide more information on the kickstart.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos Kickstart Installation Error kamran.ayub Linux - Software 2 04-07-2015 10:16 PM
[SOLVED] kickstart installation centos http rajesh00749 Linux - Newbie 1 09-29-2013 09:42 PM
Centos 6.4 kickstart installation not working rootr9 Linux - General 1 09-24-2013 03:55 AM
Kickstart installation problems with CentOS 5.2 triley Linux - General 3 10-21-2008 12:37 PM
CentOS kickstart installation with nodefaults shubb Linux - Distributions 3 10-13-2008 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration