Could you please include a subject in your emails? You seem to be
replying to the messages and deleting the subject every time.

On 2020-04-28, Buck wrote:
>> Examples of usage of each of what?
>
> I was referring to this statement of yours: "profiles" defines which
> profiles are included in simple-cdd, "auto-profiles" selects which
> profiles to use at run-time without asking the user."

> I'm not sure why it didn't make it through.  I am still learning this
> cool but unusual bug reporting system.

It's just email, basically, so many of the same common ettiquette
applies here.


> Anyway, that statement made no sense to me, even after reading lots
> and lots of docs and help files.  Please provide examples of each.

I'll try again...

--profiles selects what profiles are included on the generated images,
essentially copying the files from ./profiles/ and/or
/usr/share/simple-cdd/profiles/ files onto the installer media for the
relevent profile, and determines which packages are available on the
install media.

--auto-profiles effectively preseeds which profiles to install when you
boot the installer, if you do not use --auto-profiles, it will ask you
which profiles you want to install when you boot the installer media
(e.g. USB, DVD, CD, etc.).


>> Yes, please include the contents of these files, otherwise it's
>> essentially impossible for me to understand what you're doing or what's

> Okay:
>
> --custom.preseed--
> #### Contents of the preconfiguration file (for jessie)
> ### Localization
> # Preseeding only locale sets language, country and locale.
> #d-i debian-installer/locale string en_US
>
> # The values can also be preseeded individually for greater flexibility.
> d-i debian-installer/language string en
> d-i debian-installer/country string CH
> #d-i debian-installer/locale string en_US.UTF-8

As explained in the simple-cdd README, these cannot be effectively
preseeded using a simple-cdd profile, as preseeding is loaded after the
questions are asked.

Use --locale=en_CH


> # Keyboard selection.
> d-i keyboard-configuration/xkb-keymap select us
> # d-i keyboard-configuration/toggle select No toggling

Same.

Use --keyboard=us


Both --locale and --keyboard configure the boot prompt to pass specific
preseeded debconf values, which are preseeded very early in the boot
process.


> # Root password, either in clear text
> d-i passwd/root-password password wootaler
> d-i passwd/root-password-again password wootaler
> # or encrypted using an MD5 hash.
> #d-i passwd/root-password-crypted password [MD5 hash]

Presumably, you've encoutered a warning from simple-cdd, as it cannot
verify that it's a valid preseeding file (the password configuration is
tested with a different database that requires root access, and
simple-cdd should not be run as root).


> # Alternatively, you may specify a disk to partition. If the system has only
> # one disk the installer will default to using that, but otherwise the device
> # name must be given in traditional, non-devfs format (so e.g. /dev/sda
> # and not e.g. /dev/discs/disc0/disc).
> # For example, to use the first SCSI/SATA hard disk:
> #d-i partman-auto/disk string /dev/sda

If you want automatic partitioning, you'll need to uncomment this, or it
will ask you...

And you need to make sure you're passing it a valid device, which can
get very tricky as devices may be enumerated in a non-deterministic
way. In qemu, it might be /dev/vda (libvirt) or /dev/sda (scsi, ide,
usb), for example. If you have USB sticks, the USB stick might be
/dev/sda, or the installed disk might be /dev/sda. With simple systems
that you can control, usually it'll be /dev/sda, but no guarantees.


> # Individual additional packages to install
>  d-i pkgsel/include string build-essential git w3m secure-delete rsync nmap 
> screen tmux sudo pwgen net-tools dnstools

You need these packages to be available in one of your profiles, or it
will require network access... maybe that's ok for you...


> # Due notably to potential USB sticks, the location of the MBR can not be
> # determined safely in general, so this needs to be specified:
> #d-i grub-installer/bootdev  string /dev/sda
> # To install to the first device (assuming it is not a USB stick):
> #d-i grub-installer/bootdev  string default

You need to specify this or it will ask you. And again, it needs to
match the disks you actually have available, and pick the correct ones.


> --custom.packages--
> (blank)

You probably want the packages you mentioned in your preseeding file:

  d-i pkgsel/include string build-essential git w3m secure-delete rsync nmap 
screen tmux sudo pwgen net-tools dnstools


> --custom.postinst--
> (contains a custom BASH script with private data)

You taunt me and limit my ability to help you. :P


> --custom.description--
> (contains a single-line string with private data describing the project)

You taunt me and limit my ability to help you. :P


