Skip to content

makuk66/ubuntu-custom-iso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
sudo 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 --validate
./build.sh
rm extra-user-passwd ubuntu-uk.seed

To write the resulting ISO to a USB stick on MacOS

Copy to the Mac:

scp ubuntu-16.04.3-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.3-server-auto-amd64.iso of=/dev/rdisk4 bs=1m
diskutil eject /dev/disk4

About

Create a custom Ubuntu installer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages