No lo interface after debootstrap install

Bug #110144 reported by Evan Klitzke
6
Affects Status Importance Assigned to Milestone
debootstrap (Debian)
New
Unknown
debootstrap (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

I just did a debootstrap install of Ubuntu 7.04, and had mysterious networking problems. It turns out that the loopback interface was not being started. I looked at /etc/network/interfaces and lo and behold, the lo interface was not set to auto (sorry, couldn't resist the pun). This will cause server-like applications that try to bind to a port on localhost to fail, which can be fairly mystifying...

Revision history for this message
Evan Klitzke (eklitzke2) wrote :

It turns out that this was just a configuration item that I missed when I read the debootstrap installation guide. In the guide they do, in fact, warn you to edit /etc/network/interfaces and add a line for the loopback device.

OTOH it seems like this file, and a few other files, could be improved for debootstrap. I think it would be preferable to have a /etc/network/interfaces file that had the loopback device autostart by default, with perhaps commented out entries for other devices. Likewise, the /etc/fstab file is blank in the default configuration, whereas it ought to at least have entries for /proc and /sys, and perhaps commented out entries showing how other lines might look. I would be interested in making some of these changes myself and submitting patches to the package maintainers if someone can help me figure out what I need to do to get started.

Revision history for this message
Evan Klitzke (eklitzke2) wrote :

It's me again. I created some patches for the gutsy debootstrap ruleset. The first patch is really small and just fixes a couple of formatting inconsistincies in the ruleset (two instances of hard tabs instead of spaces, and deprecated usage of chown user.group rather than chown user:group). The second patch makes it so that skeleton /etc/fstab, /etc/network/interfaces, and /etc/hosts files are generated.

I'm kind of new to patch, so I'm not sure if I did this right, but the formatting patch is meant to be applied first, followed by the patch that adds the skeleton files. Let me know if I did this incorrectly.

Revision history for this message
Evan Klitzke (eklitzke2) wrote :

This is the patch that adds the "skeleton" files.

Revision history for this message
Adam Niedling (krychek) wrote :

Is this still an issue?

Changed in debootstrap:
status: New → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote :

This is still valid (of course; Adam didn't even check ...) but I want to think about the installation-guide and code-duplication implications.

Changed in debootstrap (Ubuntu):
importance: Undecided → Wishlist
status: Incomplete → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

Regarding the first patch: I'm not going to apply the tab/space changes because we like it the way it is. I applied the chown change a while ago, in debootstrap 1.0.9:

  * Use 'chown 0:0' in all scripts rather than deprecated 'chown 0.0'
    (thanks, Evan Klitzke).

Revision history for this message
Colin Watson (cjwatson) wrote :

The part of this bug applying to /etc/network/interfaces is fixed thanks to this change, which I think is a fundamentally better approach even though it doesn't deal with releases earlier than lucid:

ifupdown (0.6.8ubuntu29) lucid; urgency=low

  * debian/postinst: if the loopback interface is missing from the config in
    /etc/network/interfaces, add it on upgrade; there is no valid use case
    for a system without localhost, and not bringing this up will cause
    upstart runlevel handling to fail. LP: #497299.

 -- Steve Langasek <email address hidden> Fri, 19 Feb 2010 20:29:32 -0800

(It's always best to keep logic regarding packages' configuration files in those packages rather than in debootstrap.)

I'm not yet sure what to do about /etc/fstab and /etc/hosts. I've confirmed at least that the proposed changes there wouldn't break the installer. The proposed /etc/hosts is probably OK. Aesthetically I feel that the proposed /etc/fstab is probably too verbose and that more documentation should be local and delegated to manual page references or whatever. In any case, though, I strongly believe that Debian and Ubuntu should behave in a semantically identical way here lest sysadmins' heads explode in confusion, so I'll forward the essence of this to Debian.

Colin Watson (cjwatson)
tags: added: patch-forwarded-debian
Changed in debootstrap (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.