Use the preseed script to install Ubuntu 14.04

Source: Internet
Author: User
Tags gz file

Use the preseed script to install Ubuntu 14.04

Using PXE to install a Linux system is the most basic task in system integration and is also the easiest to ignore. Usually, once the system is installed, it is seldom ignored.

There are already many PXE integration tools, such as cobbler.

However, we still use DHCP + TFTP + HTTP to install the Linux system to reduce the investment time.

PXE Server is based on Ubuntu12.04-server-amd64 configuration, CentOS System Using kickstart script installation, Ubuntu System Using preseed script installation.

The kickstart script of CentOS can be directly configured and generated through the kickstart graphic interface.

For the preseed script of Ubuntu, manual configuration is always used.

1. Use the local HTTP proxy instead of the Public HTTP proxy

Previously, during the installation of Ubuntu 12.04 using the preseed script, the common HTTP mirror (cn.archive.ubuntu.com) was used for installation ).

The mirror configuration in the preseed script:

D-I mirror/protocol string http
D-I mirror/http/hostname string cn.archive.ubuntu.com
D-I mirror/http/directory string/ubuntu
D-I mirror/http/proxy string

Today, I suddenly thought of using a local proxy, So I configured the preseed file of Ubuntu12.04.4 to the local HTTP server.

D-I mirror/country string manual
D-I mirror/protocol string http
D-I mirror/http/hostname string 172.16.112.133 # HTTP Server
D-I mirror/http/directory string/ubuntu12.04.4 # ISO directory
D-I mirror/http/proxy string http: // 172.16.112.20./ # proxy address

After the local HTTP server is used, the following error occurs during installation:

Ubuntu 12.04 preseed debootstrap warning.

Http: // 172.16.112.20./ ubuntu12.04.4/dists/precise/main/binary-amd64/Packages.gz was upt.

Ignore this warning. Click "continue" to continue the installation.

After Google, some netizens suggested that using the ISO version of alternate can avoid this problem, but the installation of the ISO file of alternate version will still trigger an alarm.

After the experiment, the package.gz file is downloaded from cn.archive.ubuntu.comto the HTTP server, and a warning still appears.

2. Configure and install the preseed script of Ubuntu14.04

Ubuntu14.04 some changes will occur when you use the preseed script for installation.

1. During installation, you must add an automatic processing script to detach the original disk:

### Unmount the/dev/sda1.
D-I preseed/early_command string umount/media

2. During Ubuntu system installation, you must handle the live-installer issue.

In Versions later than ubuntu12.10, When you install base system, an error occurs:

Main-menu [954]: info: Menu item 'Live-installer' selected

Base-installer: error: cloud not find any live images.

You need to add live-installer in the preseed script for processing:

### After the Ubuntu12.10, preseedfile need live-installer.

D-I live-installer/net-image string http: // 172.16.112.20./ ubuntu14.04.2/install/filesystem. squashfs

After the above processing, the preseed script used to install the ubuntu-14.04.2-server-amd64 system is:

### Localization.
D-I auto-install/enable boolean true
D-I debian-installer/locale string en_US
D-I localechooser/translation/warn-light boolean true
D-I localechooser/translation/warn-severe boolean true
D-I console-setup/ask_detect boolean false
D-I keyboard-configuration/layoutcode string us

### Net interface setting.
D-I netcfg/choose_interface select eth0
D-I netcfg/dhcp_timeout string 60
D-I netcfg/get_hostname string nova
D-I netcfg/get_domain string xinlixun.cn

### Mirror setting. use the local proxy.
D-I mirror/country string manual
D-I mirror/protocol string http
D-I mirror/http/hostname string 172.16.112.133
D-I mirror/http/directory string/ubuntu14.04.2/
D-I mirror/http/proxy string http: // 172.16.112.133/

### Clock and timezone setting. use local ntp.
D-I clock-setup/utc boolean true
D-I time/zone string Asia/Chongqing
D-I clock-setup/ntp boolean true
D-I clock-setup/ntp-server 172.16.112.133

### Partioning setting.
# D-I partman-auto/disk string/dev/sda
D-I partman-auto-lvm/guided_size string max
D-I partman-auto/choose_recipe select atomic
D-I partman-auto/method string lvm
D-I partman-lvm/confirm boolean true
D-I partman-lvm/confirm boolean true
D-I partman-lvm/confirm_nooverwrite boolean true
D-I partman-lvm/device_remove_lvm boolean true
D-I partman/choose_partition select finish
D-I partman/confirm boolean true
D-I partman/confirm_nooverwrite boolean true
D-I partman/confirm_write_new_label boolean true

### Account setting.
D-I passwd/root-login boolean false
D-I passwd/user-fullname string test
D-I passwd/username string test
D-I passwd/user-password test123
D-I passwd/user-password-again password test123
D-I user-setup/allow-password-weak boolean true
D-I user-setup/encrypt-home boolean false

### After the Ubuntu12.10, preseedfile need live-installer.
D-I live-installer/net-image string http: // 172.16.112.20./ ubuntu14.04.2/install/filesystem. squashfs

### Package selection.
D-I pkgsel/include string openssh-server
D-I pkgsel/upgrade select none
D-I pkgsel/update-policy select none
Tasksel/first multiselect standard, ubuntu-server

### Boot loader installation.
D-I grub-installer/only_debian boolean true
D-I grub-installer/with_other_ OS boolean true

### Finishing up the installation.
D-I finish-install/reboot_in_progress note

### Running commandm commands.
D-I preseed/late_command string echo "hello">/root/test

### Unmount the/dev/sda1.
D-I preseed/early_command string umount/media

Download, install, and configure Ubuntu 14.04

Ubuntu 14.04 system:

Ubuntu 14.04 text tutorial on hard drive installation in Windows 7

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.