Hi Thomas,

first, thank you for looking into this issue.

On Thu, Nov 15, 2012 at 02:58:12PM +0100, Thomas Lange wrote:
> I cannot reproduce this bug using the simple examples shiped with FAI.
>
> The problem seems that your config space contains a template in
> files/etc/apt/sources.list/ which is copied via fcopy during
> task_repository. The default config space does not contain a template
> in sources.list and therefore uses the source.list which only refers
> the package repository on the CD.

Indeed, my config space distributes a sources.list file.

> It's more a general problem. FAI is using fcopy for shipping files
> during the installation. But sometimes, you need a file (for
> e.g. sources.list) in different versions. One version is used during
> installation, another version is used after the new installed system
> is running. In case of an installation from CD, this might be a
> sources.list which only uses the packages from the CD (during
> installation) but the system is configured to use a network repository
> after the installation.
>

I think the problem is that this behaviour changed with commit

https://github.com/faiproject/fai/commit/3b7d917ec8505cea4984a0027fe0348a317cbdb3

Before, the CD installation used its mirror on the CD, the fcopy of
the sources.list from the config space happened later, in the configure
task [1].

> fcopy cannot handle those different cases by using the same list of
> classes. I also do not like to implement the function you have
> proposed (different behaviour depending on installation from network
> or CD).
>

I guess the way it is in 4.0.3, CD installations use only the CD
mirror if there is no sources.list provided in the config space.  This
is fine if you want and need no other sources later, which is probably
a rare case today.

If you provide a sources.list, it will be used already for the
installation.  This might be fine too (if you know about it and
provide the network access).  It's perhaps even a nice feature,
because you are not limited to CD storage volume/mirror size.

However, in that case the mirror on the CD is useless and should be
skipped completely.  I hacked fai-cd to produce such a CD image
already for the fai version provided in squeeze, it's pretty simple.

> If you like to ship different sources.list file, you may want to use a
> hook, which calls fcopy /etc/apt/sources.list with a different list of
> classes. Then you can ship different templates for sources.list during
> installation and for configuring the new system.
>

I suggest something like the following:

  * Provide an option in fai-cd to not use a CD mirror at all.
  * If the mirror exists, use it for the installation and fcopy the
    sources list later.

What do you think?  I would volunteer to provide a patch for that
scenario if you are interested, but maybe I am not aware of all
problems that might pop up.

Best regards,

     Andi


[1] FAI manual
http://fai-project.org/fai-guide/_anchor_id_config_xreflabel_config_installation_details.html

configure
    Calls scripts in $FAI/scripts/ and its subdirectories for every
    defined class.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to