[Bug 388060] Re: netboot install of live CD results in unconfigured network interface

Thomas Hood 388060 at bugs.launchpad.net
Thu Jun 21 13:00:08 UTC 2012


Mathieu wrote:
> Would it be sufficient to just skip adding the "manual" method interfaces to /etc/network/interfaces

I am guessing that the interface was once defined as "inet manual" in
order to prevent both ifup and NM from messing with it.

Omitting the stanza entirely will prevent ifup from messing with the
interface.

In casper version 1.316 a snippet was added to 23networking which
appears to deactivate NM in another way.

    if [ -n "${NETBOOT}" ] && [ -x /root/usr/sbin/NetworkManager ]; then
        # Disable Network Manager on netboot to avoid loosing connectivity to the media
        echo "manual" > /root/etc/init/network-manager.override
    fi

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/388060

Title:
  netboot install of live CD results in unconfigured network interface

Status in Ubiquity:
  New
Status in “casper” package in Ubuntu:
  Triaged

Bug description:
  Binary package hint: casper

  When netbooting the live CD over NFS, the network connection must be
  preserved throughout the live session so that the filesystem remains
  accessible. Currently, this is achieved by adding the following lines
  to /etc/network/interfaces which prevents network manager from
  attempting to reestablish a connection once the desktop finally
  appears:

    auto eth0
    iface eth0 inet manual

  These lines are added by casper in a script called 23networking. Here
  are a few relevant lines from the script:

      if [ -z "${NETBOOT}" ]; then method="dhcp"; else method="manual"; fi
      if [ "$method" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]; then
          # ...       
          cat >> "$IFFILE" <<EOF
  auto $i
  iface $i inet $method

  EOF
      fi

  So, this at least enables the live cd environment to be loaded over
  NFS. However, the problem is that this later gets propagated to the
  installed environment if ubiquity is called. This is done by the
  install.py script and here are the relevant lines from the script:

          for path in ('/etc/network/interfaces', '/etc/resolv.conf'):
              if os.path.exists(path):
                  shutil.copy2(path, os.path.join(self.target, path[1:]))

  In the most common general case, this is the desired behavior so that
  the user's network configuration is propagated from the live to the
  installed environment. However, in the case of netbooting the live cd,
  this is not necessarily the case because this environment needs to
  make assumptions about the network which might not apply anymore once
  the system boots from a drive rather than from the network.

  I suspect the behavior should be that a best effort should be done
  when attempting to propagate the network configuration from the live
  environment when netbooting. This would mean preserving the
  configurations for all the network interfaces except the one used to
  mount the filesystem over NFS. The reasoning is that some assumptions
  were made about that interface which were only relevant in this
  context, so all bets are off about preserving that configuration.

  In order to achieve this desired behavior, I would suspect that casper
  would need to communicate somehow to ubiquity that a particular part
  of the network configuration should not be propagated to the installed
  environment. This could probably be accomplished by using the
  configuration file as the communication interface. For example, the
  interfaces file could look something like:

    # BEGIN IGNORE
    auto eth0
    iface eth0 inet manual
    # END IGNORE

  Then, ubiquity could easily parse that out when propagating the
  network configuration from the live to the installed environment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubiquity/+bug/388060/+subscriptions




More information about the foundations-bugs mailing list