One-keystroke system installation and configuration

Slides:



Advertisements
Similar presentations
DHCP -Ameeta and Haripriya -cmsc 691x. DHCP ► Dynamic Host Configuration Protocol ► It controls vital networking parameters of hosts with the help of.
Advertisements

1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
Linux Booting Procedure
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
PXE netboot installation of Linux/SuSE
Linux+ Guide to Linux Certification, Second Edition
Creating a [legacy & EFI] PXE server using pxelinux
Leveraging WinPE and Linux Preboot for Effective Provisioning Jonathan Richey | Director of Development | Altiris, Inc.
Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the.
Exploring the UNIX File System and File Security
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
1 Web Server Administration Chapter 3 Installing the Server.
Installation. Installation   There are three phases to building an LTSP server: – –Installing the LTSP utilities – –Installing the LTSP client packages.
Guide To UNIX Using Linux Third Edition
Installing Windows Deployment Service
Chapter 31 File Transfer & Remote File Access (NFS)
DHCP server & Client Objectives Contents
Installing and maintaining clusters of FreeBSD servers using PXE and Rsync Cor Bosman XS4ALL
Guide To UNIX Using Linux Fourth Edition
DHC P Dynamic Host Configuration Protocol
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Network Installation Objectives –Manage linux installation from network install server Contents –Preparing for a network installation –Setting up the install.
DHCP server & Client Objectives –to learn how to setup dhcp servers Contents –Download and Install The DHCP Package –The /etc/dhcpd.conf File –Upgrading.
Enabling Palacios PXE-Boot Chen Jin Bharath Pattabiraman Patrick Foley.
Chapter Two Exploring the UNIX File System and File Security.
Scott Drucker, Systems Engineer Migrating to Microsoft Vista with WinINSTALL.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
INFSO-RI Enabling Grids for E-sciencE Installation of an APT+kickstart server Giuseppe Platania INFN Catania EMBRACE Tutorial Clermont-Ferrand,
CHAPTER 2. Overview 1. Pre-Installation Tasks 2. Installing and Configuring Linux 3. X Server 4. Post Installation Configuration and Tasks.
Kickstart Installation
C. Aiftimiei, E. Ferro / January LCFGng server installation Cristina Aiftimiei, Enrico Ferro INFN-LNL.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File-System Interface.
Linux Operations and Administration
The 2001 Tier-1 prototype for LHCb-Italy Vincenzo Vagnoni Genève, November 2000.
Chapter 38 Initialization & Configuration. Bootstrapping occurs during boot up to obtain boot program which may then load operating system may use network.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
MREPO: Yum/Apt repository kickstart installation via PXE GIUSEPPE PLATANIA INFN Catania I Corso di formazione INFN.
PXEBOOT. What is PXEBOOT. The Preboot Execution Environment (PXE) is a service, Establish client/server communication and it will install the OS to the.
Operated by Los Alamos National Security, LLC for NNSA U N C L A S S I F I E D Slide 1 Institutional Install of Red Hat Enterprise Linux From One CD In.
© 2007 IBM Corporation 9/26/2016 Automated Generation of Kickstart Files IBM.
© 2007 IBM Corporation 9/29/2016 Automated Generation of Kickstart Files IBM.
1 Remote Installation Service Windows 2003 Server Prof. Abdul Hameed.
Automated installations
Dynamic Host Configuration Protocol
BY: SALMAN 1.
Andrea Chierici Virtualization tutorial Catania 1-3 dicember 2010
Operating System Kernel Compilation
Guide to Linux Installation and Administration, 2e
BY: SALMAN.
LINUX ADMINISTRATION
DHCP server & Client Objectives Contents
linux and related thing
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
Diskless Remote Boot Linux
Introduction to Networking
PXE+Kickstart.
TCP/IP Networking An Example
Operating System Kernel Compilation
Exploring the UNIX File System and File Security
OPS235 Install and Configure a DHCP Server
Installing Linux Redhat:
SUSE Linux Enterprise Desktop Administration
Quattor Advanced Tutorial, LAL
Lecture9: Embedded Network Operating System: cisco IOS
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

One-keystroke system installation and configuration Don Law FLUX May 2010 slides are at flux.donlaw.com

Introduction(s)

Outline Brief Introduction to Pre eXecution Environment (PXE) Brief Introduction to Dynamic Host Configuration Protocol Brief Introduction to Trivial File Transfer Protocol (TFTP) Brief Introduction to PXELINUX Brief Introduction to Desktop Management Interface (DMI) Brief Introduction to Initial Ramdisk (initrd) RedHat Kickstart

