Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the kickstart installation description of Linux?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Linux kickstart installation details of what is, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

What is kickstart?

Kickstart installation is a way initiated by redhat to install the system automatically in the way you designed it. Installation methods can be divided into CD-ROM, hard disk, and network. This article will introduce the method of using kickstart installation system in detail by means of network installation.

2. Preparation for making kickstart boot disk

First, copy the first CD / p_w_picpath/boot.iso of the system to the local / tmp/iso.

# mount / dev/hdc / mnt/cdrom

# cp / mnt/cdrom/p_w_picpaths/boot.iso. /

# umount / dev/hdc

# mount-o loop boot.iso / mnt/iso/

# cp-r / mnt/iso/* / tmp/iso

Delete the TRANS.TBL and / tmp/iso/isolinux/boot.cat files under / tmp/iso.

# rm / tmp/iso/TRANS.TBL

# rm / tmp/isolinux/boot.cat

3. Edit the ks.cfg file

The ks.cfg file is a simple text file that contains a list of projects, each marked with keywords. Normally, when the operating system is complete, an anaconda-ks.cfg file is automatically generated in the / root/ directory. We can use this file as a template to edit our own ks.cfg files as needed. Mainly modify the installation method, IP address, hostname, partition size and so on.

1 # Generated by Kickstart Configurator

2 # System language

3 lang en_US

4 # Language modules to install

5 langsupport-default en_US en_US zh_CN.GB2312

6 # System keyboard

7 keyboard us

8 # System mouse

9 mouse genericps/2

10 # System timezone

11 timezone-utc Asia/Shanghai

12 # Root password

13 rootpw 12345

14 # System bootloader configuration

15 bootloader-location=mbr

16 # Install Red Hat Linux instead of upgrade

17 install

18 # Use FTP installation media

19 url-url ftp://192.168.203.2/download

20 # Disk partitioning information

21 clearpart-all

22 part /-- size 4200

23 part swap-size 300

24 # Use DHCP networking

25 network-bootproto dhcp

26 # System authorization information

27 auth-useshadow-enablemd5

28 # Firewall configuration

29 firewall-disabled

30 # X Windows system configuration information

31 # Probe for video card

32 # Probe for monitor

33 xconfig-depth 16-resolution 1024x768-defaultdesktop=GNOME

34% packages

35 @ KDE

36 @ Emacs

37 lynx

38% pre

39 echo "Welcome to my kickstart"

40% post

41 echo "192.168.10.55 Server" > > / etc/hosts

Everything that begins with a "#" sign is a comment and can be ignored.

Line 2 indicates the language in which it was installed. In fact, when the setting is correct, the installation of kickstart does not need human intervention, and this article defines it as English.

Line 4 indicates the locale supported by the system. If you do not install X-Window, you only need English. This article adds support for simplified Chinese.

Lines 6-9 indicate the type of keyboard and mouse used by the system, usually with us-compatible lines. A PS/2 mouse with a scroll wheel should be written as:

Mouse msintellips/2

Lines 6-9 suggest using the ksconfig program.

Lines 10-11 are the time zone, and Chinese users can generally choose Shanghai.

Lines 12-13 indicate the password of the root user, and another form is to encrypt the password.

Lines 16-17 indicate whether to install or upgrade, and if it is an upgrade, line 17 should use upgrade instead of the Install parameter.

Lines 18-19 indicate the location of the installation media, which is one of the keys to Kickstart installation. The installation media can be placed on the NFS/FTP/HTTP server or on the local hard drive. This article does not intend to discuss hard disk installation, only network installation. The specific way is to copy the Red Hat directory in the three Red Hat installation CDs to a location on the server, such as / tmp/install. If you are installing with NFS, you need to share / tmp/install and make sure that the client that will install Red Hat Linux can access it.

If it is a FTP or HTTP installation, you can put the Red Hat directory under ftproot or httproot. It is worth noting that in a Windows system, there may be a difference between "/" and ". If FTP Server is a Windows system, it is best to place the Red Hat directory in the directory next to ftproot.

Lines 21-23 describe the partition to which Linux will be installed, and clearpart-all means to clear all partitions. Line 22 creates a new partition for 4.2GB as the "/" partition. Line 23 creates a new swap partition for 300MB.

If you use an existing partition, write as follows:

Partition /-- onpart sda1

Partition swap-onpart sda2

Note: lines 21-23 are best not to use the ksconfig program to automatically set parameters, it is safer to set them manually.

Line 25 means to use DHCP Server to automatically assign IP addresses. If there are a large number of machines installed, there is no doubt that DHCP is the best choice. If you want to specify the IP address yourself, you should write:

Network-bootproto static-ip 192.168.10.55-netmask 255.255.255.0

-- gateway 192.168.11.1-- nameserver 202.96.134.133

The machine with multiple network cards is a little more complicated, so I won't introduce it in this article.

Line 27 indicates how the system authenticates the user. This article uses the default Shadow password, MD5 encryption, which is the most common way.

Line 28 turns off the custom firewall. Because ipchains Firewall is used to install Red Hat, the author recommends that iptables Firewall be used in the future.

Lines 30-33 are about the setting of X-Window. It means to use the settings that the system automatically detects. Linux generally correctly detects the model of the display card and monitor.

Line 33 means that GNOME is used as the default window manager with a 16-bit color and a screen resolution of 1024 × 768. If you add "--startxonboot" at the end, you will log in to X-Window after booting.

Lines 34-37 indicate the software you chose to install at installation time. The "@" symbol in front represents a set of RPM packages, each of which is a list of software to be installed, so that the software can be found in the Redhat/base/comps file on the first installation CD of Red Hat. If no group is specified, the Base combination in the Redhat/base/comps file, that is, the most basic RPM packages, such as Sendmail, will be installed. Writing an @ Everything is a full installation. There is a RPM package with lynx installed separately in line 37.

The% pre on lines 38-39 indicates the command that was executed before installation.

Lines 40-41,% post, later represent the commands to be executed after installation. Line 40 executes a simple command.

Fourth, make a boot CD

Copy the ks.cfg file you edited in step 3 to / tmp/iso/.

# vi anaconda-ks.cfg

# cp anconda-ks.cfg / tmp/iso/ks.cfg

# mkisofs-R-J-T-v-no-emul-boot-boot-load-size 4\

-boot-info-table-V KSBOOT-b isolinux/isolinux.bin\

-c isolinux/boot.cat-o / ksboot.iso / tmp/iso

After executing the above command, Ksboot.iso will be generated under /, and the file will be carved.

Start the installation with KS CD

When boot: appears

Type linux ks=cdrom:/ks.cfg and he will install it as specified in the ks.cfg file.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report