Linux Anaconda Kickstart Basics

Source: Internet
Author: User
Tags dns2 gpg

Boot process for boot media:

Isolinux-Anaconda


Structure within the disc media:

Efi/efi related

LIVEOS/LIVECD the associated image file.

packages/Package

images/store various boot media image files (image file).

isolinux/The usage directory of the boot loader. Includes the boot loader configuration file, kernel, INITRD and other files.

Repodata/repo data

Centos_buildtag a file that records the build date.

GPL GPL license file

rpm-gpg-key-centos-7 Gpgkey File

rpm-gpg-key-centos-testing-7 Gpgkey File




Anaconda

1.update mode

Installing and upgrading the system

2.kickstart mode

Automatic installation.

3.rescue mode

Rescue mode


Stage1:

1. Start the isolinux/initrd.img in the installation media

2. Execute init in initrd.img

Resolves the parameters specified by the boot media.

Check car hardware equipment, load necessary drive


Stage2:

1. Executive Image/stage2.img

Set installation options and plan for installation and update


/root/anaconda-ks.cfg is automatically generated when the system is installed using Anaconda mode, and can be used as a template for kickstart files.

The content consists of 3 parts:

1. Command section:

The settings specified by the command need to be used during installation.

2. Package Selection section:

Start with%packages, specify the packages and package groups that need to be installed in the system installation, and so on.

3. Script Segments

%pre the script that was executed before the system was installed.

%post scripts that are executed after the system is installed


Installation options, commands that you can use in the boot prompt

Linux COMMAND

Askmethod manually select the installation method.


Dd=disk Load Driver


IP=IP|DHCP Specifies the IP address, automatically gets the fill DHCP

Netmask=netmask Specifying a subnet mask

Gateway=gateway Specifying Gateways

Dns=dns1,dns2 ... Specify the DNS address, separated by commas, between each DNS.


Ks=http://server/dir read from HTTP

Ks=nfs:server:/dir read from NFS

Ks=hd:device/dir/file read from local device

Pre-packaged configuration files exist in the Ks=flie:/dir/file initrd.

When the Ksdevice=device has multiple network adapters, it is specified to get the configuration file through a network card.


Mediacheck=no skips a disc check.


Method=cdrom

Method=ftp://dir

Method=hd:device:dir

Method=http://dir

Method=nsf:dir


Nonet do not enable network features

The Noprobe does not load additional hardware device drivers.

NOUSB do not use USB devices


Rescue into emergency rescue mode.




Kickstart

Ks.cfg configuration files for Kickstart

The content consists of 3 parts:

1. Command section:

Required commands

1.keyboard US

2.lang en_US

The list of languages is defined in/usr/share/sytem-config-language/locate-list.

Or use locale-a to view

3.timezone

4.rootpw

5.authconfig

6.bootloader

7.clearpart



Optional commands

1.autopart Automatic Partitioning

2.ignoredisk Ignoring hard drives

--drives=disk1,disk2 ... Specify the ignored hard disk

--onlyuse=disk1,disk2 ... White List

3.autostep automatically skips the optional options, which are set to the default options.

Auth (authconfig)

--ENABLEMD5 user password is encrypted using MD5 mode

--useshadow--enableshadow using Shadow password


Bootloader

--location Specifies the installation location, which is installed by default in MBR.

--password=password whether to set a password when using grub.


Clearpart

--all Remove all partitions

--linux removing all Linux partitions

--none does not remove any partitions and uses free space. The default option.

--initlable if no partition table is on the disk, initialize one.


Driverdisk disk specifying drive disks

--SOURCE=FTP://DIR/DD.IMG Specifies the location of the image file.

--sourec=http://dir/dd.img

--sourec=nfs:host:/dir/dd.img


Firewall

--enable--enabled Enable firewall

--disenable--disabled Disabling firewalls

--turst Ethnum Trust the packets on the NIC from which

--prot Proto:port the specified protocol and port

--service The specified service

Ssh

Telnet

Smtp

http

Ftp


Firstboot set the setup agent after the system is started.

--enable--enabled allows the setup agent to start.

--disable--disabled prohibit setup agent from starting.

The setup agent enters reconfiguration mode after the--reconfig is started.


Halt shutdown after system installation is complete

Poweroff shutdown after system installation is complete

Reboot system reboot after installation is complete

Shutdown shutdown After system installation is complete


Graphical Graphical Installation Interface

Text Installation Interface


Install installation System

--url

Upgrade Upgrade System



Interactive interactive mode


iSCSI iSCSI Device-related


Key key

--skip Skip Provide key


Part|partition Partitioning

PV Create PV Device

RAID Creation RAID device

--size Specify size

--grow can be automatically extended to maximum space

--maxsize Specify the maximum space size

--ondisk=disk operation on the specified partition

--FSTYPE=FSTYPE Specifies the file system type.

--start beginning of cylinder

--end End of cylinder

--encrypted is encrypted

--label=labelname Volume label


Volgroup Volume Group related


Logvol Logical Volume Correlation


Network

--device=ethnum specifying the NIC

--bootproto=hdcp|stati|boottp

--ip=ip

--netmask=netmask

--gateway=gateway

--nameserver=dns1,dns2 ...


Rootwp PASSWORD root User's password

--iscrypted using an encrypted password


SELinux

--disabled Disable

--enforcing Mandatory Mode

--permissive tolerant mode, recommended use


SKIPX Skip Graphical interface configuration


TimeZone timezone

--utc

You can use the Timeconfig command for counterweight.






2. Package Selection section:

Start with%packages, specify the packages and package groups that need to be installed in the system installation, and so on.


3. Script Segments

%pre the script that was executed before the system was installed.

%post scripts that are executed after the system is installed


#ksalidator Ksfile

Check the Kickstart file configuration for errors and need to install the System-config-kickstart package.


#system-config-kickstart graphical editing Kickstart tool.



Example: Creating a very small installation disc

1. Mount the disc

#mount/dev/cdrom/mnt/cdrom


2. Copy the Isolinux images on the disc

#cp-pr/mnt/cdrom/{isolinux,images}/tmp/test/


3. Edit the Isolinux.cfg file

#vim/tmp/test/isolinux/isolinux.cfg

Default Linux Ks=cdrom:/ks.cfg


4. Edit Boot.msg

#vim boot.msg

You can add the information you want to display yourself


5. Create a ks.cfg file

#vim/tmp/test/ks.cfg


6. Create a disc image file

# #mkisofs-R-b/tmp/test/isolinux/isolinux.bin--no-emul-boot-boot-load-size 4-boot-info-table-o Boot.iso/tmp/iso


This article is from "Small Private blog" blog, please be sure to keep this source http://ggvylf.blog.51cto.com/784661/1617716

Linux Anaconda Kickstart Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.