[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFR] Proposal for installs without network connection



On Saturday 08 April 2006 00:01, Joey Hess wrote:
> > Yes, but it can be useful if there is a NIC that is just not
> > connected during the install but will be later. I think this matches
> > the old behavior.
>
> base-config/apt-setup didn't change anything in this area, so what old
> behavior?

I meant that no_net would not skip network configuration altogether but 
still allow static configuration if a NIC is present.

> At this point I'm confused, because I had thought the point of this was
> to get back closer to the old behavior for installs from CD.

That was the starting point. The no_net option is a minor extention of 
that idea. The main use case I had in mind was Christian sitting in his 
train and doing test installs from netinst or full CDs.

no_net would allow to do that more effectively. However, I'm quite happy 
to abandon the idea.

> The reason this kind of thing is ugly is not because of the code, which
> is quite clean, but because it spreads out logic about dealing with CDs
> into multiple places, including places where any good design would not
> put them (such as the mirror setup program).

I agree with that. What would be cleaner is to teach d-i a bit about 
installation methods (at least CD/net) so we could ask for current 
installation method.
What my patch does is not so much teach choose-mirror about CDs, but using 
the only currently available indicator to let it know about the context 
it is being used in.

> The core problem behind #356105 is that d-i uses the same mirror/suite
> (and mirror/codename) settings for both mirrors and CDs, which lets
> choose-mirror and cdrom-detect fight over the setting of it and break
> things. One way to fix that would be to split off a cdrom/suite for
> CDs. I've attached an untested patch that does so.

We should apply that. The patch leaves one important issue open though.
If the user is installing from CD, you don't want him to be able to select 
a different suite for the mirror to be used for pkgsel than was used for 
base installation from CD.
So you still want to either disable selection of the mirror/suite in 
choose-mirror, or just ignore it in generators/50mirror (maybe with a 
warning) and use cdrom/codename instead.

> > > * Test to make sure that things fail appropriately in cases where
> > > no mirror is configured and the CD doesn't contain base. From my
> > > reading of base-installer, it will already display
> > >   base-installer/cannot_install in this case, and the user can go
> > > back and choose a mirror then.
> >
> > Not sure. debootstrap fails in a fairly nasty way if the mirror is
> > there but the architecture is not supported on it for example (a case
> > that is now tested for in choose-mirror).
>
> [...]
> Looks fine.

The case that was not covered is when the mirror _is_ there, but does not 
cover the architecture. debootstrap would be started and would fail when 
it cannot untar basefiles or something like that (#353556).
And, of course, once debootstrap is started it's kind of too late to offer 
an alternative mirror.

> The nice thing about re-invoking choose-mirror on failure is that it
> lets the installer cleanly recover from issues such as a mirror dying
> in the middle of the install, or choose-mirror not noticing that a
> mirror is actually broken. apt-setup also does this.

Hmm. You would have to be able to diagnose that it is a failing mirror 
though. When selecting a mirror or checking a sources.list that is easy 
enough, but when debootstrap dies while downloading packages there could 
be loads of causes for the failure.

> > I'm still not convinced that we should default to "don't use" though.
>
> It's what base-config defaulted to if presented with a full CD. Seems
> reasonable to me, people who want a mirror can still select one from
> the list of course..

OK. If we get a decent method to check if we're installing from a full CD.

Note that IMHO setting "don't use a network mirror" for mirror/country 
from cdrom-detect is just as dirty as checking for the existence of a 
file in choose-mirror. Possibly even dirtier as it hardcodes a string 
from choose-mirror that could change.
(Maybe we should set codes in mirror/country instead of the full strings 
from mirror/countries; something like "no-mirror" and "manual".)


New idea...
One problem is that we now ask the choose-mirror question very early for 
CD installs. It would be more logical to ask it just before apt-setup.
This could be achieved by having two very minimal udebs with different 
menu numbers, both depending on a third containing the actual binary and 
templates and stuff. The first udeb with current menu number would only 
be included on initrds requiring network for base install (prio 
optional); the other udeb would have menu number just before apt-setup 
and be prio standard, but have an isinstallable that suppresses it if the 
first is also present.
Their postinsts could then call the choose-mirror binary with an option to 
indicate the context which would allow for a fairly clean setting of 
defaults and such.

Attachment: pgpooZlXWKiUc.pgp
Description: PGP signature


Reply to: