Linux PXE network installed unattended

Source: Internet
Author: User

Project analysis
The realization of the remote installation:
Configuration Dhcp+http+tftp provides
Graphical PXE menu via VESAMENU.C32 module
Provide KS answer files for different systems separately
The third-party RPM package is provided as a Yum Source:
Centrally available RPM packages for Ntfs-3g,libreoffice
Establish Repodata through Createrepo

Project Difficulty Analysis:
PXE Graphics boot Menu
Files that need to be prepared (provided by package syslinux-*)
Graphics Support module:/tftp root directory/vesamenu.c32
Background image file:/tftp root directory/splash.jpg
[Email protected] ~]# yum-y install Syslinux
[[Email protected] ~] #cd/var/lib/tftpboot
[Email protected] tftpboot]# RPM-QL syslinux-nonlinux| grep VESA
[[email protected] tftpboot~] #cp/usr/share/syslinux/vesamenu.c32/var/lib/tftpboot/
[Email protected] tftpboot]# RPM-QL syslinux | grep jpg
[Email protected] tftpboot]# cp/usr/share/doc/syslinux-4.04/sample/syslinux_splash.jpg/var/lib/tftpboot/ Splash.jpg
[[Email protected] ~] #ls/var/lib/tftpboot
Initrd.img pxelinux.0 pxelinux.cfg splash.jpg vesamenu.c32 vmlinuz
[Email protected] ~]# CD myiso/isolinux/
[[email protected] isolinux]# ls
Boot.cat grub.conf isolinux.bin memtest TRANS. TBL Vmlinuz
Boot.msg initrd.img isolinux.cfg splash.jpg VESAMENU.C32
[email protected] isolinux]# cat isolinux.cfg >/var/lib/tftpboot/pxelinux.cfg/default (the isolinux.cfg of this directory is covered in/TFTP Under
[[email protected] tftpboot]# mkdir redhat (Create Rehat folder)
[[email protected] tftpboot]# mkdir CentOS (create CentOS folder)
[[email protected] tftpboot]# ls
CentOS pxelinux.0 Redhat VESAMENU.C32
Initrd.img pxelinux.cfg splash.jpg Vmlinuz
[[Email protected] tftpboot]# mv Vmlinuz initrd.img redhat/(Create Rehat and CentOS folders, place the respective kernel files in the corresponding directory)
[[email protected] pxelinux.cfg]# cd/var/ftp/(Place an answer file and mirror in this directory)
Centos.cfg Pub redhat.cfg Rhel6

Configuration essentials:
Modify the configuration file tftp root/pxelinux.cfg/default
Default VESAMENU.C32 (Start graphics module)
#prompt 1
Timeout-
........
Menu Background splash.jpg (specify background picture)
Menu title Welcome to Red Hat Enterprise Linux 6.7! (menu title)
Label Redhat (Startup item text
Menu Label Install ^redhat (^ used to define shortcut keys)
Kernel redhat/vmlinuz
Append ks=ftp://192.168.4.7/redhatks.cfg INITRD=REDHAT/INITRD.IMG (Auto answer file to/var/ftp/to create the corresponding file)
label CentOS
Menu label Install ^centos
Kernel Centos/vmlinuz
Append ks=ftp://192.168.4.7/centosks.cfg initrd=centos/initrd.img (auto answer file to/var/ftp/to create the corresponding file)
Label Rescue
Menu label ^rescue redhat (rescue mode)
Kernel redhat/vmlinuz
Append initrd=initrd.img Rescue
Label redcue
Menu label Install ^rescue centos (rescue mode)
Kernel centos/vmlinuz
Append initrd=initrd.img rescue
label Local
Menu label Boot from ^local Drive
meni default
localboot 0xffff

Create a non-root account
[[Email protected] ~] #useradd-u 0-o admin
[[Email protected] ~] #echo 12345 |passwd--stdin Admin

Creating a Yum source through Createrepo
[[email protected] ~]# yum-y install Createrepo (Installing the Yum Warehouse configuration)
[[Email protected] ~] #mkdir/var/tfp/yum1 (Create folder)
[Email protected] ~]# CP-RF rpms/*.rpm langpack_zh-cn/*.rpm/var/ftp/yum1/(Prepare software catalog)
[[email protected] ~]# createrepo/var/ftp/yum1/(Generate Yum Warehouse archive)
[[email protected] ~]# Yum-config-manager--add-repo ftp://192.168.4.7/yum1 (add a new Yum source)
[Email protected] ~]# vim 192.168.4.7_yum1.repo
[192.168.4.7_YUM1]
name=added FROM:FTP://192.168.4.7/YUM1
Baseurl=ftp://192.168.4.7/yum1
Enabled=1
Gpgcheck=0 (add 0, unsigned package)

Linux PXE network installed unattended

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.