> --custom.udebs--
> # the udeb needed for simple-cdd
> simple-cdd-profiles

This is redundant with the default profile, but shouldn't hurt anything.


>>> Wait wait whoah whoah.  The docs I've been reading for weeks don't
>>> sound like this at all.  I'm going to explain what I've been lead to
>>> believe.  You will hopefully tell me *specifically* how I am wrong,
>>> and suggest correct usage instead.
>
>>What docs are you referring to?
>
> My primary source was 
> https://www.debian.org/doc/manuals/debian-handbook/sect.automated-installation.en.html

Ok, that's the underpinnings of how debian-installer works. While the
documentation is largely relevent for simple-cdd, as simple-cdd
extensively uses the hooks provided in debian-installer, you're not
going to find documentation specific to simple-cdd there.


>>From the README:
>
>>  Default Profile
>
>>  the profile named "default" is special, because it always gets installed.
>
>>  modify the profile/default.* files with care, as simple-cdd relies upon the
>>  default profile working in certain ways ...
>
> That's a great example of what I meant, but maybe it makes sense not to bog 
> down with details.

We've had a pretty extensive back and forth, so I'm not sure "what I
meant" is referring to.


>> I don't understand where you get this impression from.
>
> So clearly the issue is that we communicate differently.  Maybe you're
> vague and I'm making assumptions.

Ok, perhaps I was a bit vague, assuming you knew about where to find
documentation for packages in Debian. If you haven't already, please
read /usr/share/doc/simple-cdd/README*


> Maybe I am just dumb today.  Each of those can be a common set of
> errors leading to situations like this.  Once we figure out the issue
> (ie - you and I use this bug report such that you explain how it
> really works) I will happily provide suggested documentation.

I hope we get there, but I'm going to need to limit the amount of energy
I commit to this unless things start to feel more specific, and thus,
productive.


>> Language selection is addressed in the README in the "Language and
>> Country Selection" heading. It's one of those special configurations. 
>
> Yes and I think I did it right (please see sample above) but I still
> get the problem of being asked for a language selection when I boot
> the VM.  Maybe I did not do it right?

Apparently, you missed the --locale configuration option mentioned in
the simple-cdd README:

  Language and Country Selection

  to pre-select the language and country, it is recommended to use the --locale
  commandline option:

  build-simple-cdd --locale en_US


>> There's also some debian-installer documentation the briefly touches
>> on what questions can be answered with which methods of preseeding:
>
>>  https://www.debian.org/releases/stable/amd64/apbs01.en.html
>
> Much too briefly.  I've read that, and I did not find it helpful.  It was 
> very abstract.

Fair enough.


>> There are a lot of other things documented in the adjacent
>> chapters.
>
> Probably, but none of them are naturally led to from the 12.3 doc, so
> they might be there but be unfound when it matters.

One of the challenges with debian-installer documentation is it is
extremely flexible, and involves a lot of moving parts that may change
at any time, which makes it very difficult to produce comprehensive
documentation.


>>>>  That said, not including or aggressively overriding contents in the 
>>>> default profile is
>>>> possible to break how simple-cdd works, so be selective in what you
>>>> override.
>>>
>>> That's not helpful!  Please point me to the docs that explain the
>>> precise interplay between default and custom profiles, including a
>>> specific list of what I must not override!
>>
>>There are no such docs. The specific values change over time largely
>>entirely outside of simple-cdd...
>
> So the solution is... to guess?

Experimentation works pretty well. There are very few options you will
need to change.

You're talking about the interaction between literally 50000+ moving
parts... but in reality, you probably only need to worry about a handful
of them.


>> Yes, I would recommend copying whatever files you need to modify from
>> /usr/share/simple-cdd/profiles/ into your working ./profiles/ directory
>> and change as little as you can to get what you want.
>
> What?  *Why would I need to modify a file from
> /usr/share/simple-cdd/profiles*?  You are making some assumption here
> that is not explained or clear.

Since the "default" profile is always included, installed, etc. when
using simple-cdd, if you want to change the behavior of the "default"
profile, you will need to copy the files from
/usr/share/simple-cdd/default.* into ./profiles/ and modify them.

You can tweak any of the other example profiles from
/usr/share/simple-cdd/profiles/ by also copying them into you working
./profiles/ directory.


>> For each file type it looks first in ./profiles/PROFILE.* and if it
>> doesn't find one, it looks in /usr/share/simple-cdd/profiles/PROFILE.*
>
> Okay, now this is clear.

