ubuntu14.04 Deployment Kickstart

Source: Internet
Author: User

Transferred from: http://www.mamicode.com/info-detail-1646465.html

The kickstart is used for the automatic installation system of the inner network.

Installing a system using PXE requires the installation of services such as Dhcp,tftp,http (and, of course, other file sharing methods such as NFS,FTP).

Lab Environment:

1. VMware 12

2. Network segment 10.0.0/8, PXE server ip:10.0.0.100

First, install DHCP service

You can choose to install Isc-dhcp-server or DNSMASQ (which is used more in OpenStack, and it also includes a TFTP service, which is very convenient to configure, because I'm too lazy to change because I already have DHCP and TFTP installed).

I chose Isc-dhcp-server:apt-get install isc-dhcp-server-y

Vim/etc/default/isc-dhcp-server

Interfaces= "Eth0" # or the network interface name you want to specify.

Vim/etc/dhcp/dhcpd.conf

Add at the end of the file:

Subnet 10.0.0.0 netmask 255.0.0.0 {
Range 10.0.0.101 10.0.0.200;
Option Subnet-mask 255.0.0.0;
Option routers 10.0.0.100;
Option Broadcast-address 10.255.255.255;
FileName "pxelinux.0";
Next-server 10.0.0.100;
}

Subnet, masks can be set according to their own needs

FileName "pxelinux.0";
Next-server 10.0.0.100; Specifies the PXE boot file name and IP address, Next-server also refers to the TFTP server IP.

After configuring the Restart service:

Service Isc-dhcp-server Restart

Second, the installation of TFTP services

Apt-get Install Tftpd-hpa-y

After installation is OK, using the default can, remember TFTP directory is/var/lib/tftpboot/Oh, back to use!

Third, installation apache2

Apt-get Install Apache2-y

It is also installed, the HTTP root directory is/var/www/html/.

Place the downloaded Ubuntu-14.04.5-server-amd64.iso in a directory. For example, the directory, and then the following operations;

CD ~

Mkdir/var/www/html/ubuntu

Mount Ubuntu-14.04.5-server-amd64.iso/var/www/html/ubuntu or Mount Ubuntu-14.04.5-server-amd64.iso/media and then Cp-r */media/*/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/

Then Vim/var/www/html/ubuntu-server.seed

Add at the end of the file:

D-i Live-installer/net-image String HTTP://10.0.0.100/UBUNTU/INSTALL/FILESYSTEM.SQUASHFS

Because after the ubuntu12.10 version, installing some packages will depend on the preconfigured file system, which is why the use of the Kickstart method failed to install successfully.

Iv. installation of Kickstart

Kickstart requires GUI interface, I install the desktop because it is the server installed, if it is not required to be installed, the following installation;

Apt-get Install ubuntu-desktop system-config-kickstart-y

After the installation, restart the desktop, directly startx in the virtual machine card desktop.

Kickstart interface operation is very simple, the experiment once again know the main or ks.cfg. If the VM interface is small and needs to be remote, you can install XRDP, vnc4server, and then vim ~/.xsession input: xfc4-session

Here is not much to say, search for a lot of remote Ubuntu articles.

Save Ks.cfg to/var/www/html/after the interface finishes operation

Ks.cfg content is as follows:

#Generated by Kickstart configurator#platform=amd64 or Intel em64t#system languagelang en_us#language modules to Installl Angsupport en_us#system keyboardkeyboard us#system mousemouse#system timezonetimezone--UTC Asia/Shanghai#Root PASSWORDROOTPW--disabled#initial useruser trait--fullname "trait"--iscrypted--password $1$umx1cgrj$. Prarn7ap66xbosybu4n1#reboot after installationreboot#use text mode Installtext#install OS instead of Upgradeinstall#use Web installationurl--url http://10.0.0.100/ubuntu#System bootloader configurationbootloader--location=mbr #Clear the Master Boot recordzerombr yes#partition clearing informationclearpart--all--initlabel #Disk Partitioning Informationpart/--fstype ext4--size 1024x768--asprimary--ondisk SDA part swap--size--ondisk SDA #System Authorizati On Infomationauth  --useshadow  --enablemd5 #Firewall configurationfirewall--disabled #Do not configure the X Window Systemskipx%packagesopenssh-server%post

Then modify the vim/var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg:

Default Installlabel install        menu label ^install        menu default        kernel ubuntu-installer/amd64/linux        Append ks=http://10.0.0.100/ks.cfg preseed/url=http://10.0.0.100/ubuntu-server.seed vga=788 initrd= ubuntu-installer/amd64/initrd.gz---Quiet label CLI        menu label ^command-line Install        kernel ubuntu-installer/ Amd64/linux        Append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=788 initrd=ubuntu-installer/amd64/initrd.gz---quiet

OK, now you can create an empty virtual machine to verify the installation.

The test results are basically successful, several points of attention:

1. Because I use the server is a virtual machine, and is bridged, ip:192.168.0.220, so the test server also use Bridge Mode 2. Modify the default network segment of the VirtualBox 10.x.x.x to bridge the network address 192.168.0.0/24, the server and the test machine are changed to 3. Suspect my image is damaged, install to half of the hint image may error 4. During the installation, I am prompted to write nameserver, need to fix the configuration

ubuntu14.04 Deployment Kickstart

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.