CentOS System Installation
System Startup process:
Bootloader-->kernel (INITRAMFS)-->rootfs-->/sbin/init
Anaconda: System installation program
Tui: A text window based on the graphics library curses
GUI: Graphics window
Setup startup procedures
①mbr:boot.cat
②stage2:isolinux/isolinux.bin
Configuration file: Isolinux/isolinux.cfg
Each of the corresponding menu options:
Load kernel: Isolinuz/vmlinuz
Pass parameters to the kernel: Append initrd=initrd.img ...
③ mount the root file system and start Anaconda
Default Startup GUI interface
If you explicitly specify to use the Tui interface: Pass the text parameter to the kernel
(1) Press the TAB key to add text to the back
(2) Press the ESC key: Boot:linux text
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/87/52/wKiom1fcxWDiTHfAAAXW1xdTO5c267.gif "title=" Gif.gif "alt=" Wkiom1fcxwdithfaaaxw1xdto5c267.gif "/>
Anaconda Working Process
The Anaconda installation system is divided into three stages:
① Pre-installation configuration phase
Language used in the installation process
Keyboard type
Installing the target storage device
Basic Storage: Local Disk
Special Equipment: ISCSI
Set host name
Configuring network Interfaces
Time
Administrator password
Setting the partitioning method and the installation location of the MBR
Create a normal user
Select the packages to install
② installation Phase
Create a partition on the target disk, perform a format operation, etc.
Installs the selected package to the target location
Installing bootloader and Initramfs
③ sometimes requires some simple configuration after the first boot
Such as:
Iptables
SELinux
Core Dump
System Installation
The boot installation process should generally be located on the boot device, and subsequent anaconda and the packages it installs are available in the following ways:
Local Disc
Local hard disk
FTP Server:yum Repository
HTTP Server:yum repostory
NFS Server
If you want to specify the installation source manually:
ESC key: Boot:linux Askmethod or TAB key: follow Up Askmethod
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/52/wKiom1fc3e6DZe7MAATuN9tkiAw283.png "title=" 2.png " alt= "Wkiom1fc3e6dze7maatun9tkiaw283.png"/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/87/50/wKioL1fc9urS9ZnVAAAX1MJfbDA703.png "title=" 3.png " alt= "Wkiol1fc9urs9znvaaax1mjfbda703.png"/>
Specify the path and continue with the installation
How to configure Anaconda:
(1) Interactive configuration mode
(2) Automatically complete the configuration by reading the configuration file given beforehand;
Configuration options given by a specific syntax;
Kickstart file
Install boot boot option: Boot:
Text: How to install texts
Askmethod: Manually specify the installation method to use
Network-related boot options:
Ip=ipaddr
Netmask=mask
Gateway=gw
Dns=dns_server_ip
Ifname=name:mac_addr
Boot options related to the remote access feature:
Vnc
Vncpassword= ' PASSWORD '
Indicate the location of the Kickstart file: ks=
DVD Drive:ks=cdrom:/path/to/kickstart_file
Hard Drive:ks=hd:device:/directory/kickstart_file
HTTP Server:ks=http://host:port/path/to/kickstart_file
FTP Server:ks=ftp://host:port/path/to/kickstart_file
HTTPS Server:ks=https://host:port/path/to/kickstart_file
NFS Server:ks=nfs:host:/path/to/kickstart_file
Activate emergency rescue mode:
Rescue
Official document: "Installation Guide"
Format of Kickstart file
① Command segment: Indicates a variety of pre-installation configuration, such as keyboard type;
② Package Segment: Indicates the package group or package to be installed, packages not installed, etc.;
%packages
@group_name
Package (Installed packages)
-package (Specify a package that is not installed)
%end
③ Script segment:
%pre: Pre-installation script
Operating environment: Micro-Linux environment running on installation media
%post: Post-installation script
Operating environment: installation of completed systems
Commands in the command segment:
Required commands
Authconfig: Authentication method with
authconfig--useshadow--passalgo=sha512
Installation location and related configuration of Bootloader:bootloader
Bootloader--location=mbr--driveorder=sda–
append= "Crashkernel=auto Rhgbquiet"
Keyboard: Setting Keyboard type
Lang: Language type
Part: Creating Partitions
ROOTPW: Indicates the root password
TimeZone: Time zone
Optional commands
Install OR Upgrade
Text: Installation Interface
Network
Firewall
SELinux
Halt
Poweroff
Reboot
Repo
User: Create a new user for the system after the installation is complete
URL: Indicates the installation source
Key–skip Skip installation number for Rhel version
Kickstart file creation
How to create a Kickstart file:
(1) Direct manual editing;
Modify based on a template
(2) You can use the Create tool: System-config-kickstart
Check the KS file for syntax errors: ksvalidator
# Ksvalidator/path/to/kickstart_file
Making a bootable CD and USB flash drive
To create a bootable disc:
#cp/media/cdrom/isolinux//tmp/myiso/
#vi/tmp/myiso/isolinux/isolinux.cfg
Initrd=initrd.imgtext ks=cdrom:/myks.cfg
#cp/root/myks.cfg/tmp/myiso/
#cd/tmp
# mkisofs-r-j-t-v--no-emul-boot--boot-load-size 4--boot-info-table-v "CentOS boot"-B isolinux/isolinux.bin-c ISO Linux/boot.cat-o/root/boot.isomyiso/
Create a USB drive boot disk
#dd if=/dev/sr0 Of=/dev/sdb
Automated installation of Linux systems