LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2010, 05:12 AM   #1
brucewagner
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Automated Remote Installs of Ubuntu using Kickstart


Help!* I desperately need some advice / help...

I want an automated install (via CD or USB) of Ubuntu 10.04 ...on 100 remote machines located all over the country, using a Kickstart configuration file accessible from my web server.

How do I create the boot CD (or USB)?

How do I specifically add the boot parameters to that boot CD (or USB) to tell it the URL to use for it's automated Kickstart install?
 
Old 04-18-2010, 08:56 AM   #2
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 370
Blog Entries: 8

Rep: Reputation: 85
why do you need to feedback to Kickstart?.

can't you customize the cd/usb to start your way, after a reboot of the remote machine(s)?.
 
Old 04-26-2010, 09:10 AM   #3
brucewagner
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pierre2 View Post
why do you need to feedback to Kickstart?.

can't you customize the cd/usb to start your way, after a reboot of the remote machine(s)?.
I don't need to "feed back" to Kickstart. I need / want to maintain the Kickstart files on my own server. This way I can maintain the information contained therein.

For example, if a user moves and thus changes her time zone. I can maintain that information.

Then, every time she reinstalls, she gets the correct Kickstart configuration info from the file I maintain for her on my server.

Make sense?
 
Old 08-19-2010, 01:39 PM   #4
alinas
Member
 
Registered: Apr 2002
Location: UK, Sywell, EGBK
Distribution: RHEL, SuSE, CentOS, Debian, Ubuntu
Posts: 60

Rep: Reputation: 20
automated kickstart install of ubuntu (part1)

Checklist:
Prepare the configuration server:
Install packages
Configure DHCP and TFTP to provide pxe-boot image files
Configure lighttpd to serve operating system files
Prepare kickstart configuration file
Start client; intercept boot and request net boot

Note: the steps below expect all servers (dhcp, tftp and web) to be on the same physical machine, here: 192.168.1.100. Both the installation server, and anticipated clients are Ubuntu machines.

----------------------
Step 1.
(a) Install dhcp3 server. This will provide the initial network boot, for the client's PXE start.

$ sudo apt-get install dhcp3-server

(b) Edit its configuration.
Add the subnet info, leave all other elements of the file as they are.

$ sudo vi /etc/dhcp3/dhcpd.conf
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "example.com";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.111 192.168.1.222;
option domain-name-servers 212.135.1.36; # your DNS server
option domain-name "internal.example.com"; # your domain name
option routers 192.168.1.254; # your gateway
option broadcast-address 192.168.1.255;
filename "pxelinux.0";
}

(c) Start dhcp server.
$ sudo /etc/init.d/dhcp3-server start


----------------------
Step 2.
(a) Install tftpd-hpa (and its super-daemon, inetd):
$ sudo apt-get install openbsd-inetd tftpd-hpa

(b) Modify the main tftp setup file, in /etc/default/tftpd-hpa, to have the content as shown.
$ sudo vi /etc/default/tftpd-hpa
TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/srv/tftp”
TFTP_OPTIONS=”--secure”
TFTP_ADDRESS=”192.168.1.100:69”

The address above is the IP address of your tftp server.

(c) Start the inetd superdaemon
$ sudo /etc/init.d/openbsd-inetd start
Starting internet superserver inetd [ OK ]

(d) Check the tftpd is now active:
$ netstat -a | grep tftp
udp 0 0 *:tftp *:*

----------------------
Step 3.
Copy the netboot files into the tftp server. (Check lftp is there, if not – install it, with sudo apt-get install lftp).
$ sudo mkdir -p /srv/tftp/
$ cd /srv/tftp/
$ sudo lftp -c “open http://archive.ubuntu.com/ubuntu/dis...ages/netboot/; mirror”

----------------------
Step 4.
(a) Edit /srv/tftp/pxelinux.cfg/default and change string menu.cfg into text.cfg.
After the change, the file should look as follows:

include ubuntu-installer/i386/boot-screens/text.cfg
default ubuntu-installer/i386/boot-screens/vesamenu.c32
prompt 0
timeout 0


