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

How to automatically deploy Linux open source system in Power System

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to automatically deploy Linux open source system in Power System. It is very detailed and has certain reference value. Friends who are interested must finish it!

1. Technical background of Power Linux deployment

1. Background introduction

Since its birth, Linux, as an open source operating system, can be deployed on most computer architectures, involving platforms ranging from embedded chip systems to large supercomputers.

Power servers have always supported Linux operating system, but limited to its scope of application, its popularity and usage are not high, and the description related to specific system deployment is even less. As IBM announces the establishment of a Power System Linux center in Beijing, this marks that Power servers will play an important role in supporting Linux enterprise services, and more and more enterprise applications will run on Power Linux. Accordingly, the installation requirements of various Linux systems will be more and more, if the automatic deployment of Linux will bring great convenience to the daily maintenance work.

2. Two operation modes of Power System 7 logical partition.

Different from x86 platform, Power server has hardware scalability and hardware virtualization function. This paper introduces that the POWER7-based system can provide two modes for logical partitioning: P6hammer P6+ mode and P7 mode. The differences are shown in the following table:

Note: different LPAR within the same POWER7 server can run in different modes.

Through the above comparison, it is not difficult to see that the system running in Power 7 mode will make all aspects of Power system performance more effectively.

3. Linux support for Power System 7

Many Linux distributions can run on Power series servers. Here are the details of Redhat and SuSE's support for Power 7:

Linux supports processor and thread scenarios on Power 7 logical partitions:

A few points worth noting:

1. SLES10 SP3 and RHEL 5.5 only supports running in Power6 compatibility mode on POWER7.

2. SLES 11 and RHEL6 only supports running in Power7 mode on POWER7 by default

3. Logical partitions running SLES 11 or RHEL 6, if migrated from a Power6 system to Power7 in Power6 mode, will be adaptively run in Power7 mode when the system is rebooted

4. When the logical partition of Power7 is migrated to Power6, the restart system will run in Power6 mode later.

II. Principles and methods of Power Linux network deployment

1. The principle of Power Linux network deployment

The network installation principle of Linux on Power is basically similar to the x86 architecture, except that when the system is started, the PowerPC architecture system uses Open Firmware,x86 architecture system uses BIOS. This difference makes it impossible to install the Linux system directly using pxelinux as the network boot manager (boot loader) on Power. Yaboot, as the network boot manager (boot loader) under PowerPC, will complete the network boot installation operation instead of pxelinux.

Yaboot is a network boot manager for PowerPC, which is mainly used for booting machines based on Open Firmware, including Apple Macintosh, IBM RS/6000, IBM pSeries and IBM OpenPower.

The Linux network startup process under PowerPC, as shown in the following figure:

Linux Network Startup process under PowerPC

Description of the network startup process:

After the network environment is ready, the installed node is powered on and started.

The installed node chooses the boot mode: hard disk, CD-ROM, network. Select network startup in the figure to send dhcp request

After the installation server obtains the dhcp request, it assigns the IP to the installed node according to the configuration of dhcpd.conf

Get and start the kernel initialization program through yaboot

The kernel of the installed node starts, finds the installation media and starts the installation

The installed node system installed successfully.

2. Power Linux network deployment method

Under the Power platform, Linux can be installed in two ways: one is based on AIX NIM server, the other is based on Linux DHCP server.

The specific characteristics of the two methods are as follows:

Based on AIX NIM server:

Use a direct Bootp request

The MAC address of the network card is not required

The network boot image file that needs to be installed with Linux (that is, the file images/netboot/ppc64.img under the installation CD directory is the same as below)

This installation method works when the network boot image file of Linux is not larger than 32MB.

Special note: when the network boot image file is larger than 32MB, you have to use another way to install the network.

(for example, the network boot image file of a RHEL6 GA 64-bit system-images/netboot/ppc64.img is larger than 32MB and cannot be directly used and installed on the network in this way)

Based on Linux DHCP server:

Bootp request using broadcast

The MAC address of the network card is required

Use the Yaboot definition for network startup installation

There is no limit on the size of the network boot image

According to the above characteristics, the administrator can choose the appropriate installation method according to the environment of his hardware.

3. Take Redhat and SuSE as examples to introduce automatic deployment and practice.

