Make ubuntu16.04 automatically install ISO image

Source: Internet
Author: User
Tags gz file locale disk usage

Download Ubuntu image installation, interactive mode need to manually configure a lot of things, in order to quickly install, special production automatic installation image, easy to install the system.

Production method:

Download the official website image ISO file: Ubuntu-16.04.4-server-amd64.iso (http://mirrors.zju.edu.cn/ubuntu-releases/16.04/ Ubuntu-16.04.4-server-amd64.iso)

    1. cd/root/
    2. wget http://mirrors.zju.edu.cn/ubuntu-releases/16.04/ubuntu-16.04. 4-server-amd64.iso
    3. mkdir MNT
    4. Mount ubuntu-16.04. 4-server-amd64.iso mnt/
    5. Cp-rf./mnt/*./mnt/.disk/./ubuntu/ #将挂载的镜像目录copy到ubuntu目录中

After copying the image file, modify the relevant configuration file according to the following link:

Http://www.linuxdiyf.com/linux/16044.html

1. Replace the contents of the Isolinux.cfg file with the following (see the link above for instructions)

CP Ubuntu/isolinux/isolinux.cfg{,.bak}

-------------------------------------------

Default AutoInstall
Prompt 0
Timeout 100
Menu Title Custom Live CD
Menu Background Splash.png
Menu Color title 1;37;44 #c0ffffff #00000000 std
Label AutoInstall
Menu label Autoinstall-auto Install Ubuntu
Kernel/install/vmlinuz
Append initrd=/install/initrd.gz file=/cdrom/preseed/ubuntu-server.seed boot=install Debian-installer/locale=en_US Console-setup/ask_detect=false keyboard-configuration/layoutcode=us automatic-ubiquity Quiet Splash--

------------------------------------------------------

2. Replace the contents of the Ubuntu-server.seed file with the following (see the link above for instructions)

CP Ubuntu/preseed/ubuntu-server.seed{,.bak}

-------------------------------------------------------------------------------------

#locate

D-i Debian-installer/locale String en_US
D-i Console-tools/archs Select True
D-i debian-installer/language string en
D-i Debian-installer/country String US

D-i localechooser/supported-locales MultiSelect en_US. UTF-8, ZH_CN. UTF-8

#keyboard
D-i Console-setup/ask_detect Boolean False
D-i Console-configuration/layoutcode String US
D-i Keyboard-configuration/modelcode String SKIP

#clock
D-i CLOCK-SETUP/UTC Boolean False
D-i Time/zone String Asia/shanghai

#network
D-i Netcfg/choose_interface Select Auto
D-i netcfg/dhcp_failed Note
D-i Netcfg/dhcp_options Select don't Configure the network at this time
D-i Netcfg/get_hostname String cc
D-i Netcfg/get_domain String Cc-domain
D-i NETCFG/WIRELESS_WEP String

# Mirror

D-i Pkgsel/language-pack-patterns String
D-i Pkgsel/install-language-support Boolean False
D-i Apt-setup/partner Boolean True
D-i Debian-installer/splash Boolean False
D-i Oem-config-udeb/frontend String debconf
D-i Mirror/http/proxy String

# clock
D-i CLOCK-SETUP/NTP Boolean True

# # Set Root password

D-i Passwd/root-login Boolean root
D-i Passwd/root-password Password root
D-i passwd/root-password-again Password root
D-i User-setup/allow-password-weak Boolean True
#user
D-i Passwd/root-login Boolean False
#d-I passwd/root-password password 123
#d-I passwd/root-password-again password 123
D-i Passwd/make-user Boolean True
D-i Passwd/user-fullname String Leo # #用户名
D-i Passwd/username String Leo # #用户名
D-i passwd/user-password Password 123 # #密码
D-i passwd/user-password-again Password 123
D-i User-setup/allow-password-weak Boolean True
D-i User-setup/encrypt-home Boolean False

# # Disk Usage

D-i Partman-auto/disk STRING/DEV/SDA
#d-I partman-auto/method string LVM
#d-I partman-auto-lvm/guided_size string max
D-i Partman-auto/method String Regular
D-i PARTMAN-LVM/DEVICE_REMOVE_LVM Boolean True
D-i Partman-md/device_remove_md Boolean True
D-i Partman-lvm/confirm Boolean True
D-i Partman-lvm/confirm_nooverwrite Boolean True
D-i Partman-auto/choose_recipe Select Atomic
D-i Partman-partitioning/confirm_write_new_label Boolean True
D-i Partman/choose_partition Select Finish
D-i Partman/confirm Boolean True
D-i Partman/confirm_nooverwrite Boolean True
#basic system
#d-I base-installer/kernel/linux/initramfs-generators string yaird

#package
Tasksel Tasksel/first MultiSelect Ubuntu-desktop
D-i pkgsel/include string Openssh-server build-essential vim Landscape-common
D-i Pkgsel/update-policy Select None

#grub
D-i Grub-installer/only_debian Boolean True
D-i Grub-installer/with_other_os Boolean True

# Finish
D-i finish-install/reboot_in_progress Note
Oem-config oem-config/steps MultiSelect Language, timezone, keyboard, user, network, tasksroot

---------------------------------------------------------------------------------------------

Once modified, repackage the Ubuntu directory into an ISO image

Mkisofs Command Use reference here (HTTP://MAN.LINUXDE.NET/MKISOFS)

mkisofs -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -o auto-ubuntu-16.04.4-server-amd64.iso  ubuntu/

The resulting ISO image that can be automatically installed is: Auto-ubuntu-16.04.4-server-amd64.iso

78963876

80827497

Complete.

Supplement, the practice found that installing ubuntu16.04 on VMware's ESXi uses this image to install the boot normally.

However, after the installation of the Dell server on the boot, normal to select the startup item, after the hard drive is found directly black screen, do not display the information at the start. As if the system is not properly installed.

The workaround is: Ctrl +alt +f1 into the tty1. Into the system after the/etc/default/grub inside the grub_cmdline_linux_default= "quiet" inside the quiet deleted can be.

Make ubuntu16.04 automatically install ISO image

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.