home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1999 November / VPR9911B.ISO / doc / README.ks next >
Text File  |  1999-04-17  |  22KB  |  597 lines

  1.  
  2. Kickstart
  3. =========
  4.  
  5. Due to the need for automated installation, Red Hat has created the
  6. "kickstart" installation method.  With this method a system administrator
  7. can create a single file that defines the answers to the questions that
  8. one would normally be asked in a regular Red Hat install.  This procedure
  9. is powerful enough that often times one kickstart configuration file can
  10. actually be used for multiple machines.
  11.  
  12. The general procedure to use kickstart is to create the kickstart file
  13. and then place that file somewhere the install can find it.  That is 
  14. on the boot media (floppy) or on the network.  The network is the most
  15. common use since kickstart is usually used on networks of machines anyway.
  16.  
  17. Kickstart is only available for the CD-ROM and NFS install methods.  You
  18. can not do FTP, local hard disk, or SMB installs with kickstart.  For
  19. a detailed kickstart config file, see doc/sample.ks on the Red Hat
  20. CD-ROM or on the FTP site.
  21.  
  22. Where to put your kickstart file
  23. --------------------------------
  24.  
  25. From Floppy
  26.  
  27. To begin a kickstart install, you must include the "ks" option at the boot
  28. prompt.  If you want to get your kickstart file from the floppy, the
  29. boot prompt command would be "boot: linux ks=floppy".  If you want to get
  30. your kickstart file from the network, you would simply do "boot: linux ks".
  31.  
  32. In the case of the floppy, the kickstart file must be named "ks.cfg" and
  33. must reside in the top level directory of the boot floppy.  The Red Hat
  34. boot floppy images are in MS-DOS format, so you should be able to easily
  35. copy the file there under Linux using the mtools 'mcopy' command.  The
  36. floppy method is most commonly used for CD-ROM kickstart installs.
  37.  
  38.  
  39. From the Network
  40.  
  41. Network installs using kickstart are common because administrators can
  42. easily automate the install of large amounts of machines in a network
  43. environment quickly and painlessly.  The general topology would be for
  44. the administrator to have a BOOTP/DHCP server as well as an NFS server
  45. on the local network.  The BOOTP/DHCP server would be used to give the
  46. client it's networking information and the NFS server would be used to
  47. hold the installation media.  These servers can be the same physical
  48. machine, but they don't need to be. 
  49.  
  50. To do an NFS kickstart install, you must have a BOOTP/DHCP server on 
  51. your network and it must have configuration information setup in it for
  52. the machine you are attempting to install.  The BOOTP/DHCP server will
  53. be used to give the client it's networking information and can also be
  54. used to specify the location of the kickstart configuration file.  If
  55. a file is specified by the BOOTP/DHCP server, the client will attempt
  56. an NFS mount of the file path and will copy the specified file to the
  57. client and use it as the kickstart configuration file.  The strings
  58. you need to set vary based on the BOOTP/DHCP server you use, but in
  59. the DHCP server shipped with Red Hat you want to use "filename" for
  60. the filename and "next-server" to set the NFS server name.
  61.  
  62. If the filename returned by the BOOTP/DHCP server ends in a "/" then
  63. it is interpreted as a path only.  That path is mounted and a file
  64. by the default filename is copied from there.  That default filename
  65. is <ip-addr>-kickstart, where <ip-addr> is the client's IP address
  66. in dotted decimal notation (for example, a filename for a machine
  67. with IP 10.10.0.1 would be "10.10.0.1-kickstart").
  68.  
  69. If you don't specify a server name, then the install will default to
  70. the server that answered the BOOTP/DHCP request.  If you don't specify
  71. a path or filename then it will default to trying to mount "/kickstart"
  72. from the BOOTP/DHCP server and then it will try to grab the file using
  73. the default filename (described above as <ip-addr>.kickstart).
  74.  
  75.  
  76. The kickstart file
  77. ------------------
  78.  
  79. First, items must be specified *in order*.  It is not a good idea to
  80. try to change the order of the required items.  Items that aren't
  81. required can be omitted.  Of the items that go in the kickstart
  82. file (specified later in this document), the only ones that matter
  83. to *upgrades* are language, installation method, device specification,
  84. keyboard setup, the "upgrade" keyword, and the LILO configuration.
  85. Specifying anything additional in an *upgrade* will be ignored
  86. (including package selection).  Omitting any required step, however,
  87. will simply result in the kickstart process stopping to ask for
  88. an answer to that question as if the install were running normally.
  89. Once the answer is given, the kickstart install will continue 
  90. normally (unless it hits another unanswered question).
  91.  
  92. The kickstart file is a simple text file.  You can create it by
  93. editing the sample.ks file found in the doc/ directory of a
  94. Red Hat CD image, or you can create it from scratch.  You should
  95. be able to edit it with any text editor or word processor that
  96. can save as ASCII text.
  97.  
  98. Language
  99.  
  100. The first item that must appear is the language setting.  You must
  101. specify a language for the install to run in and setup your system
  102. for.  This must be a two letter ISO language code, such as 
  103. "en" for English, "de" for German, "fr" for French, etc.  The variable
  104. you must set is "lang".  An example for setting this to English would
  105. be:
  106.  
  107. lang en
  108.  
  109.  
  110. Networking
  111.  
  112. The next item you need to set in the kickstart file is the networking
  113. information.  You must tell the system how it is going to setup 
  114. networking for itself.  This item is optional and if omitted the
  115. machine will be configured for stand alone operation.
  116.  
  117. You may specify networking one of three major ways, static, DHCP,
  118. or BOOTP.  Static means that you are going to tell the machine all
  119. the networking information it needs and it will keep that.  DHCP
  120. and BOOTP specify that you are going to have the machine use each
  121. of those protocols, respectively, at each boot to get it's networking
  122. information.  
  123.  
  124. To setup a machine to use DHCP to get it's networking, you would 
  125. put the following in the kickstart configuration file:
  126.  
  127. network --bootproto dhcp
  128.  
  129. To setup a machine to use BOOTP to get it's networking, you would 
  130. put the following in the kickstart configuration file:
  131.  
  132. network --bootproto bootp
  133.  
  134. For static networking, you have to give the machine several items.
  135. Those are the IP address, netmask, gateway IP, and nameserver IP.
  136. An example of how to do this would be:
  137.  
  138. network --bootproto static --ip 10.0.2.15 --netmask 255.255.255.0 --gateway 10.0.2.254 --nameserver 10.0.2.1
  139.  
  140. Note that there are some restrictions on this.  You must do this all
  141. on *one* line; you cannot wrap lines using a backslash, for example.
  142. Also, you can only specify one nameserver here.  You could use the
  143. %post section (described later) to add more nameservers if you need
  144. to.
  145.  
  146. Installation Method
  147.  
  148. The next item you need to setup is the installation method.  This is
  149. a required field.  You have two choices, NFS or CD-ROM.  For NFS
  150. you must also pass the server name and directory to mount as arguments.
  151. To do an NFS install, you would do something like:
  152.  
  153. nfs --server hostname.of.server --dir /path/to/RH/CD/image
  154.  
  155. If you are doing this via CD-ROM, you would simply give it the line
  156. "cdrom" like so:
  157.  
  158. cdrom
  159.  
  160. To install from a ftp or http server, use:
  161.  
  162. url --url http://hostname.of.server/path/to/RH
  163.  
  164. for http or:
  165.  
  166. url --url ftp://hostname.of.server/path/to/RH
  167.  
  168. for ftp.  To use a non-anonymous server, use:
  169.  
  170. url --url ftp://username:password@hostname.of.server/path/to/RH
  171.  
  172. To use a FTP or HTTP proxy, use:
  173.  
  174. url --url ftp://server/path/to/RH --proxy proxy.server.hostname --proxyport 201
  175.  
  176. To install from a local hard drive image, use something like:
  177.  
  178. harddrive --partition /dev/hda2 --dir /path/to/RH
  179.  
  180.  
  181.  
  182. Optional Hardware
  183.  
  184. The next item in the kickstart configuration is optional hardware
  185. information.  For most PCI hardware you can omit this step as it
  186. will be autoprobed (IDE hard disks and common PCI cards all fit
  187. this criteria).  For other items, you may need to specify it here.
  188.  
  189. To specify a device, start with the "device" keyword, followed by the
  190. type of device:
  191.  
  192. ethernet -- for ethernet cards.
  193.  
  194. scsi -- for scsi cards.
  195.  
  196. cdrom -- for non-scsi, non-ide cdrom cards (eg., sound cards with
  197. proprietary CDROM interfaces).
  198.  
  199. Optional parameters that are required by a device can also be specified
  200. by using the --opts option.  Enclose the paratmeters in quotes after
  201. --opts.
  202.  
  203. Note that you can specify multiple types of devices.  For example, if you
  204. know the machines you'll be kickstart-installing have either an Adaptec
  205. 1542 or a Buslogic card, you can enter both in the kickstart file.  But
  206. be aware that the install uses only the first card found, so order the
  207. device entries appropriately...
  208.  
  209. An example for an ISA 3com ethernet card would be:
  210.  
  211. device ethernet 3c509 --opts "io=0x330, irq=7"
  212.  
  213. An example of a Adaptec 1542 would be:
  214.  
  215. device scsi aha154x
  216.  
  217. An example of a SoundBlaster CD-ROM would be:
  218.  
  219. device cdrom --opts "io=0x240"
  220.  
  221.  
  222. Keyboard
  223.  
  224. The next item you need to specify is the correct code for your
  225. keyboard type.  For US keyboards, the type is "us".  For the others,
  226. please see the output of the kbdconfig program (or just set it to
  227. "us" and run kbdconfig on the installed system and set it properly 
  228. after the install).
  229.  
  230. An example of this would be:
  231.  
  232. keyboard us
  233.  
  234.  
  235.  
  236. Device Controllers - noprobe
  237.  
  238. If you do not want your system device controllers to be automatically
  239. probed then you can issue the command:
  240.  
  241. noprobe
  242.  
  243. By configuring this command, your system will not probe for any device
  244. controllers, SCSI or otherwise. This is to be used only if you wish to
  245. manually specify the devices that are on your system.
  246.  
  247. You will not be prompted to enter devices at any point. You will have to
  248. manually enter them into the kickstart configuration file or else you will
  249. not be able to continue with the installation.
  250.  
  251.  
  252. Device Controllers  -  --continue
  253.  
  254. Your system is normally set up to take or find one device of a type.  
  255. Without changes, the kickstart configuration will load the modules for one
  256. type of device, such as loading the module for one SCSI adapter type.
  257. Beyond that, the program will not load further modules for that type of 
  258. device.
  259.  
  260. In order to load modules for more than 1 adapter
  261. type, (for example, two different SCSI adapters) you will need to add the
  262. command
  263.  
  264. device --continue
  265.  
  266. So, if you need to have modules for a Adaptec and a BusLogic adapter,
  267. then you will need to have both of these specified in the configuration 
  268. file and you will need to have --continue after the first one in the
  269. configuration file:
  270.  
  271. device scsi aic7xxx --continue
  272. device scsi BusLogic
  273.  
  274. However, if you have multiple adapters of the same type, then you
  275. will not need to be concerned with this line, as the single module
  276. insertion is enough to control all adapters of that type. For example, if
  277. you have three Adaptec adapters, then the single line
  278.  
  279. device scsi aic7xxx
  280.  
  281. will load and allow all three adapters to function.
  282.  
  283.  
  284.  
  285. Partitioning
  286.  
  287. The hard disk in the machine must be partitioned before an install
  288. can take place.  In this phase we will describe how to specify how
  289. to partition a disk using kickstart.
  290.  
  291. First, if you are installing to new machines, you will want to use
  292. the "zerombr" command to clear the current partition information
  293. because it is usually bogus.  So, you would add:
  294.  
  295. zerombr yes
  296.  
  297. in that case.  If you are installing to machines that have partition
  298. information that you want to leave -or- that you want to change (even
  299. if you want to completely change it) you would do:
  300.  
  301. zerombr no
  302.  
  303. The next command is completely optional but handy.  If you want to
  304. remove all partitions or simply remove all Linux related partitions,
  305. you can use "clearpart".  For example, to clear all "Linux native"
  306. and "Linux swap" partitions, you could do:
  307.  
  308. clearpart --linux
  309.  
  310. To clear *all* partitions from a disk, you would do:
  311.  
  312. clearpart --all
  313.  
  314. The only options clearpart supports currently are --linux and --all.
  315.  
  316. The next step is to specify the partitions you want to create.  These
  317. will only be created using the free space (ie if the machine had FAT
  318. or FAT32 partitions and you had done "clearpart --linux" your FAT
  319. partitions would remain untouched).  You need to enter one partition
  320. per line using the following format:
  321.  
  322. part <mntpt> --size <size in megs> [--grow] [--maxsize <size in megs>]
  323.  
  324. <mntpt> is the location you are going to mount that partition in your
  325. installed system (for example, you must at least have a "/" partition).
  326. <size in megs> is the size of the partition in megabytes.  You can
  327. optionally specify that the partition be "growable" using --grow. 
  328. Making a partition "growable" does *not* mean that you can later 
  329. increase it's size (that isn't supported by the ext2 filesystem at
  330. this time).  What it means is that when you specify partitions you
  331. are doing so using the "free space".  Since that can vary and you 
  332. probably want to use it all, you can tag partitions as "growable"
  333. and the install code will automatically increase the size of the
  334. partitions tagged as growable to use that space.  If you have 
  335. multiple partitions tagged as "growable" then the extra space is
  336. split evenly among them.  You can limit the size of some partitions
  337. with the optional --maxsize argument, too.
  338.  
  339. For example, let's say you know your smallest disk is 1G out of a 
  340. set of machines you plan to install using the same kickstart config
  341. file.  You could use a partitioning scheme like the following:
  342.  
  343. zerombr no
  344. clearpart --all
  345. part / --size 250
  346. part swap --size 50
  347. part /usr --size 500 --grow --maxsize 800
  348. part /tmp --size 100 --grow
  349.  
  350. This will clear all partitions.  It then sets up a 250M root filesystem.
  351. The next item creates a 50M swap partition.  The next item will setup a
  352. 500M *minimum* /usr that could grow to a maximum of 800M.  The next
  353. item will setup a 100M *minumum* /tmp.  So, for 1G of total disk space,
  354. you would end up with a 250 root, 550M /usr, and 150M /tmp.  If your
  355. machine had 2G of total space, you would get a 250M root, 800M /usr,
  356. and 900M /tmp.
  357.  
  358.  
  359. Install/Upgrade Selection
  360.  
  361. The next item to specify is whether you are doing an install or an
  362. upgrade of an existing install.  For a fresh install, use:
  363.  
  364. install
  365.  
  366. For an upgrade of an existing system, use:
  367.  
  368. upgrade
  369.  
  370. Note again that for upgrades, the only items that matter are installation
  371. media (CD-ROM or NFS), device specification (if necessary), keyboard
  372. setup, install/updgrade specification (of course!), and LILO configuration.
  373.  
  374.  
  375. Mouse
  376.  
  377. You need to set the "mouse" variable to the type of mouse you have.
  378. To find out a list of usable options, run 'mouseconfig --help'.
  379.  
  380. The default device is correctly set for bus mice.  /dev/cua0 is the
  381. default for serial mice, but that can be overridden with the "--device"
  382. option.  Follow simply with the device name, like "cua1".  If three
  383. button emulation is required, specify "--emulthree".
  384.  
  385. For example, for a three button PS/2 mouse, you would use:
  386.  
  387. mouse --kickstart generic3ps/2
  388.  
  389. For a two button PS/2 mouse, use:
  390.  
  391. mouse --kickstart genericps/2
  392.  
  393. For a two button Microsoft mouse on your second serial port, use:
  394.  
  395. mouse --kickstart microsoft --device cua1
  396.  
  397.  
  398. Timezone
  399.  
  400. You need to specify the timezone that your machine will live in.  You
  401. do this with the "timezone" command.  You can run /usr/sbin/timeconfig
  402. on a RH machine to see what all the valid options are.  If you use
  403. GMT/UTC on your system clock, add the --utc option.  An example of
  404. the US Eastern with GMT for the system clock would be:
  405.  
  406. timezone --utc US/Eastern
  407.  
  408.  
  409. X Window Setup
  410.  
  411. The next item is the X Window setup area.  The installation program
  412. will normally find common PCI video hardware and will know which 
  413. X server to install.  The command for X configuration is "xconfig".
  414. If your card isn't probed properly, you can use --card to specify
  415. the card.  You can use "Xconfigurator --help" on a running Red Hat
  416. system to get a list of supported cards to choose from.  You must
  417. use one of those settings.
  418.  
  419. If your card isn't in the list but *is* supported by one of the
  420. existing servers, you can simply install the proper server by using
  421. the "--server" option to "xconfig".  Again, use "Xconfigurator --help"
  422. to find a list of server names.
  423.  
  424. You also need to specify a monitor type.  If you don't, the installation
  425. will assume 640x480@60hz.  Use the --monitor option to specify something
  426. else.  Again, "Xconfigurator --help" will list all valid monitor types.
  427.  
  428. If your monitor isn't listed, you can also list the actual monitor
  429. data using the --hsync and --vsync options for horizontal and vertical
  430. sync rates, respectively.  The rates may be single numbers (representing
  431. kilohertz and megahertz, as appropriate), groups of numbers separated by
  432. commas, or two numbers separated by a dash (signifying a range).  For
  433. example: --hsync "31.5,35.5,50-65" --vsync "50-70"
  434.  
  435. An example for a machine where the video card is probed properly would
  436. be:
  437.  
  438. xconfig --monitor "tatung cm14uhe"
  439.  
  440. An example for a machine where nothing is probed and the monitor isn't
  441. in the list might be:
  442.  
  443. xconfig --server "Mach64" --hsync "31.5,35.5,50-65" --vsync "50-70"
  444.  
  445. To skip X configuration, just use:
  446.  
  447. skipx yes
  448.  
  449.  
  450.  
  451. Root Password
  452.  
  453. You can put the root passwd in the kickstart file in the clear (in which
  454. case it would go over the network in the clear on an NFS install) or
  455. you can specify an encrypted password to be used.  To specify an actual
  456. password in the kickstart file, you would do something like:
  457.  
  458. rootpw mypasswd
  459.  
  460. If you wanted to use an encrypted password, grab it out of /etc/passwd
  461. (or somewhere else, if necessary) and use:
  462.  
  463. rootpw --iscrypted encryptedpasswdstring
  464.  
  465.  
  466.  
  467. Authentication Configuration
  468.  
  469. After you have set the root password, you have the ability to set up
  470. different network password authentications:
  471.  
  472. Enable NIS -- allows you to run a group of computers in the
  473. same Network Information Service domain with a common password and group 
  474. file. There are two options here to choose from:
  475.  
  476.         NIS Domain -- this option allows you to specify which
  477.         domain or group of computers your system will belong to.
  478.  
  479.         NIS Server -- this option causes your computer to use
  480.         a specific NIS server, rather than ``broadcasting'' a message
  481.         to the local area network asking for any available server to host
  482.         your system.
  483.  
  484. Enable Shadow Passwords -- provides a very secure method of
  485. retaining passwords for you.
  486.         
  487. MD5 Password -- allows a long password to be used up to 256
  488. characters, instead of the standard eight letters or less.
  489.  
  490. The authconfig format for kickstart looks similiar to:
  491.  
  492. auth --enablenis --nisdomain foo.redhat.com --nisserver
  493. server.foo.redhat.com [--useshadow] [--enablemd5]
  494.  
  495. The commands in the square brackets are optional. If you choose
  496. to set them up, you do not need to use the brackets.
  497.  
  498. You are able to change authconfig using these commands to set up
  499. the different password options:
  500.  
  501.      --enablenis          enable nis by default
  502.      --nisdomain <domain> default NIS domain
  503.      --nisserver <server> default NIS server
  504.      --useshadow          use shadow passwords
  505.      --enablemd5          enable MD5 passwords
  506.  
  507.  
  508.  
  509. LILO Configuration
  510.  
  511. For machines that use LILO (Intels), you can specify the LILO configuration
  512. using the "lilo" keyword.  By default you can just use:
  513.  
  514. lilo
  515.  
  516. and have LILO installed on the MBR and automatically configured to boot
  517. your Linux install as well as a DOS or Windows install if you have one.
  518.  
  519. If you want to change the default location, you can do so with the
  520. --location switch.  It will take three options:
  521.  
  522. mbr - put LILO on the master boot record (default)
  523. partition - put LILO on the beginning of the root partition
  524. none - don't install LILO at all (you need your own method of booting)
  525.  
  526. You can also use the --append switch to add an "append=" line to 
  527. the Linux section if you need to do things like set memory sizes,
  528. etc.  For example, to set LILO up on the MBR on a machine with
  529. memory size 128M, you could do:
  530.  
  531. lilo --append "mem=128M" --location mbr
  532.  
  533. Also note that the mem option *shouldn't* be necessary as of Red Hat
  534. 5.2.
  535.  
  536.  
  537. Package Selection
  538.  
  539. You can use the "%packages" keyword to start the beginning of the
  540. section that lists the packages you want to install (this is for
  541. *install* only because the upgrade only upgrades the packages that
  542. exist).
  543.  
  544. Packages can be specified by entire components or by individual
  545. package names.  See the RedHat/base/comps file on any Red Hat
  546. CD image for a list of those.  The components are the lines
  547. with a number and space in front of them and each of their packages
  548. follows.  The individual packages have nothing in front of them.
  549. Most folks will only need to list the components that they wish
  550. to have installed.  Also, the "base" component is always selected
  551. by default, so you don't need to specify it.
  552.  
  553. An example would be:
  554.  
  555. %packages
  556. @ Networked Workstation
  557. @ C Development
  558. @ Web Server
  559. @ X Window System
  560. bsd-games
  561.  
  562. New for 5.2 and later releases is the option to specify "Server" 
  563. or "Workstation".  This installs the same package set as the 
  564. normal mode install for those two options. ### ED: Reference your
  565. package description tags here.  
  566.  
  567. An example would be:
  568.  
  569. %packages
  570. @ Workstation
  571.  
  572. As you can see, specify components with an "@" symbol followed by
  573. a space and then the full name as given in the "comps" file.  Specify
  574. individual packages with no additional characters (just like "bsd-games"
  575. above).
  576.  
  577.  
  578. Post Installation Configuration
  579.  
  580. You have the option of adding commands to be run on the installed
  581. system after the install is complete.  This section must be last
  582. in the kickstart file and starts with "%post".  
  583.  
  584. You can access the network in a %post if it was previously configured,
  585. but you don't have access to nameservice.  So use IP addresses only.
  586.  
  587. An example of a post install script would be:
  588.  
  589. %post
  590.  
  591. # add comment to /etc/motd
  592. echo "Kickstart-installed Red Hat Linux `/bin/date`" > /etc/motd
  593.  
  594. # add another nameserver
  595. echo "nameserver 10.10.0.2" >> /etc/resolv.conf
  596.  
  597.