If you are trying to find a step-by-step solution post, this post is NOT for you. Please go to here to have a step-by-step solution http://tai271828.blogspot.tw/2018/04/make-unattended-installation-of-ubuntu.html .
The longevous and respectable installer, debian-installer (d-i), provides powerful feature to customize and automate your installation by preseed, which is a configuration file to answer the questions of the installation prompt. The core question is: how do I know which question regarding which prompt, and what answer is acceptable or understandable by d-i?
If you check the d-i manual to try to answer the above question, you will find (1) the document enlists basic question-answers grouping by features (2) the groups collect basic description and may not elaborate the details for each question-answer item (3) you may customize your installation but you don't find the question-answer matches your requirement.
To overcome the lack of information, I did
(1) (default, RTFM ;) ) check the manual.[1]
(2) search example preseed file developed by others. google or check others' open source projects.
(3) find a workable benchmark. (debconf-get-selections is a useful and promising solution)
Regarding (1), I read the manual in this way very often: (a) confirm my goal ("What question I want to solve? Describe it in technical action item words.") (b) imagine what the solution may look like. What the design of the solution may be. (c) find the possible design from the manual (d) if nothing was found, skim the sub-titles of the manual, and go back to (a)(b)(c). Read the document line-by-line is the final action which may or may not be considered to adapt.
Regarding (2), google may be useful (google "unattended ubuntu server preseed github", for example) or NOT. Targeting on open source projects and have a look of their source is more efficient in my experience, especially the project is still a working and alive project.
Regarding (3), this skill is also suggested by
Effective Debugging: 66 Specific Ways to Debug Software and Systems: Item 5 Find the Difference between a Known good System and a Failing One [2]. To create the benchmark of a good system (with working answers to the questions),
debconf-get-selections is a tool to dump the contents of the debconf database[3], which contains the question-answers in your system. You may want to append
--installer when using debconf-get-selection to fetch the question-answers of installation stage.
A usual way looks like this:
- Prepare a working system installed manually and answered all prompted as your wish. VM may be a good choice.
- Login the working system. Dump the question-answers by debconf-get-selections --installer
- Compare the question-answers or find possible question-answers against to the prompt you want to bypass automatically.
This is a bit trial-and-error flow. Setup an easy flow to repeat will be helpful very much.
[1] Usually Appendix B. is recommended https://www.debian.org/releases/stable/amd64/apb.html.en
[2] https://books.google.com.tw/books?id=Fa6JDAAAQBAJ&pg=PT125&lpg=PT125&dq=effective+debugging+titles&source=bl&ots=moKocciySF&sig=HuoF5Dl3mJBoGf84YUXix-Hk5ic&hl=en&sa=X&ved=2ahUKEwjFwajc3c3aAhXNNpQKHa6dDocQ6AEwA3oECAAQSQ#v=onepage&q=effective%20debugging%20titles&f=false
[3] By default there is not debconf-get-selections, you may need to install it by "apt-get install debconf-utils" to get it.