GREAT!


>> The "default" profile is *always* loaded, so if you want to change
>> something in it, you need to add ./profiles/default.* for any of the
>> files you want to change or override.
>
> Ohhhhhhh.  I knew it was "always selected; it contains the bare
> minimum required for Simple-CDD to work."  But this is a little
> different.  Okay.

I'm not sure what you mean, a profile consists of the files present in
./profiles/ and/or /usr/share/simple-cdd/profiles, preferring the former
over the latter.


>> The "default" profile is loaded a little earlier than the other
>> profiles; any other simple-cdd profiles will be loaded after the
>> " default" profile preseed has run and should be able to overwrite the
>> "default" settings ... except for things that have already been used by
>> debian-installer.
>
> Two points:
>
> 1.  This should almost definitely go into 
> https://www.debian.org/doc/manuals/debian-handbook/sect.automated-installation.en.html
>  section 12.3.3.1.

That is debian-installer documentation.  If anything specific to
simple-cdd needs documentation, it belongs in the simple-cdd
documentation. For avoidance of doubt, simple-cdd profiles are specific
to simple-cdd.


> 2. How can I know which "things... have already been used by 
> debian-installer"?

The simple-cdd profiles are the result of years of working on
this(though the majority of work was in the first few months), and
effectively documents what *I* think are the questions that matter for a
fully or semi-automated install using debian-installer.


>>>> The custom.preseed file may not be loaded till later in the process; it
>>>> depends on which questions you're thinking are answered by it. There is
>>>> a question during the install that asks which simple-cdd profiles to
>>>> load; any pquestions asked before that obviously can't be preseeded.
>
> Does this imply that it is not possible to have a completely non-interactive 
> installer?

No, it does not. See /usr/share/simple-cdd/profiles/test.*


> Why does the install ask which simple-cdd profiles to load, if I use
> the --profiles switch?

Because that is exactly how it is intended to work.

The --profiles switch tells you which profiles are available on the
install media. If --auto-profiles if not specified, it will ask which
profiles to install when you're doing the install.

If you want a fully automated install for SOMEPROFILE, you'll have to
specify *both* --profiles SOMEPROFILE and --auto-profiles SOMEPROFILE.


>> [non-interactive installer] should be possible, but often time all the exact 
>> questions asked may
>> be hard to track down.
>
> Can you point me to a doc that has a complete list?

A *mostly* complete list could be found by downloading the approximately
50000+ packages in Debian and extracting the questions from the
/var/lib/dpkg/info/*.templates files. Hopefully that illustrates the
scope of what you're asking for?


> What process does one use to "track down" the basic language required
> for an effective preseed file?

Try an install, note what questions are still asked, and from the
resulting installed system that asked too many questions, run
"debconf-get-selections" and "debconf-get-selections --installer" and
look for the questions you want to preseed, add them to your preseed
file, try again, etc.


>> There's no real difference in simple-cdd profiles defined in ./profiles/
>> and in /usr/share/simple-cdd/profiles, other than the order in which
>> simple-cdd looks for files, preferring the files in the ./profiles/
>> directory.

> I would also add this to
> https://www.debian.org/doc/manuals/debian-handbook/sect.automated-installation.en.html
> section 12.3.3.1

Again, debian-installer documentation is not the place to document
simple-cdd specifics.

> or maybe to https://wiki.debian.org/Simple-CDD/Howto.

Sure, the simple-cdd README and the wiki Simple-CDD/Howto page are the
appropriate places to document this sort of thing... and should be kept
in sync. Help appreciated.


> (I don't know about the Howto because I can never see the Debian
> wiki.)

You obviously know about the wiki *somehow* given that you've just
provided a link to it...


> I would phrase it like this:
>
> "When reading profiles, simple-cdd gives precedence to profiles
> defined in ./profiles/ and then in /usr/share/simple-cdd/profiles."

Thanks for the suggestion. Where *exactly* do you think this should be
specified?


>> Once you grasp this, I would *very* much appreciate patches to improve
>> the documentation. :)
>
> I will be happy to do this.  First, let's work on the "Once you grasp
> this" part.  I am trying, I promise.  And I am starting to see that
> this may not be a bug, but I'm not 100% sure and anyway I would really
> benefit from the help (ie - examining the files above to determine why
> I might have the original error.)

Good luck.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to