Giter Site home page Giter Site logo

ubuntu-custom-iso's Introduction

Create a custom installer with preseed, with UK choices and some credentials. I use this to re-image my test cluster machines. See https://help.ubuntu.com/community/InstallCDCustomization

This setup creates an "ubuntu" user, and an extra user.

To create the ISO, on Ubuntu Linux:

# for mkpasswd:
apt-get --yes install whois

echo $USER > extra-user-username
echo "Martijn Koster" > extra-user-fullname
(printf "$USER:"; stty -echo; mkpasswd --stdin --method=sha-512; stty echo) > extra-user-passwd
cp ~/.ssh/id_rsa.pub extra-user-ssh-key
cp ubuntu-uk.seed.template ubuntu-uk.seed
password=$(<extra-user-passwd)
sed -i \
  -e 's,^\(d-i passwd/user-password-crypted password\).*,\1 '"$password," \
  -e 's,^\(d-i passwd/root-password-crypted password\).*,\1 '"$password," \
  ubuntu-uk.seed
sudo id
./build.sh
rm extra-user-passwd ubuntu-uk.seed

To write the resulting ISO to a USB stick on OSX

Copy to the Mac:

scp ubuntu-16.04.1-server-auto-amd64.iso [email protected]:ISO/

Then on the Mac:

diskutil list
diskutil unmountDisk /dev/disk4
diskutil list
# check that disk is the one you intend to overwrite
sudo dd if=/Users/mak/ISO/ubuntu-16.04.1-server-auto-amd64.iso of=/dev/rdisk4 bs=1m
diskutil eject /dev/disk4

Ideas for improvement

  • ensure all packages are available on-disk, make internet connectivity optional
  • rather than using a USB stick, I could run the installer from another partition, but that would require some custom partitioning.
  • it might be quicker/easier to backup/restore rather than install (be it from USB or disk).

ubuntu-custom-iso's People

Contributors

makuk66 avatar

Watchers

James Cloos avatar  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.