How to run a pre-seeding config with Debian Installer (d-i)?

Help with issues regarding installation of Debian

How to run a pre-seeding config with Debian Installer (d-i)?

Postby _nobody_ » 2018-04-10 03:21

Hello to everyone,

I would like to understand the following: How to run a pre-seeding configuration using the Debian Installer (d-i), so I can build/install non-interactively Debian distro (without Graphical help)?

As I understand, there are several ways how to do this:
[1] Having Debian distro with the pressed configuration (does such Debian distro flavour exist?)?
[2] Having Debian installer (d-i) out of box (where I can find d-i as independent binary)?
[3] Having USB distro with added pre-seed configuration?
[4] You name it (waiting for other proposals)!

But I am not certain. :idea:

Thank you,
_nobody_
_nobody_
 
Posts: 12
Joined: 2018-04-10 02:07


Re: How to run a pre-seeding config with Debian Installer (d

Postby _nobody_ » 2018-04-10 04:09

_nobody_ wrote:[2] Having Debian installer (d-i) out of box (where I can find d-i as independent binary)?

The easiest way would be to have Debian installer (d-i) in the form of the source code, as tarball (tar.bz2), unpack it, configure, make and then make install.

Could you, please, point to me to such a thing, if it does exist (it should, since the Debian is an Open Source)?

If not, any net source of d-i source code would be cool! :mrgreen:

Thank you,
_nobody_
_nobody_
 
Posts: 12
Joined: 2018-04-10 02:07

Re: How to run a pre-seeding config with Debian Installer (d

Postby llivv » 2018-04-11 00:48

which of the Examples in the Doc from the link provided by 4D696B65 above would best fit your plan?

FAI might be another option if you need enterprise strength imaging rollout.
in the kitchen with Julia ....
The Past, Christmas Present and Future
Get it on the Dbus to Bcan
User avatar
llivv
 
Posts: 5617
Joined: 2007-02-14 18:10
Location: willo the tree

Re: How to run a pre-seeding config with Debian Installer (d

Postby _nobody_ » 2018-04-12 10:42

llivv wrote:which of the Examples in the Doc from the link provided by 4D696B65 above would best fit your plan?


Good question. I assessed the situation, and the following suites me the best (in RED), seems (I need to do more exploratory work here):

Loading the preseeding file from a webserver

Most install methods you can interrupt early on and add a URL to a preseed file, for an almost fully automated installations. Here exemplified with the graphical installer:

When the graphical installer boot menu appears, press ESC
(Type "help" if you want view generic help)

Type "auto url=http://webserver/path/preseed.cfg", replacing the URL with the address to your preseed configuration file

The "auto" command launches the installation in the automated mode, where the configuration of hostname, locale and keymap are postponed so that they can be answered from the preseed file loaded from the network. You could use "install url=..." but you'd have to answer these questions manually, regardless of what you have in the preseed config. If a server path isn't specified the path 'd-i/<codename>/preseed.cfg' will be tried, for example d-i/stretch/preseed.cfg.

In other words, I unpacked .iso with xarriso, and got the RD/WR .iso directory tree:
[
Code: Select all
vuser@localhost extracted]$ ls -al
total 36
drwxr-xr-x. 9 vuser vboxusers 4096 Apr 12 12:01 .
drwxr-xr-x. 4 vuser vboxusers 4096 Apr 12 12:34 ..
drwxr-xr-x. 3 vuser vboxusers 4096 Mar 10 12:39 boot
drwxr-xr-x. 3 vuser vboxusers 4096 Apr 12 12:10 d-i
drwxr-xr-x. 2 vuser vboxusers 4096 Mar 10 12:40 .disk
drwxr-xr-x. 3 vuser vboxusers 4096 Mar 10 12:40 dists
drwxr-xr-x. 2 vuser vboxusers 4096 Mar 10 12:40 isolinux
drwxr-xr-x. 2 vuser vboxusers 4096 Mar 10 12:39 live
drwxr-xr-x. 3 vuser vboxusers 4096 Mar 10 12:40 pool
[vuser@localhost extracted]$

So, if I cd to d-i/, I see that I need to create directory stretch/ (it does NOT exist), and there I need to pass https://www.debian.org/releases/stable/ ... reseed.txt as preseed.cfg. Then I need to pack back the whole tree back to modified .iso.

Now... I have few questions to this what I wrote above.
[question] If I unpack .iso, implant d-i/stretch/preseed.cfg, and pack it back as .iso, does this mean that if I run:
## Start Debian .iso for the first time!
VBoxManage startvm $vmname --type headless

The preseed.cfg will run automatically???

Does this, what I write here, make sense, llivv? :mrgreen:

There are other problems I have noticed, but let us go step by step! :idea:

Thank you,
_nobody_
_nobody_
 
Posts: 12
Joined: 2018-04-10 02:07

Re: How to run a pre-seeding config with Debian Installer (d

Postby llivv » 2018-04-14 02:46

It looks to me like you have sharpened your learning curve big time.

First you have to adjust your config to the virtual machine.
Next, you are looking at a headless install (which is at least twice as difficult as a normal install )
As if preseeding isn't difficult enough on it own.

here are some links that may help you sort things a bit

B.1.2. Limitations
https://www.debian.org/releases/stable/ ... imitations

after you read the Limitations scroll up to the top of the page and read the Introduction.
B.1. Introduction

Debian GNU/Linux Installation Guide
https://www.debian.org/releases/stable/ ... ex.html.en

After the 8 Chapters of How to Install And Configure Debian (the normal way) ----
There are the Advanced Features:

Section A
A. Installation Howto - is an Installation How To refresher that was initally covered in Chapters 2, 3 and 4
Section B
B. Automating the installation using preseeding
Shows the reader what is involved in automating a Debian installation

I read in this forum "once", that someone who asked about a preseed file, found a premade template file that worked for them somewhere else ( didn't mention where ) and it was many years ago.

It's a lot of reading THAT IS for sure, and as the Limitations hint at getting the preseed file RIGHT is not a trivial task.
in the kitchen with Julia ....
The Past, Christmas Present and Future
Get it on the Dbus to Bcan
User avatar
llivv
 
Posts: 5617
Joined: 2007-02-14 18:10
Location: willo the tree


Return to Installation

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable