Re: Reseed Help

2012-08-28 Thread Tom H
On Mon, Aug 27, 2012 at 7:51 AM,  wrote:
>
> I am trying to implement the preseed information contained on:
> http://users.telenet.be/mydotcom/howto/linux/autoinventory.htm
>
> In the section "debian installer preseed file' there is a command
> sequence:
> TARGET="/root/inventory"
> debconf-get-selections --installer >
> $TARGET/$TARGET/list_packages_installer
> debconf-get-selections > $TARGET/list_packages
>
> 1) From the description, it sounds like list_packages_installer can be
> used as a preseed file. How do I tell the installer what the preseed
> file name is or is it the above as a default?
>
> The page states:
> "list_packages_installer will contain the options relevant to the
> debian-installer : the base system configuration. list_packages will be
> more elaborate and contains also the choices you've made during package
> installation. This can be used to re-install packages with the same
> options as on your model. It is not recommended to use these files
> directly as preseed files, but you can use the data in it to populate a
> preseed file with sensible questions and answers."
>
> 2) Does this mean that neither list_packages_installer and
> list_packages should not be used as preseed files? If not, the
> directions say to use the info to populate a preseed file with "sensible
> questions and answers". I was hoping the above would provide an
> installer preseed file, but it seems there is another file necessary? I
> have not found what needs to go in a preseed file so I don't know how to
> use the data in the two files above to make a preseed. Is there a way
> to automatically build a preseed file?
>
> I am looking for a method to reproduce specific builds and define a
> basis for modifications. I would like to use the computer to automate
> these tasks so I don't [continually] make mistakes that I must recover
> from, or at least simplify the recovery process.
>
> How to I build a preseed file from an existing system? This is a new,
> minimal system, just enough to form a basis to build a workstation step
> by recoverable step.

It's best to start from [1] and add the extra installation and
configuration steps that you want based on "debconf-get-selections"
and "debconf-get-selections --installer".

"debconf-get-selections" and "debconf-get-selections --installer" have
unset configurations and have multiple-set configurations.

If you run "debconf-get-selections | grep tzdata", there are various
timezones with blank settings.

I don't have Debian box at hand to look this up exactly, but, AFAIR,
the timezone section of "debconf-get-selections --installer" has a
zone set when countries with multiple timezones.

1. http://www.debian.org/releases/squeeze/example-preseed.txt


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=SzqC=XOpLUxe8L1Lo5YX=-jbm6o8b6zxkxteonofyf...@mail.gmail.com



Re: Re: Reseed Help

2012-08-27 Thread ray
 Bob,
 
That was great.  It is just the way I learn best.  
 
ray
 


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120827182402.1753ead7c2b35a7d15c5b99498690bcc.d7d5740330@email11.secureserver.net



Re: Reseed Help

2012-08-27 Thread Bob Proulx
r...@aarden.us wrote:
> I am trying to implement the preseed information contained on:
> http://users.telenet.be/mydotcom/howto/linux/autoinventory.htm
>
> In the section "debian installer preseed file' there is a command
> sequence:
>   TARGET="/root/inventory"
>   debconf-get-selections --installer > $TARGET/$TARGET/list_packages_installer
>   debconf-get-selections > $TARGET/list_packages

That section is derived from the official documentation here:

  http://www.debian.org/releases/stable/i386/apbs03.html.en

> 1)  From the description, it sounds like list_packages_installer can be
> used as a preseed file.  How do I tell the installer what the preseed
> file name is or is it the above as a default?

That is documented here:

  http://www.debian.org/releases/stable/i386/apbs01.html.en

And here:

  http://www.debian.org/releases/stable/i386/apbs02.html.en

There are several different options and possibilities.  I won't repeat
them here.  I think if you read through that documentation it will
answer many of your questions.  If not then keep asking questions.

> The page states:
> "list_packages_installer will contain the options relevant to the
> debian-installer : the base system configuration. list_packages will be
> more elaborate and contains also the choices you've made during package
> installation. This can be used to re-install packages with the same
> options as on your model. It is not recommended to use these files
> directly as preseed files, but you can use the data in it to populate a
> preseed file with sensible questions and answers."

Yes.

> 2) Does this mean that neither list_packages_installer and
> list_packages should not be used as preseed files?  If not, the
> directions say to use the info to populate a preseed file with
> "sensible questions and answers".

The biggest problem I see is that those files generated from
debconf-get-selections are machine generated output.  They are all
jammed together with no comments and no logical ordering.  Therefore
they are hard to maintain.  Therefore it is usually best to use them
as information to populate your own human generated files.  The files
you generate would ideally have comments and paragraphs organizing
them such as to make them maintainable.

> I was hoping the above would provide an installer preseed file, but
> it seems there is another file necessary?  I have not found what
> needs to go in a preseed file so I don't know how to use the data in
> the two files above to make a preseed.  Is there a way to
> automatically build a preseed file?

You can use that output to automatically build a preseed file.  But it
is hard to read and hard to modify later.  I started out that way but
then during the process of making changes I continually refined the
preseed file to produce exactly what I wanted.

There are a number of example preseed files posted around the net.
The problem is that preseed files by their very nature are site
specific information.  For example I set up hostnames, domain names,
disk partitions, locales, users, passwords, apt repositories, mirror
settings, installed packages, and generally make lots of installation
decisions.  Each and every one of those is a site specific choice.
Looking through my files if I were to remove or make those answers
neutral and generic there wouldn't be anything left to show!

> I am looking for a method to reproduce specific builds and define a
> basis for modifications.  I would like to use the computer to automate
> these tasks so I don't [continually] make mistakes that I must recover
> from, or at least simplify the recovery process.  I am looking for
> automation but it looks like I need understanding first.  I have been
> reading about preseeding for three weeks and thought I had an idea.  Now
> it looks like I am still missing something.

It can be a confusing thing trying to figure this out.  All you see
are an endless number of variables that can be set this way or that
way.  If you had a flowchart these decision points would all make
sense.  But initially you don't know the flow and so they are all just
a jumble of variables.  But don't despair.  It really isn't that bad.
Take each piece by itself and slowly work through things and it
suddenly all makes sense.

> How to I build a preseed file from an existing system?  This is a new,
> minimal system, just enough to form a basis to build a workstation step
> by recoverable step.

The way I did it for myself was to work through an installation once
and then use the output of debconf-get-selections to set up *just a
few* of the variables in a preseed file.  Then I installed again and
observed that those questions were answered automatically and were not
asked that time.  But other questions were asked.  I added those
variables to the preseed file and then repeated a test installation.
I again observed that those were not asked and moved through to the
next set of questions.

The trick for me was to do a little bit at a time.