There have been many articles about network automation and deployment of Linux, so the installation steps will not be described in detail here. Please refer to the relevant articles. This section will focus on the problems and practices that should be paid attention to when Linux is installed automatically in a specific Power logical partition network.

1. Prepare logical partitions and installation media

If you install the Linux system on a logical partition, you need to partition the logical partition in advance and allocate enough hard disk space. You can purchase and install CD/DVD, or download the installation image file from the network. After you have obtained the installation media, migrate the corresponding installation files to the shared server.

Note: the media must be an installation file for the PowerPC platform; check that the actual installation media path is consistent with the NFS service shared directory.

2. Configure the installation server

Describe the configuration of TFTP/DHCP in two installation modes:

a. Based on NIM server:

TFTP resource definition: copy the Red Hat/SuSE Linux network boot image from the installation media to / tftpboot, as follows:

Root@nim:/tftpboot > ls-l *-rw-r--r-- 1 root system 11333732 Nov 15 2012 rhel5u5-netboot.img-rw-r--r-- 1 root system 11612524 Nov 15 2012 rhel5u6-netboot.img-rw-r--r-- 1 root system 15006880 Aug 27 17:19 rhel5u7-netboot.img-rw-r--r-- 1 root system 9512595 Nov 15 2012 sles10-sp3-inst32-rw-r--r-- 1 root system 10682935 Nov 15 2012 sles10-sp3-inst64-rw -root system root system 10082439 Nov 15 2012 sles10-sp4-inst32-rw-r--r-- 1 root system 11307427 Sep 9 18:08 sles10-sp4-inst64-rw-r--r-- 1 root system 19809567 Sep 9 18:18 sles11-inst64-rw-r--r-- 1 root system 23733099 Sep 9 19:20 sles11-sp1-inst64

BOOTP configuration definition:

# / etc/bootptab: test1-rhel5:bf=/tftpboot/test1-rhel5:ip=192.168.0.10:ht=ethernet:sa=192.168.0.100:sm=255.255.255.0: test2-sles10:bf=/tftpboot/test2-sles10:ip=192.168.0.11:ht=ethernet:sa=192.168.0.100:sm=255.255.255.0: root@nim:/tftpboot > ls-l test* lrwxrwxrwx 1 root system Sep 9 18:15 test1-rhel5-> rhel5u5-netboot.img lrwxrwxrwx 1 root system Sep 9 18:30 test2-sles10-> sles10-sp3-inst64

Note: check the / etc/tftpaccess.ctl file to confirm that the definition of the directory to be accessed by the network installation is valid

# NIM access for network boot allow:/tftpboot

After each change to the Bootp configuration, you need to run the following command for the new configuration to take effect.

Refresh-s inetd

b. Based on Linux DHCP server:

TFTP resource definition:

Root@dhcp:/tftpboot > tree / tftpboot | |-- pSeries/ | |-- rhel |-- vmlinuz | | `--ramdisk.image.gz | |-- sles | |`-- sles11-sp2-inst64 | `--yaboot`-- yaboot.conf

DHCP configuration:

# / etc/dhcp/dhcpd.conf option domain-name "test.power.com"; option domain-name-servers 192.168.0.8; option routers 192.168.0.1; ddns-update-style none; ignore unknown-clients; allow bootp; subnet 192.168.0.0 netmask 255.255.255.0 {default-lease-time 86400; max-lease-time 604800; host test1-rhel5 {next-server 192.168.0.102; filename "pSeries/yaboot"; hardware ethernet AA:BB:CC:DD:11:22 Fixed-address 192.168.0.10;} host test2-sles10 {next-server 192.168.0.102; filename "pSeries/yaboot"; hardware ethernet AA:BB:CC:DD:11:33; fixed-address 192.168.0.11;}}

Configuration definition for Yaboot:

