Install SuSE Linux in batches-Based on PXE

Source: Internet
Author: User
Install SuSE in batches

Environment Description: System SuSE 11 64bit. The system is installed on a virtual machine and connected through NAT (net8). The virtual network card IP address is 192.168.128.1. Ip192.168.128.130 of the PXE Server of the virtual network.

Similar to the settings for installing centos, the Kickstart file and the autoyast file in the response file of centos are used. The autoyast file is generated after the system is installed. Note that you must check "clone this system for autoyast" in the last step of installation. This check box is not selected by default. Otherwise, the autoinst. xml file will not be generated.

DHCP + tftp + FTP is used for installation. First install the package required by the Service:

sdw1:~ # mount /dev/cdrom /media/mount: block device /dev/sr1 is write-protected, mounting read-onlysdw1:~ # cd /media/suse/x86_64/sdw1:/media/suse/x86_64 # rpm -ivh dhcp-3.1.3.ESV-0.3.38.x86_64.rpm Preparing...                ########################################### [100%]   1:dhcp                   ########################################### [100%]sdw1:/media/suse/x86_64 # rpm -ivh dhcp-server-3.1.3.ESV-0.3.38.x86_64.rpm Preparing...                ########################################### [100%]   1:dhcp-server            ########################################### [100%]Updating etc/sysconfig/dhcpd...Updating etc/sysconfig/syslog...sdw1:/media/suse/x86_64 # rpm -ivh tftp-0.48-101.16.x86_64.rpm Preparing...                ########################################### [100%]   1:tftp                   ########################################### [100%]sdw1:/media/suse/x86_64 # rpm -ivh syslinux-3.82-8.1.58.x86_64.rpm Preparing...                ########################################### [100%]        package syslinux-3.82-8.1.58.x86_64 is already installedsdw1:/media/suse/x86_64 # rpm -ivh vsftpd-2.0.7-4.17.1.x86_64.rpm Preparing...                ########################################### [100%]        package vsftpd-2.0.7-4.17.1.x86_64 is already installed

Configure the DHCP service, # vi/etc/DHCPD. conf

Append the following content:

Default-lease-time 14400; ddns-Update-style none; next-server 192.168.128.130; #192.168.128.130 is the DHCP server ipfilename "pxelinux.0"; subnet 192.168.128.0 netmask 255.255.255.0 {range 192.168.128.150 192.168.128.200; default-lease-time 14400; max-lease-time 172800 ;}

Modify the/etc/sysconfig/DHCPD File

# Vi/etc/sysconfig/DHCPD
Change
Dhcpd_interface = ""
Is
Dhcpd_interface = "eth0"
# Because eth0 is the network segment 192.168.128.0

Restart Dhcp Service

# Service DHCPD restart

Configure the TFTP service

# Vi/etc/xinetd. d/TFTP

Find:
Disable = Yes
Change
Disable = No

Restart the TFTP service

# Service xinetd restart

Create the root directory of the TFTP service

sdw1:/media/suse/x86_64 # mkdir -p /tftpboot/sdw1:/media/suse/x86_64 # mkdir -p /tftpboot/pxelinux.cfg

Copy the files required for installation to tfptboot.

sdw1:/media/suse/x86_64 # cp /media/boot/x86_64/loader/initrd /tftpboot/sdw1:/media/suse/x86_64 # cp /media/boot/x86_64/loader/linux /tftpboot/sdw1:/media/suse/x86_64 # cp /usr/share/syslinux/pxelinux.0  /tftpboot/

Create a startup information file

Sdw1:/Media/Suse/x86_64 # vi/tftpboot/pxelinux. cfg/Default

The content is as follows:

Default Linux

Lable Linux

Kernel Linux

Append initrd = initrd autoyast = ftp: // 192.168.128.130/autoinst. xml install = ftp: // 192.168.128.130/Suse/splash = verbose showopts

Copy the response file autoinst. XML to the FTP service root directory/srv/FTP, and mount the system image file to the FTP

sdw1:/media/suse/x86_64 # cp /root/autoinst.xml /srv/ftp/sdw1:/media/suse/x86_64 # cd /srv/ftpsdw1:/srv/ftp # mkdir suse

First # umount/media. Unmount the previous Mount

sdw1:/srv/ftp # mount /dev/cdrom /srv/ftp/suse/mount: block device /dev/sr1 is write-protected, mounting read-only

Start the FTP server

sdw1:/srv/ftp # service vsftpd restartShutting down vsftpd                                                 doneStarting vsftpd                                                      done 

OK. Now, you can start a bare metal instance that is physically connected from the NIC.

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.