Install the server environment:
1.sles SP2 Gnome Desktop Environment
2. only one NIC Eth0,ip is configured for 172.16.1.1
3. Verify that the firewall is turned off
. Configure DHCP
1.yast2 Dhcp-server, follow the prompts to install and configure the DHCP service (process slightly)
2. Modify The DHCP configuration file, add the following two sentences in the Global configuration section (red font)
Default-lease-time 14400;
Ddns-update-style none;
Next-server 172.16.1.1;
FileName "pxelinux.0";
Subnet 172.16.1.0 netmask 255.255.255.0 {
Range 172.16.1.100 172.16.1.200;
Default-lease-time 14400;
Max-lease-time 172800;
}
3. Restart the DHCP service
linux-e5qd:~ #/ETC/INIT.D/DHCPD Restart
. Configure Tftp-server
1.yast2 Tftp-server, Follow the prompts to install and configure the TFTP service (process slightly)
2. copy the pxelinux.0 to the TFTP home directory /tftpboot
linux-e5qd:~ # cp/usr/share/syslinux/pxelinux.0/tftpboot/
Note: If you do not have pxelinux.0, please install the syslinux package First
3. Create the pxelinux.cfg directory under tftp home directory /tftpboot
linux-e5qd:~ # Mkdir/tftpboot/pxelinux.cfg
4. copy The required files in the SLEs installation disk to the TFTP home directory /tftpboot
linux-e5qd:~ # cp/media/sles-11-sp2-dvd-x86_6407551_/boot/x86_64/loader/*/tftpboot/
linux-e5qd:~ # Cp/tftpboot/isolinux.cfg/tftpboot/pxelinux.cfg/default
5. Modify the boot file as follows (red font)
linux-e5qd:~ # chmod 644/tftpboot/pxelinux.cfg/default
linux-e5qd:~ # Cat/tftpboot/pxelinux.cfg/default
Default Linux
# hard Disk
Label Harddisk
Localboot 0x80
# Install
Label Linux
Kernel Linux
Append initrd=initrd splash=silent showopts install=ftp://172.16.1.1/pub autoy
Ast=ftp://172.16.1.1/autoinst.xml
*
*
*
The following slightly
Note:autoinst.xml The last step in installing SuSE is checked by default
. Configuring VSFTPD
1.yast2ftp-server, Select Install VSFTPD, save by default
2. confirm FTP Anonymous home directory location
linux-e5qd:~# Finger FTP
Login:ftp name:ftp Account
Directory:/srv/ftp Shell:/bin/bash
Neverlogged in.
Nomail.
Noplan.
by the above know the main directory in /srv/ftp
3. copy the Autoinst.xml to the/srv/ftp directory
linux-e5qd:~# cp/root/autoinst.xml/srv/ftp/
4. Create a pub directory under the/srv/ftp/ directory and copy all files from the SuSE installation CD to this directory
linux-e5qd:~# mkdir/srv/ftp/pub
linux-e5qd:~# cp-r/media/sles-11-sp2-dvd-x86_6407551_/*/srv/ftp/pub/
Add a custom script to complete the following tasks after the system has been installed and restarted
1. Add a local warehouse, warehouse location in/media/suse, warehouse alias "Local Repository"
2. add a new user user1, password is user1
3. Modify /srv/ftp/autoinst.xml, add content as follows (red font)
<scripts>
<init-scriptsconfig:type= "List" >
<script>
<filename>Modify.sh</filename>
<interpreter>shell</interpreter>
<source><! [cdata[
#!/bin/sh
#
# ADD a Local Repository
[-d/media/suse] | | Mkdir/media/suse
Zypper ar-d/media/suse "Local Repository"
#
#
# Add a New User user1
Useradd-m user1
echo User1 | Passwd--stdin user1
]]>
</source>
</script>
</init-scripts>
</scripts>
</profile>
4. Check if the modified auotinst.xml file is malformed
linux-e5qd:~# Xmllint/srv/ftp/autoinst.xml (Prompt if there is an error)
. Client Installation Testing
1. When you start the client and press F12 to install from the network, the system automatically obtains the IP address and starts the system installation
2. After the installation, script modify.sh and its execution log can be found in the/var/adm/autoinstall directory, script modify.sh in the/var/adm/autoinstall/scripts directory , the execution log is in the/var/adm/autoinstall/logs directory, and if no execution succeeds, you can view the log
Note: This is how the system executes the init-scripts script
/bin/sh-x <script_name> 2&>/var/adm/autoinstall/logs/<script_name>.log
This article from "Never Stop" blog, declined reprint!
Unattended Installation SLES11