Do you have an IP address for me? F12/bios PXE DHCP server Yes, and a filename: pxelinux.0 Request pxelinux.0 via TFTP TFTP server Pxelinux.0 contents

Do you have an IP address for me? F12/bios PXE DHCP server Yes, and a filename: pxelinux.0 Request pxelinux.0 via TFTP TFTP server Pxelinux.0 contents PXELINUX Request PXELINUX configuration PXELINUX configuration via TFTP Request Linux kernel/initrd via TFTP Linux kernel and initrd contents

Do you have an IP address for me? F12/bios PXE DHCP server Yes, and a filename: pxelinux.0 Request pxelinux.0 via TFTP TFTP server Pxelinux.0 contents PXELINUX Request PXELINUX configuration PXELINUX configuration via TFTP Request Linux kernel/initrd via TFTP Linux kernel and initrd contents Linux kernel and kickstart HTTP server Request kickstart configuration via HTTP Kick start configuration/installation files

You should know ... Free and Open-Source tools are available to help you automate much of the work in this talk.

You should know ... Free and Open-Source tools are available to help you automate much of the work in this talk. But if you use it you won't learn as much. https://fedorahosted.org/cobbler/ http://www.ultimatedeployment.org

Brief Introduction to PXE Preboot Execution – it runs before any loads from disk De facto standard from Intel – specification is at http://download.intel.com/design/archive s/wfm/downloads/pxespec.pdf The BIOS has to configure a NIC and use it Can be in the BIOS of the NIC

Brief Introduction to PXE Does three tasks: Configure an IP address Get a filename TFTP that into memory and jump to it Also provides run-time services to the loaded program

PXE screenshot

PXE screenshot

Brief Introduction to DHCP Dynamic Host Configuration Protocol Method to introduce a computer and a network Obtain IP address usable on the network As well as router and DNS configuration Useful when you have more computers than IP addresses Each systems gets a “lease” on an IP address

Brief Introduction to DHCP Dynamic Host Configuration Protocol Method to introduce a computer and a network

DHCP: How it works Use the network to obtain an IP address But you need an IP address to use the network! Solution: Ultimate broadcast address, 255.255.255.255 Routers will not pass packets with this target

DHCP: How it works Use the network to obtain an IP address But you need an IP address to use the network! Solution: Ultimate broadcast address, 255.255.255.255 Routers will not pass packets with this target dhcpd listens for broadcasts to 255.255.255.255 Replies with an offer of an IP address lease Along with other network information RFC 2131 for IPv4, RFC 3315 for IPv6

DHCP request on the wire

On the wire – request parameters

DHCP: Setting up a server Open source from ISC http://www.isc.org/software/dhcp Highly likely to be packaged for your distribution yum install dhcp Edit /etc/dhcpd.conf

DHCP: /etc/dhcpd.conf Parameters can be global, subnet-specific, or host-specific Specify network to serve Range of IP addresses to lease out Default router (option routers) File to upload (filename) Server to get file from (next-server)

DHCP: /etc/dhcpd.conf Edit the file (see next slide) Start the server See what you did wrong

DHCP: Starting the server # See man dhcpd.conf subnet 192.168.120.0 netmask 255.255.255.0 { range 192.168.120.150 192.168.120.199; option routers 192.168.120.120; filename "pxelinux.0"; next-server 192.168.120.120; } service dhcpd start chkconfig --levels 345 dhcpd on

DHCP: The offer on the wire

Brief Introduction to TFTP Like FTP for microcontrollers FTP TFTP RFC is 3120 lines Requires TCP Requires multiple connections Requires authentication RFC1350 is 472 lines Requires UCP No connection (lock step ack) No authentication Simplified directories

Setting up a TFTP server http://www.kernel.org/pub/software/network/tftp yum install tftp-server In /etc/xinet.d/tftp: Change “disable=yes” to “disable=no” Make note of server_args: server_args -s /var/lib/tftpboot If not already done: service xinetd start chkconfig --levels 345 xinetd on

Brief Introduction to PXELINUX In the same family as SYSLINUX and ISOLINUX Doesn't contain Linux Only job is to load and start a Linux kernel http://syslinux.zytor.com http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.86.tar.gz tar -xzf syslinux-3.86.tar.gz cp syslinux-3.86/core/pxelinux.0 \ /var/lib/tftpboot

