Skip to content

Instantly share code, notes, and snippets.

@nibalizer
Forked from anonymous/notes.blog.arch
Created April 30, 2012 09:56
Show Gist options
  • Save nibalizer/2556943 to your computer and use it in GitHub Desktop.
Save nibalizer/2556943 to your computer and use it in GitHub Desktop.
As an arch fanboy I am somewhat used to it breaking.
In keeping with this I have not spent much energy trying to prevent it from doing so. This is a quick run through of an error and the fix.
I have put a *bit* of effort into keeping my box stable(this is a server) so I added an
<pre>
IgnorePgk Linux
</pre>
to my /etc/pacman.conf.
This caused updates to not update my kernel. However for some reason I'm not completly sure of this allowed the kernel source and firmware to march forward.
While trying to bring up the second interface I ran the command
<pre>
ifconfig eth1 up
</pre>
Which hung, then exited with
<pre>
Unable to insert firmware bnx2/bnx2<tab>.fw
</pre>
I didn't realize the source of the problem at first and so as an experiment I got local console and
<pre>
rmmod bnx2
modprobe bnx2
</pre>
This caused no change in the hang an upping eth1. However, and much to my horror, this caused eth0 to also be unable to be brought up.
Quickly I realized I was running 3.3.0 and trying to insert firmware from 3.3.2.
But now that both of my interfaces were down, how was I to ever bring them back up again? Since I had included an "IgnorePgk Linux" I did not have a 3.3.2 kernel to reboot into.
The solution was to plug a db9 serial connector from my box to a friend's box and use a ppp/ip.
My networking sensi often says:
<pre>
"An ip node needs three things:
* An ip address
* A subnet mask
* A default route
</pre>
The command on my box was:
<pre>
pppd -detach lock debug ipcp-accept-local ipcp-accept-remote local crtscts 10.0.234.2:10.0.234.1 /dev/ttyS1 115200 &
</pre>
The command on the other box was:
<pre>
mv /etc/ppp/options /etc/ppp/options.bak # to not muddle the waters
pppd -detach lock debug ipcp-accept-local ipcp-accept-remote local crtscts 10.0.234.1:10.0.234.2 /dev/ttyS1 115200 &
</pre>
The specific device in /dev/ will vary for you.
Networking was configured on my box(client):
<pre>
route add default gw 10.0.254.1
echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
</pre>
Networkign and routing was configured on the server by:
<pre>
sysctl net.netfilter.nf_conntrack_acct=1
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -A FORWARD -i eth1 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i ppp0 -o eth1 -j ACCEPT
</pre>
Where eth1 is your external interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment