Code Monkey home page Code Monkey logo

ubuntu-unattended's Introduction

Unattended Ubuntu ISO Maker

This simple script will create an unattended Ubuntu ISO from start to finish. It will ask you a few questions once, and embed your answers into a remastered ISO file for you to use over and over again.

This script creates a 100% original Ubuntu installation; the only additional software added is openssh-server. There is no apt-get update performed. You have all the freedom in the world to customize your Ubuntu installation whichever way you see fit. This script just takes the pain out of re-installing Ubuntu over and over again.

Created by: Harald van der Laan

Compatibility

The script supports the following Ubuntu editions out of the box:

  • Ubuntu 16.04.3 Server LTS i386 - Xenial Xerus
  • Ubuntu 16.04.3 Server LTS amd64 - Xenial Xerus
  • Ubuntu 14.04.5 Server LTS i386 - Trusty Tahr
  • Ubuntu 14.04.5 Server LTS amd64 - Trusty Tahr

This script has been tested on and with these two versions as well, but I see no reason why it shouldn't work with other Ubuntu editions. Other editions would require minor changes to the script though.

Usage

  • From your command line, run the following commands:
$ git clone https://github.com/hvanderlaan/ubuntu-unattended
$ sudo ./create-unattended-iso.sh

or

$ wget https://raw.githubusercontent.com/hvanderlaan/ubuntu-unattended/master/create-unattended-iso.sh
$ chmod 0744 create-unattended-iso.sh
$ sudo ./create-unattended-iso.sh
  • Choose which version you would like to remaster:
 +---------------------------------------------------+
 |            UNATTENDED UBUNTU ISO MAKER            |
 +---------------------------------------------------+

 which ubuntu edition would you like to remaster:

  [1] Ubuntu 16.04.3 LTS Server i386  - Xenial Xerus
  [1] Ubuntu 16.04.3 LTS Server amd64 - Xenial Xerus
  [3] Ubuntu 14.04.5 LTS Server i386  - Trusty Tahr
  [4] Ubuntu 14.04.5 LTS Server amd64 - Trusty Tahr

 please enter your preference: [1|2|3|4]:
  • Enter your desired timezone; the default is Europe/Amsterdam:
 please enter your preferred timezone: Europe/Amsterdam
  • Enter your desired username; the default is <login name>:
 please enter your preferred username: user
  • Enter the password for your user account; the default is empty
 please enter your preferred password:
  • Confirm your password:
 confirm your preferred password:
  • Sit back and relax, while the script does the rest! :)

What it does

This script does a bunch of stuff, here's the quick walk-through:

  • It asks you for your preferences regarding the unattended ISO
  • Downloads the appropriate Ubuntu original ISO straight from the Ubuntu servers; if a file with the exact name exists, it will use that instead (so it won't download it more than once if you are creating several unattended ISO's with different defaults)
  • Downloads the netson preseed file; this file contains all the magic answers to auto-install ubuntu. It uses the following defaults for you (only showing most important, for details, simply check the seed file in this repository):
  • Language/locale: en_US
  • Keyboard layout: US International
  • Root login disabled (so make sure you write down your default usernames' password!)
  • Partitioning: LVM, full disk, single partition
  • Install the mkpasswd program (part of the whois package) to generate a hashed version of your password
  • Install the genisoimage program to generate the new ISO file
  • Mount the downloaded ISO image to a temporary folder
  • Copy the contents of the original ISO to a working directory
  • Set the default installer language
  • Add/update the preseed file
  • Add the autoinstall option to the installation menu
  • Generate the new ISO file
  • Cleanup
  • Show a summary of what happended:
 installing required packages
 remastering your iso file
 creating the remastered iso
 -----
 finished remastering your ubuntu iso file
 the new file is located at: /tmp/ubuntu-14.04.3-server-amd64-unattended.iso
 your username is: <your login name>
 your password is: 
 your hostname is: ubuntu
 your timezone is: Europe/Amsterdam

Once Ubuntu is installed ...

Just fire off the init.sh script in your user's home directory to complete the installation.

$ sudo ~/init.sh

Licensing

ubuntu-unattended is licensed under the GPLv3:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

For the full license, see the LICENSE file.

ubuntu-unattended's People

Contributors

hvanderlaan avatar kemichal avatar synt3x avatar bingws avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.