- Create folder
mkdir autoinstall-ISO
cd autoinstall-ISO
- Download ubuntu-autoinstall-generator
wget https://raw.githubusercontent.com/covertsh/ubuntu-autoinstall-generator/main/ubuntu-autoinstall-generator.sh
- Add execute permission
chmod +x ubuntu-autoinstall-generator.sh
- Create folder for files that are going to be baked in to the ISO
mkdir server
- Create
user-data
andmeta-data
files in theserver
directory (user-data
is included as an attachement)
touch server/meta-data
Generate your password hash (replace PASSWORD
with your password)
openssl passwd -6 -stdin <<< PASSWORD
Replace the passord hash in user-data
.
More information about the cloud-init config can be found here.
- Create ISO image
ubuntu-20.04-autoinstall.iso
sudo ./ubuntu-autoinstall-generator.sh -a -k -u server/user-data -m server/meta-data -d ubuntu-20.04-autoinstall.iso
- Plug in your USB device that is going to be turned into bootable USB, discover it with
lsblk
→ assume that the device has the name ofsdX
- Create a bootable USB using the
dd
command, don't forget to replacesdX
with the actual name of your USB device
⚠️ This action erases all data from the USB device
sudo dd if=ubuntu-20.04-autoinstall.iso of=/dev/sdX bs=1024k status=progress && sync
- Plug in the USB into the machine where Ubuntu Server 20.04 will be installed
- Turn on the machine
⚠️ This action installs Ubuntu Server 20.04 on the target machine and can not be reverted
- Download VirtualBox
- Create new machine with at least 5 GB disk space (Create a virtual hard disk now), the Hard disk file type may be HDD (Parallels Hard Disk)
- Right click on the newly created machine → Settings → Storage → Click on the empty → Set the source as the newly created ISO with the blue CD icon on the right
- Click on Start and wait
- Wait 5-10 mins after pressing the power button
- Use
nmap
to identify the machine: port 22 will be open if ssh-server was installed (ssh
section of theuser-data
file) - SSH into the device
ssh ubuntu@<IP of the device>
Not runnable from macOS due to the use of
isolinux
:-((managed to
brew install
everything else)