Ubuntu 16.04 Pxe+kickstart Deployment System

Source: Internet
Author: User

#PXE +tftp+kickstart Automatic deployment of server systems
System Ubuntu16.04
Apt-get Install Isc-dhcp-server
Vim/etc/default/isc-dhcp-server
Interfaces= "ens160"

Append in/etc/dhcp/dhcpd.conf

Allow Booting;allow Bootp;ddns-update-Style Interim;ignore Client-updates;subnet172.16.80.0Netmask255.255.255.0{option Subnet-mask255.255.255.0; option Domain-name-servers172.16.80.0; Range Dynamic-bootp172.16.80.220 172.16.80.230;d efault-lease- Time 21600; Max-lease- Time 43200; next-server172.16.80.26; filename"pxelinux.0";}


#重启dhcp服务
Service Isc-dhcp-server Restart

#安装tftp服务
Apt-get Install TFTPD-HPA

#安装nginx
Apt-get Install Nginx
#上传系统镜像到主机放到/usr/local/src, then mount to the Nginx site Directory
Mount/usr/local/src/ubuntu-16.04.3-server-amd64.iso/var/www/html/ubuntu

Cp-r/var/www/html/ubuntu/install/netboot/*/var/lib/tftpboot/

cp/var/www/html/ubuntu/preseed/ubuntu-server.seed/var/www/html/
#vim/var/www/html/ubuntu-server.seed End Add:

string http://10.0.0.100/UBUNTU/INSTALL/FILESYSTEM.SQUASHFSstring Openssh-server

Installing Kickstart

Vim/var/www/html/ks.cfg

#Generated by Kickstart Configurator#platform=AMD64 or Intel em64t#system languagelang en_us#language modules toInstalllangsupport en_us#system keyboardkeyboard us#system mousemouse#system timezonetimezone--UTC asia/shanghai#root PASSWORDROOTPW--disabled#initial user#user ddif--fullname"Ddif"--iscrypted--password $1$Umx 1cgrj$. Prarn7ap66xbosybu4n1user Ddif--fullname"Ddif"--password bosybu4n1#reboot after installationreboot#use text modeInstallText#install OS instead of upgradeInstall#Use Web Installationurl--url http://172.16.80.25/ubuntu#System bootloader Configurationbootloader--location=MBR #Clear the Master Boot recordzerombr yes#partition clearing Informationclearpart--all--Initlabel#disk Partitioning Informationpart/--fstype Ext4--size1024x768--asprimary--ondisk Sdapart Swap--size ---ondisk sda#system Authorization Infomationauth--useshadow--Enablemd5#firewall Configurationfirewall--Disabled#do not configure the X Window systemskipx%PostEcho "deb http://cn.archive.ubuntu.com/ubuntu/xenial main restricted">/etc/apt/sources.listEcho "deb http://cn.archive.ubuntu.com/ubuntu/xenial-updates main restricted">>/etc/apt/sources.listEcho "Deb Http://cn.archive.ubuntu.com/ubuntu/xenial Universe">>/etc/apt/sources.listEcho "Deb Http://cn.archive.ubuntu.com/ubuntu/xenial-updates Universe">>/etc/apt/sources.listEcho "Deb Http://cn.archive.ubuntu.com/ubuntu/xenial Multiverse">>/etc/apt/sources.listEcho "Deb Http://cn.archive.ubuntu.com/ubuntu/xenial-updates Multiverse">>/etc/apt/sources.listEcho "deb Http://cn.archive.ubuntu.com/ubuntu/xenial-backports main restricted universe multiverse">>/etc/apt/sources.list

Modify the/var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg

DefaultInstalllabelInstallMenu Label^installmenu defaultkernel Ubuntu-installer/amd64/linuxappend ks=http://172.16.80.25/ks.cfg preseed/url=Http://172.16.80.25/ubuntu-server.seednetcfg/get_nameservers=172.16.80.25 vga=788 initrd=ubuntu-installer/amd64/initrd.gz---quietlabel Climenu label^command-lineInstallkernel ubuntu-installer/amd64/linuxappend Tasks=standard pkgsel/language-pack-patterns= pkgsel/Install-language-support=falseVga=788initrd=ubuntu-installer/amd64/initrd.gz---quiet

Ubuntu 16.04 Pxe+kickstart Deployment System

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.