Discussion:
Can't bring up the network
Jerry Stuckle
2018-06-07 18:29:40 UTC
Permalink
Hi, Mark,

I tried ifconfig eth0 up. It seemed to try to bring the interface up,
but no IP address. It's configured for dhcp, so I ran dhcp-client and
that gave me the run-parts error 3 times. However, it did get me an ip
address and access to the internet.

So now I'm downloading the package lists again and going to start trying
to recover from the update crash.

Thanks!

Jerry
A little background.  I have Debian-arm 3.2.0-4-vexpress running under
QEMU.  This has been working fine, but in serious need of an upgrade.
So I ran apt-get update and apt-get upgrade.  This resulted in a long
process of updating packages.
Unfortunately, the hosting system crashed while the upgrade was
running.   This resulted in some packages which were only partially
installed.
In trying to get things back I found the network interface (eth0) did
not come back up.  Trying to start it with ifup eth0 results in
Might be worth trying with  ifconfig eth0 up  or whatever, followed
possibly by adding routes manually.
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
Adding --verbose gives
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
/etc/network/if-pre-up.d is empty, which is what I suspect is the
cause of the problem.  However, I don't know what should be in there
on this system - or what package is supposed to install it.  QEMU is
emulating a standard ethernet port (not wifi).  Other systems I have
installed use wifi, so will (obviously) have something different in here.
Looking at a couple of fairly clean systems here, that directory
contains either a  vlan  script or a   wpasupplicant  symlink. In at
least one case the script is rigged to return 0 if the prerequisite
executable doesn't exist... you could try creating something like vlan
owned root:root mode 755 containing a shebang and exit 0, but TBH I
think it's more likely that some prerequisite library's screwed.
Sorry I can't be more help but I'm comparatively unpracticed at "The
Debian Way": I'm a refugee from Yggdrassil and they say you never forget
your first distro :-)
Alan Corey
2018-06-07 16:16:10 UTC
Permalink
Pre-up can be empty, it's not always used. It's a place to put scripts
that should be run before bringing the interface/network up.

There should be a log somewhere like in /var/log/apt. If you figure out
what it was trying to load you can put back the old version with dpkg -i
<file>. The debs on the box are in something like /var/cache/apt/archive.
Dpkg -i will install any deb over another, it's good for reverting.

Similar nightmare on my rock64, that's why I'm on a phone.

Sent from my Motorola XT1527
A little background. I have Debian-arm 3.2.0-4-vexpress running under
QEMU. This has been working fine, but in serious need of an upgrade.
So I ran apt-get update and apt-get upgrade. This resulted in a long
process of updating packages.
Unfortunately, the hosting system crashed while the upgrade was running.
This resulted in some packages which were only partially installed.
In trying to get things back I found the network interface (eth0) did
not come back up. Trying to start it with ifup eth0 results in
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
Adding --verbose gives
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
/etc/network/if-pre-up.d is empty, which is what I suspect is the cause
of the problem. However, I don't know what should be in there on this
system - or what package is supposed to install it. QEMU is emulating a
standard ethernet port (not wifi). Other systems I have installed use
wifi, so will (obviously) have something different in here.
The problem is, I'm a programmer, Jim, not a Unix Administrator. I
could use any suggestions someone might have.
And once this gets fixed I can try to correct the other problems created
by the aborted upgrade.
TIA.
Jerry
Jerry Stuckle
2018-06-07 18:22:45 UTC
Permalink
Thanks, Alan, I looked at the log but nothing stands out. That's not to
say I'm missing something, though.

Unfortunately, dpkg -i fails because when the system crashed at least a
couple of list files got corrupted and I get things like

file list file for package 'debianutils' is missing final newline

So I won't be able to reinstall any packages until I can get the network
up and download another copy of the failing packages.

So I'm back to trying to get the network up and running.

Jerry
Pre-up can be empty, it's not always used.  It's a place to put scripts
that should be run before bringing the interface/network up.
There should be a log somewhere like in /var/log/apt. If you figure out
what it was trying to load you can put back the old version with dpkg -i
<file>. The debs on the box are in something like
/var/cache/apt/archive.  Dpkg -i will install any deb over another, it's
good for reverting.
Similar nightmare on my rock64, that's why I'm on a phone.
Sent from my Motorola XT1527
A little background.  I have Debian-arm 3.2.0-4-vexpress running under
QEMU.  This has been working fine, but in serious need of an upgrade.
So I ran apt-get update and apt-get upgrade.  This resulted in a long
process of updating packages.
Unfortunately, the hosting system crashed while the upgrade was running.
  This resulted in some packages which were only partially installed.
In trying to get things back I found the network interface (eth0) did
not come back up.  Trying to start it with ifup eth0 results in
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
Adding --verbose gives
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
/bin/sh: 1: run-parts: Exec format error
Failed to bring up eth0
/etc/network/if-pre-up.d is empty, which is what I suspect is the cause
of the problem.  However, I don't know what should be in there on this
system - or what package is supposed to install it.  QEMU is
emulating a
standard ethernet port (not wifi).  Other systems I have installed use
wifi, so will (obviously) have something different in here.
The problem is, I'm a programmer, Jim, not a Unix Administrator.  I
could use any suggestions someone might have.
And once this gets fixed I can try to correct the other problems created
by the aborted upgrade.
TIA.
Jerry
Loading...