Last year, I wrote a post about how to install Ubuntu 18.04 Server automatically. The major reason why I choose to install the older version is I failed to make Ubuntu 20.04 install without pressing any key at that time while the approach for the offline installation recommended by the official is not working.
There is an article already described the detailed steps about the automatic installation of Ubuntu 20.04 Server, but according what its author said, their blog system ripped out some important characters. So, by checking with this script, I figured out the correct way to achieve our goal.
Download the image
Download the live CD image in whichever way you prefer. For the user locates in China, I would suggest you download from https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/focal/ubuntu-20.04.3-live-server-amd64.iso.
Update some files in ISO image
Only thing we need to do is updating several files. And here are some recommended editors.
- For Windows user, I strongly recommend you use
Ultraisoto edit the ISO file.
- For Linux user,
ISO Mastershould work. (I didn't try it before.)
- For the user who wants to deeply customize the ISO file, including unpacking
cubicis everything you need. You can refer to my previous post and learn how it works.
Add Kernel Arguments
Assume the root directory of ISO image is
/cdrom. There are two bootloader configuration files need to modify, one for UEFI system, one for the legacy one.
Append the kernel arguments like this,
Note: HWE Kernel is a higher version of Linux kernel compared to the default one, which is shipped with the newer drivers. Theoretically, it has a better support for the latest hardware.
Add Auto-install Configurations
Two new files are also required for automatic answering.
This configuration is what I am using now, and it is for the machine without Internet. I have verified that it can make the installation procedure fully automatic.
directstorage layout means using and erasing the whole disk. (The default option provided by the interactive installer.)
- The password is
ubuntu. This can be generated by
For more usages, check this example.
Just create an empty file and put it there.