(b) Modify the /srv/tftp/ubuntu-installer/i386/boot-screens/text.cfg file to have the following content:

timeout 1
default auto
label auto
menu label ^Auto
menu default
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz ks=http://192.168.1.100/ubuntu/ks.cfg -- quiet



----------------------
Step 5.
(a) Install lighttpd (may need to stop apache first, if running).
$ sudo /etc/init.d/apache2 stop # if running
$ sudo apt-get install lighttpd

(b) Ensure that the root directory is /srv/www (the default /var/www could be used, but we follow proper FHS rules here ;-). This will serve all installation files. The url directive in the kickstart file will direct the installation program to this web page.
$ sudo vi /etc/lighttpd/lighttpd.conf
change the document-root directive to read as follows:
server.document-root = "/srv/www/"

(c) Start lighttpd
$ sudo /etc/init.d/lighttpd start

----------------------
Step 6.
Populate the the web server with the installation files.

Here, we will get the installation files from the Ubuntu installation CD (assumes Ubuntu installation CD is in the drive on the server machine, and mounted).

$ sudo mkdir /srv/www/ubuntu
$ sudo cp -rv /dev/sr0/* /srv/www/ubuntu

(time for a cuppa)
 
Old 08-19-2010, 01:41 PM   #5
alinas
Member
 
Registered: Apr 2002
Location: UK, Sywell, EGBK
Distribution: RHEL, SuSE, CentOS, Debian, Ubuntu
Posts: 60

Rep: Reputation: 20
automated kickstart install of ubuntu (part 2)

----------------------
Step 7.
Create a text file called ks.cfg with the kickstart instructions, and place it in the /srv/www/ubuntu directory.
Notice that /srv/tftp/ubuntu-installer/i386/boot-screens/text.cfg is pointing at this file.

#platform=x86

#System language
lang en_UK
#Language modules to install
langsupport en_UK
#System keyboard
keyboard gb # not uk !
#System mouse
mouse
#System timezone
timezone Europe/London
#Root password
rootpw --disabled
#Initial user
user student --fullname "Student User" --iscrypted --password $1$TbZtLDPw$YG89LpNillhOvTH4zeEse/
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation - provide the URL of your web server
url --url http://192.168.1.100/ubuntu
#cdrom
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext3 --size 10000000 # --grow failed for me ;-(
part swap --size 512
part /lvm --fstype lvm --size 512
#System authorization information
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
%packages # comment out needed packages, or add new
openssh-server
# ubuntu-vm-builder
# libvirt-bin
# screen
%pre
%post

perl -pi -e "s/kickseed/myserver/g" /etc/hosts /etc/motd
perl -pi -e "s/ubuntu/myserver/g" /etc/hosts /etc/motd

cat > /etc/hostname << EOF
myserver
EOF

cat >> /etc/hosts << EOF
192.168.1.10 myserver.example.com myserver
192.168.1.11 yourserver.example.com yourserver
192.168.1.12 herserver.example.com herserver
EOF

# any other post-installation shell command(s) can go here

This concludes server configuration.


----------------------------
Step 8. Finally, on the client:

Boot, intercept the booting process and enter BIOS. Change the sequence of boot devices, and select network boot.

Ideally, you want to identify a separate key, like F12 on some machines, which request PXE boot without you changing the boot sequence. This will prevent repeated boots as the machine restarts after the installation.

Last edited by alinas; 08-20-2010 at 03:56 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
kickstart installs with mutiple nfs servers perlabsrat Linux - General 7 05-09-2008 10:18 AM
automated remote command execution using telnet sharad Linux - General 1 01-17-2007 01:59 AM
Automated execution of a command on a remote system via SSH GUIPenguin Linux - General 1 03-01-2006 12:23 AM
Automated linux installaton through kickstart? balajichandrasekar Linux - General 2 12-13-2005 05:26 PM
Kickstart installs on ia64 fail if partition table is changed during install da_kidd_er Linux - Newbie 0 11-23-2004 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration