Code Monkey home page Code Monkey logo

ubuntu-kickstart-cd-maker's Introduction

make-automated-install-cd.sh

What does this script do?

This script lets you create a completely automated Ubuntu Server installation CD (default:18.04.2 64 bit) that you can boot on any PC and have a working server in minutes without ever touching a keyboard. To do so, simply modify the Requesting hostname section. By default, you are required to enter the hostname for each installation.

How does it do it?

It downloads the official installation CD ISO from the ubuntu file servers, remasters it with a KickStart file, configures a few other files, and creates a new ISO file you can burn onto a disk.

Based on this askubuntu.com thread.

How do I run it?

If you're happy with Ubuntu server 18.04.2 64 bit, just download/clone the repository, chdir to it, and run the script:

./make-automated-install-cd.sh

If you want another version, edit the script. (TODO: preload other distros/versions).

What is the default name and password?

Default username is user and password is pass.

What are the other files in this repo?

3 files are copied onto the CD image:

  • ks.cfg - This is the kickstart configuration file. Either edit by hand, or use system-config-kickstart. Copied to the root directory of the image (/).
  • isolinux.cfg - Copied to /isolinux on the image. The only thing I changed from the default is to set the timeout value to 10 (instead of 0, which means no timeout) so that you don't have to select a language upon boot.
  • txt.cfg - This is the file that contains that list boot options when you boot a Linux box. You can set kernel boot parameters here. Note that I added ks=cdrom:/ks.cfg to the params. Also copied to /isolinux on the image.

*.MD5SUM is the md5sum file for default ISO file which the script points to. If you want to try a different distro, you'll need to download it manually, create a similar file with (md5sum foobar.iso > foobar.iso.MD5SUM) and edit the script accordingly.

Why would I want to use a disk over network booting with PXE/TFTP/etc?

CD installation does not depend on a central network boot server to be configured on the same network as the machine. Also, I don't configure PXE/TFTP/DHCP often enough to be able to trouble-shoot them without googling. Then again, I only manage a few dozen machines.

How do I do XYZ?

I don't know much about kickstart besides what is in this repo. But, consider this: you can add a [%post] post section to the kick start configuration file which lets you run arbitrary commands after the installation (but before rebooting). This should be enough to create config files for you favorite configuration management system (puppet/chef/salt/cfengine/whatever), which you should be using instead of trying to hack at kickstart for post-installation configuration.

How do I add packages to be installed during the automated installation?

You can add the packages at the end of the ks.cfg file.

Will it work on other distros?

Probably, at least for Ubuntu and Debian based distros. Just edit the variables in the script and create a iso-file-name.MD5SUM file.

Why does the script ask for my root password?

Because apparently, in order to extract an ISO file on linux, you need to mount it with the 'loop' option, and you need root permissions to mount anything on Linux. This is stupid. Note that if you google this, you'll find links that says you can use the 7zip program, BUT do not believe them: 7zip has a bug in Linux where files extracted from an ISO with long file names get truncated (!).

What is a preseed file?

I'm not sure, but apparently you need to pass it to the kernel params along with the ks.cfg file. There are default preseed files on the CD under the /preseed/ directory, and I use the ubuntu-server.seed file. Perhaps there are interesting things in there.

Resources

ubuntu-kickstart-cd-maker's People

Contributors

noxouille avatar tnishimura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ubuntu-kickstart-cd-maker's Issues

'keyboard de' not working

I'm using the script to generate an auto-install ubuntu 18.04.3 server image, however if I change the system keyboard setting to de, instead of us, the installed system still has the us keyboard layout.
Any idea what's going on?

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.