1 / 13

Automated installations /kickstarts

Automated installations /kickstarts. Objectives Creating automated installations Contents Auto install variants AutoYast XML file configuration autoinst.xml Server Configuration Auto install with SuSE CD1 Making your own Autoyast Boot CD Booting with Autoyast boot CD Practicals

raoul
Download Presentation

Automated installations /kickstarts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automated installations /kickstarts • Objectives • Creating automated installations • Contents • Auto install variants • AutoYast • XML file configuration autoinst.xml • Server Configuration • Auto install with SuSE CD1 • Making your own Autoyast Boot CD • Booting with Autoyast boot CD • Practicals • Perform one kickstart installation • Summary

  2. Autoinstall variants • There are several ways to perform unattended installations: DISK IMAGE DISK IMAGE + CONFIG CD + XML CD + FLOPPY +XML Full PXE boot FLOPPY + XML + NET CD + XML + NET CD + NET FLASH stick + XML + NET and many more…. • You can use almost any protocol: ftp, nfs, http, ssh, smb and tftp. • Most popular is CD + XML + NET and CD + NET • This demands only the install server sharing files and autoyast plus possible SLP and DHCP server • This is used in small to medium size companies and organizations • Next most popular is Full PXE boot • This demand all of the above plus tftp boot server, which is many step to setup • This is used in enterprice larger companies and organizations • The variant of CD + XML on floppy • Is nice to have for single setups, special servers and clients. • Post RSYNC configuration • Used in enterprice and other system after installation is performed to add special configuration and install appz.

  3. AutoYAST toolkit • AutoYast can be used to make install configuration data. • AutoYast is used to inform the installing client where to get the configuration data, as kernel argument at boot. • Autoyast fileformat is plain XML (Extended Markup Language) defult placeholder is /var/lib/autoinstall/repository • You can edit the .xml directly with texteditor of your choise • Autoyast can import RedHat kickstart .ks files and other kickstarts. (anaconda.ks) • Choose to open file and import • Once you have created the kickstart configuration file you can copy it to: • A directory on the install server • A boot diskette or CD/DVD • A regular Linux diskette # yast autoyast Boot Options: autoyast=nfs://server.net05.se/xml-install/autoinst.xml

  4. AutoYAST settings for clients • Autoyast will try to probe and install proper modules as well as solve dependencies. • All unconfigured modules will recieve standard settings. • There are however sections that need some information: 1. Software Package selection This set the system mandatory standards 2. Hardware Partitioning At least one device like /dev/hda or /dev/sda 3. System general options Language, Keyboard, TZ, Mouse Confirm installation ? = NO Start System without Reboot = YES 4. System services default runlevel (depend on step 1) 5. Network devices at least dhcp (if not set, device will be disabled after install) 6. Security and User you need at least local root and one local user • There are however sections that need some information: # yast autoyast

  5. The autoyast XML file name conventions • After doing your configuration it is time to save the settings, the result will be an XML file • As standard this file does not have any name, you have to give it an proper name: If you use a filename like: my-host.xml then you must give exact path as kernel argument at boot: autoyast=ftp://server.com/inst-conf/my-host.xml If you give kernel argument autoyast=default and the file autoinst.xml then autoyast will try to find this file here: local client floppy (you can copy it to a floppy) installation root (usally the local CD-rom) initial ram disk (loaded from initrd) • If you give the path to the XML file only, • then autoyast will search for a file with name = IP address of client in hexadecimal form. • Using the command gethostip you can get the hex representation of filename: • If this is not found, autoyast will try with same name exept one digit less: • And continue removing digits until it is found, if not it will then try the MAC address of client and lastly it tries the name default autoyast=ftp://server.com/inst-conf/ # gethostip 192.168.1.55 192.168.1.55 192.168.1.55 C0A80137 C0A8013 C0A80 C0A C0A801 C0A8 C 005022E3A7DC C0

  6. Copying The XML File To A Floppy • The file should have the name ”autoinst.xml" or names like previous page • Should be placed in the top directory of the diskette. • As most floppyes are in MSDOS format you will have to use the "mcopy" command to copy the file: • The kickstart process will fail to read your configuration file if you just use the regular "cp" command. • Copying the file to a Regular Linux diskette • Now you can boot on your SuSE CD1 and have the floppy inserted. Autoyast will read the autoinst.xml on the floppy and use that configuration data. # mcopy autoinst.xml a:autoinst.xml # cp autoinst.xml /media/floppy/autoinst.xml

  7. Copying the XML To Your Kickstart Server • No when we have ”kickstart” files ready, we need to setup the server! • Any of these servers will do: NFS, FTP, HTTP, SSH, SMB, TFTP • Whether you are using NFS, HTTP or FTP for your network installation it is best to place your XML files in a directory beside the installation source directory. Common SuSE source: /export/network-install/SuSE/9.3 Or /export/network-install/SuSE/ • Remember that autoyast will look for filenames described on previous pages. • XML files does not nessesary need to rest on installation server

  8. Booting With Your Kickstart Files • This method is not fully automatic, but very practial • Allways use this methode to develop your XML files before making it fully automatic • It will save you lot of time searching for possible errors • Practical when doing sample installations, only little to enter • Boot from your boot device, the standard SuSE CD1. • When boot is done, the regular bootmenu is presented choose INSTALL • You can enter any kernel parameters as Boot Options • install= • Where are the sources ? • Allways Protocol://path/to/files Review SLP • autoyast= • Where are the XML kickstart files ? Review autoyast=default • Allways Protocol://path/to/files Boot Options: install=nfs://server.net05.se/exports/network-install/SuSE/9.3/CD1 autoyast=nfs:// server.net05.se/exports/network-install/SuSE/9.3/autoinst.xml

  9. Create a Custom Suse Autoyast Boot CD • Download the latest default suse boot.iso from any suse mirror: suse/current/boot/boot.iso • First login as root then • Preparing space for ISO tree • Mounting the downloaded boot.iso image • Copy over content from ISO image to your new ISO tree • Add/Change in your isolinux.cfg to suit your install server IP and path. This is the SySLINUX bootmanager in which we add one new way to start installation wget ftp://ftp.suse.com/pub/suse/i386/9.3/boot/boot.iso mkdir /mnt/suseisonew ; mkdir /mnt/suseiso ; cd /mnt/suseisonew mount -o loop -t iso9660 -rw /root/boot.iso /mnt/suseiso cp -pr /mnt/suseiso/* /mnt/suseisonew/ vim /mnt/suseisonew/boot/loader/isolinux.cfg

  10. Boot CD SySLINUX bootmanager settings • In top of isolinux.cfg file you find the entry default • This is the bootmanager default label to boot in 60 seconds • Change to the new label • We need to declare the new label, go to last label and after it add your new label • Label is the virtual kernel name, here autoyast • Kernel is the real name for our kernel to boot, here linux • Append is the kernel attribute, what kernel should do, here: Initrd, ramdisk, dhcp and install, autoyast is declared showopts will show the kernel attribute line, more easy to change NOTE! Append must be ONE line, here it is broken just to make it more easy to see it! Also note that we use my-host.xml as configuration for the client default autoyast # autoyast label autoyast kernel linux append initrd=initrd ramdisk_size=65536 showopts ip=dhcp install=nfs://192.168.1.60/exports/network-install/SuSE/9.3/CD1 autoyast=nfs://192.168.1.60/exports/network-install/SuSE/9.3/my-host.xml

  11. Making the bootable ISO image from sourcetree • Making the bootable ISO image • You make the ISO image from your sourcetree -r Rock Ridge protocol -o /tmp/bootcd.iso our ISO file -b bootloader image file -c boot directory -no-emul-boot for eltorito -boot-load-size number of 512 byte sectors to load for bootloader -boot-info-table el-torito cd layout specification /mnt/suseisonew/ our source tree to become ISO image! Note! The mkisofs is broken for visibility, it must in one line! • Unmount ISO image • Your ISO image is now resting here: /tmp/bootcd.iso • Now it is left to burn the ISO image to a CD-ROM ! # cd /mnt/suseisonew # mkisofs -r -o /tmp/bootcd.iso \ -b boot/loader/isolinux.bin \ -c boot.cat \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ /mnt/suseisonew/ umount /mnt/suseiso

  12. Booting With Your Autoyast Boot CD • Boot the client with Autoyast boot CD! • Just sit and wait, the standard splash screen arrives • After splash screen the standard bootmenu arrives with your new label • You can see your boot options if using my isolinux.cfg • The counter counts down to zero, then your label is booting • The installation now starts and continues fully automatic • This is called KICK STARTING or JUMP STARTING with CD • Very common in Unix workstation enviroment • Comfortable to setup large enviroments fast • Easy to maintain centrally • In the netadmin class we look at PXE boot • No bootCD or floppy is needed at all ps

  13. Booting from FLASH stick • boot.iso is 54MByte, that is to large for some cheap sticks • We will make bootimage from bootfloppies, as root: • Merge the images to one image and mount the image: • Edit the syslinux.cfg bootmanager with your new label, like for the CD before: • Unmount and apply syslinux IMPORTANT! To know what devicename your flash stick has: lsscsi # mkdir /mnt/myflash ; cd # mkbootdisk /media/SUSE930_F01 # mkfs.msdos /dev/sda1 or mkfs.vfat /dev/sda1 # cat bootdsk? >/tmp/bootdisk # mount -oloop /tmp/bootdisk /mnt/myflash default autoyast # autoyast label autoyast kernel linux append initrd=initrd ramdisk_size=65536 showopts ip=dhcp install=nfs://192.168.1.60/exports/network-install/SuSE/9.3/CD1 autoyast=nfs://192.168.1.60/exports/network-install/SuSE/9.3/my-host.xml # umount /mnt/myflash # syslinux /dev/sda1

More Related