Default=test1-rhel5 timeout=100 image=pSeries/rhel/vmlinuz # specify kernel image file path label=test1-rhel5 initrd=pSeries/rhel/ramdisk.image.gz# specify memory image file path append= "ks=nfs:9.181.0.102:/export/ksFiles/test1-rhel5.ks.cfg ksdevice=eth0\ initrd=pSeries/rhel/ramdisk.image.gz\ dns=192.168.0.8 ip=192.186.0.10 gateway=192.186.0.1 netmask=255.255.255.0\ method=nfs:9.181.0.102:/export / redhat5u5p\ keymap=us lang=en_GB.UTF-8 vnc "# specify kickstart file and network installation parameters read-only image=pSeries/rhel/sles11-sp2-inst64# specify network boot kernel image file path label=test2-sles10# definition installation label append=" autoyast=nfs://192.186.0.102:/export/autoyast/test2-sles10.yast.xml\ dns=9.181.2.101\ install=nfs://192.186.0.102:/export/SLES11SP2\ hostip=192.186.0 .11 gateway=192.186.0.1 netmask=255.255.255.0 "# specify the AutoYaST2 file and network installation parameters # add"\ "here only for display There are all consecutive rows in the actual configuration.

3. NFS service definition:

The sharing corresponds to the installation media storage directory, which provides the installation media connection for network installation.

Root@dhcp:/tftpboot > exportfs / export

4. Automatically install the answer file kickstart/AutoYaST:

Defining automatic installation answer files is an important part of automatic deployment. This makes the scope of the system installation operation greatly expanded, so that the system deployment can easily meet a variety of system installation requirements.

For instructions on the use of these two tools, readers can visit the relevant links given in this article. Here are two example templates: Redhat's kickstart and SuSE's AutoYaST2.

# test1-rhel5.ks.cfg install nfs-- server 192.168.0.102-- dir / export/redhat5u5p key-- skip lang en_US.UTF-8 network-- device eth0-- bootproto static-- ip 192.168.0.10-- netmask 255.255.255.0-- gateway 192.168.0.1-- nameserver 192.168.0.8-- hostname test1-rhel5 rootpw 123456 firewall-- disabled authconfig-enableshadow-enablemd5 selinux-- permissive timezone-- utc Asia/Shanghai reboot bootloader -- location=partition-- driveorder=sda-- append= "console=hvc0 rhgb quiet" clearpart-- all-- initlabel-- drives=sda part prepboot-- fstype "PPC PReP Boot"-- size=10-- ondisk=sda part /-- fstype ext3-- size=1024-- ondisk=sda part swap-- size=2048-- ondisk=sda part pv.5-size=100-- grow-- ondisk=sda volgroup basevg-- pesize=32768 pv.5 logvol / tmp-- fstype ext3-- name=tmp-vgname=basevg-- size=1024 logvol / opt-- fstype ext3-name=opt-- vgname=basevg-- size=1024 logvol / usr-- Fstype ext3-- name=usr-- vgname=basevg-- size=2976 logvol / var-- fstype ext3-- name=var-- vgname=basevg-- size=2048 logvol / home-- fstype ext3-- name=home-- vgname=basevg-- size=1024% packages @ admin-tools @ base @ core @ editors @ base-x @ gnome-desktop% post echo "search test.power.com" > / etc/resolv.conf echo "nameserver 192.168.0.8" > > / etc/resolv.conf BOOT= `nvsetenv | grep boot-device | sed sbank. 0 / | cut-d'='- f 2`nvsetenv boot-device $BOOT # test2-sles10.yast.xml due to space limitation This example deletes the specific configuration while ensuring the integrity of the definition. Please refer to the relevant document # to define the network configuration information here. For more information, please refer to the AutoYaST2 document # where you can define the scripts to be executed before / after installation. For details, please refer to AutoYaST2 document true / dev/sda1 ppc localtime Asia/Shanghai / dev/sda true all 3 false / root / bin/bash 0 123456 root perl-Digest-MD4 Basis-Devel x11-64bit.

5. Logical partition of network startup in HMC

This article introduces the use of the lpar_netboot command in HMC to start logical partitions by specifying a network boot server.

The detailed command is as follows:

Start test1-rhel5

Lpar_netboot-f-I-T off-t ent-s auto-d auto-S 192.168.0.100-G 192.168.0.1-C 192.168.0.0 "LPAR01"test1-rhel5"POWER01"

Start test2-sles10

Lpar_netboot-f-I-T off-t ent-s auto-d auto-S 192.168.0.100-G 192.168.0.1-C 192.168.0.0 "LPAR02"test1-sles10"POWER01"

Typically, the entire installation and deployment will be completed after about ten minutes after running the startup command. You will get a new pLinux environment that runs on Power System 7 and is customized according to the template.

These are all the contents of the article "how to automatically deploy Linux open source systems in Power System". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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