Configuration of PXELINUX Obviously, you can't configure it with config files on the target system. PXELINUX “phones home” to the IP address it loaded from and looks for a remote config file via TFTP Searches in pxelinux.cfg directory from most specific to least specific file based on MAC and then IP (in hex).

Configuration of PXELINUX If the MAC address of the interface is 00:90:fb:0d:23:a0, then the first file fetched by TFTP from pxelinux.cfg will be named: 00-90-fb-0d-23-a0 If not found, and if PXELINUX was loaded on an interface with the address of 192.168.120.150, then the following files are attempted until one works: C0A87896 C0A8789 C0A878 C0A87 C0A8 C0A C0 C default

Configuration of PXELINUX The contents of the PXELINUX config file looks a lot like a GRUB config file: # This is the pxelinux config file timeout 5 prompt 1 default 1 label 1 kernel vmlinuz.centos52 append initrd=initrd.centos52 ╗ ks=http://192.168.120.120/ks/scat-ks.cfg ╗ ip=192.168.120.150 netmask=255.255.255.0

Brief Introduction to Desktop Management Interface (DMI) The OS can discover machine-specific information A standard has emerged: http://www.dmtf.org/standards/dmi Linux kernel supports the standard dmidecode is the user-level interface to the drivers http://www.nongnu.org/dmidecode Or simply: yum install dmidecode

Brief Introduction to initrd RAM disk that is present as soon as the kernel starts Commonly used to load storage device drivers Support must be compiled into the kernel (not a module)

Brief Introduction to initrd RAM disk that is present as soon as the kernel starts Commonly used to load storage device drivers Support must be compiled into the kernel (not a module) We will use it to hold user-level commands and scripts Commonly found in /boot A good starter is on the distribution CD in the isolinux directory

Brief Introduction to initrd [root@calli kickstart]# gunzip < initrd-hrvst.gz > initrd-hrvst [root@calli kickstart]# losetup /dev/loop0 $PWD/initrd-hrvst [root@calli kickstart]# mkdir hrvst [root@calli kickstart]# mount /dev/loop0 $PWD/hrvst [root@calli kickstart]# ls hrvst bin etc install linuxrc mnt pxebin sys usr dev initrd lib lost+found proc sbin tmp var [root@calli kickstart]# http://www.ibm.com/developerworks/linux/library/l-initrd.html

Automated System Inventory

Automated system inventory Script to assemble initrd Script that is run in initrd Watch out for module problems

Kickstart

Kickstart A replay-able archive of your installation choices When you install a RedHat-like distribution from CD- ROM, you make a series of choices from menus: Type of keyboard Disk layout Root password Firewall configuration Packages to install etc.

Kickstart All of your choices are stored in: /root/anaconda-ks.cfg # Kickstart file automatically generated by anaconda. install cdrom lang en_US.UTF-8 keyboard us xconfig --startxonboot network --device eth0 --bootproto static --ip 192.168.120.14 --netmask 255.255.255.0 --gateway 192.168.120.111 --nameserver 69.89.79.162,69.89.69.162 --hostname calliope.donlaw.net firewall --disabled authconfig --enableshadow --enablemd5 selinux --enforcing timezone America/New_York bootloader --location=partition --driveorder=sda,sdb --append="rhgb quiet"

Kickstart When you start a new installation, you can tell the installation process to make all its choices from the kickstart file instead of the menus. You can remake the boot disk to contain your kickstart file. You can tell the install kernel to use a kickstart file on the network. We're going to load the install kernel over the network, so we will choose the latter.

Glue PXELINUX will load a kernel We give it the install kernel from the CD-ROM PXELINUX will setup a initrd We give it the initrd that has the install scripts PXELINUX will pass the URL of the kickstart file to the kernel We will make it available via HTTP The kickstart file has the URL of the install images We mount the install media where Apache can see it

Glue [root@f12d620 ~]# cd /var/www/html/ [root@f12d620 html]# mkdir centos52 [root@f12d620 html]# mount /dev/cdrom /var/www/html/centos52 mount: block device /dev/sr0 is write-protected, mounting read-only [root@f12d620 html]# cd centos52/ [root@f12d620 centos52]# ls isolinux/ boot.cat initrd.img memtest rescue.msg vmlinuz boot.msg isolinux.bin options.msg splash.lss general.msg isolinux.cfg param.msg TRANS.TBL [root@f12d620 centos52]# cp isolinux/vmlinuz /var/lib/tftpboot/vmlinuz.centos52 [root@f12d620 centos52]# cp isolinux/initrd.img /var/lib/tftpboot/initrd.centos52 [root@f12d620 centos52]#

Demo

Questions?