• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Network issue after upgrading  (Read 1631 times)
littlebigman
Newbie
*

Karma: 0
Posts: 40


View Profile
« on: June 30, 2010, 05:40:15 AM »

Hello

Based on this article, I ran the following commands to upgrade the applications:

 1. apt-get update
 3. apt-get dist-upgrade
 5. apt-get autoremove
 7. Launch a new SSH connection to the device to make sure you can still connect
 8. reboot

After rebooting the SP, I can no longer connect through SSH Sad

So, following this article, I used the USB serial connection and typed the following commands, without understanding how to configure the IP part (192.168.0.10 = SP, 192.168.0.3 = Linux workstation, 192.168.0.254 = gw):

Code:
> setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=192.168.0.10:192.168.0.3:192.168.0.254:255.255.255.0:DB88FXX81:eth0:none init=/bin/bash
> boot

There seems to be an issue with how the network is configured:

Code:
eth0: link down
eth0: started
Sending DHCP requests .<5>eth0: link up, full duplex, speed 100 Mbps
..... timed out!
eth0: stopped
IP-Config: Reopening network devices...
eth0: link down
eth0: started
Sending DHCP requests .<5>eth0: link up, full duplex, speed 100 Mbps
., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.10
IP-Config: Complete:
      device=eth0, addr=192.168.0.10, mask=255.255.255.0, gw=192.168.0.254,
     host=DB88FXX81, domain=, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
md: Autodetecting RAID arrays.
[...]
Freeing init memory: 104K
root@DB88FXX81:/# ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.

FWIW, the LED on the hub shows that the SP is connected at 10Mbps, although the log says "eth0: link up, full duplex, speed 100 Mbps".

If someone's had the same issue, do you know what the problem is, and how to solve it?

Thank you.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #1 on: June 30, 2010, 06:43:23 AM »

be careful with dist-upgrade, ubuntu 9.04 is the last version that supports armv5 (in case you rebuild the system i suggest switching to debian).

it would be interesting what errors you see when you reboot the plug with attached console.

But having connected a serial console and replacing init was a good idea. As a result you are now running a single process (bash) which did not do any init tasks. So nobody mounted procfs on /proc and ifconfig can't find anything there. So this seems fine. Please check a normal boot process with the console attached.
Logged

littlebigman
Newbie
*

Karma: 0
Posts: 40


View Profile
« Reply #2 on: June 30, 2010, 05:40:03 PM »

Thank you for your help.

In (uBoot?), I updated the "bootargs" line to remove the trailing "init=/bin/bash", and let Linux boot up:

http://pastebin.com/SncMg7YQ

I highlighted problematic lines (187, 192, 199, 202).

1. For some reason, it stops at line 187 ("eth0: link up, full duplex, speed 100 Mbps") for about over 30 seconds, and then proceeds. Could it be some DNS or DHCP issue?

2. I still cannot connect from the workstation through SSH: Could it be related to what is on line 199 ("error: "net.ipv4.tcp_syncookies" is an unknown key")?

3. What about the FATAL errors ("Could not load /lib/modules/2.6.22.18/modules.dep")?

Thank you.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #3 on: July 01, 2010, 01:36:07 AM »

1) the network seems to be misconfigured, please check the content of /etc/network/interfaces, your mac addresses and your dhcp server (if in use)
2) the ssh is running, but the system has a misconfigured network
3) Your kernel is loaded from flash and i would say it is the original kernel. But in your root-filesystem there is probably a different kernel (and its modules). if the old modules still exist, you can run depmod -a to recreate the dependency file. Or you need to flash the kernel. I think there are some scripts for this, please search/google how to do it.
Logged

littlebigman
Newbie
*

Karma: 0
Posts: 40


View Profile
« Reply #4 on: July 04, 2010, 03:17:00 AM »

Thank you for the help but... I'm still having the same issue :-/

1. After rebooting the SP, it waits for about 30 seconds at the line that says "eth0: link up, full duplex, speed 100 Mbps" before proceeding.

Here's what the default /etc/network/interfaces says:

Code:
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

auto eth0
iface eth0 inet dhcp

2. I still cannot connect to the SP through SSH, even though SSHd is running and ifconfig looks right:

Code:
# netstat -nat
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:43:01:69:b7 
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0

# ping www.google.com
PING www.l.google.com (66.249.92.104) 56(84) bytes of data.
64 bytes from 66.249.92.104: icmp_seq=1 ttl=55 time=20.1 ms

What about those lines in dmesg?
Code:
#Do I really have to tell the kernel to use some static IP instead of letting the DHCP server hands one out?
Kernel command line: console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=[b]192.168.0.10:192.168.0.10:192.168.0.254:255.255.255.0[/b]:SheevaPlug:eth0:non

[...]

TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link down
eth0: started

# I have no NIS server, nor do I use a boot/root server
IP-Config: Complete:
      device=eth0, addr=192.168.0.10, mask=255.255.255.0, gw=192.168.0.254,
     host=SheevaPlug, domain=, [b]nis-domain=(none),
     bootserver=192.168.0.10, rootserver=192.168.0.10[/b], rootpath=
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.

#Stuck 30 seconds here
eth0: link up, full duplex, speed 100 Mbps

Empty flash at 0x0bbc9abc ends at 0x0bbca000

3. The FATAL errors went away after typing the right "bootargs" env't variable in uBoot. Out of curiosity, I still ran "depmod -a", but Linux isn't happy:

Code:
# depmod -a
WARNING: Couldn't open directory /lib/modules/2.6.22.18: No such file or directory
FATAL: Could not open /lib/modules/2.6.22.18/modules.dep.temp for writing: No such file or directory

I guess updating Linux on the SP without reflashing the device with a whole new image causes collateral damages ;-)

Any idea appreciated.

Thank you.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #5 on: July 04, 2010, 03:29:40 AM »

if you use dhcp on the plug (and don't want to do any netboot stuff) you don't need to put the ip line into bootargs. If you remove this, the plug should still come up, request dhcp and configure it's interface.

From your netstat and ifconfig also ssh should be reachable. How do you try to connect to ssh? Are plug and PC on the same subnet? Any firewalls on the plug (iptables -L)?

for the depmod stuff...

You load a kernel directly from flash memory and your rootfilesystem is also in flash. Updating a kernel involves two parts, the kernel and the kernel-modules. Your modules are under /lib/modules/kernel-version on the rootfilesystem. Your kernel is in flash. Update scripts assume that they can simply place the kernel in /boot/ or something like this.

So you still load the kernel from flash (if i'm right this is the original kernel delivered with the plug) but updated the modules in the rootfilesystem. They don't match. You need to flash the kernel. Check forum and wiki, i'm sure it is described somewhere
Logged

mattmc97
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #6 on: July 04, 2010, 07:44:15 AM »

how would you remove the ip from bootargs?

I may have a similar issue.

I am running off an SD Card and as long as the card is the same, you can restart, shutdown, etc.

If you change the card to a different SD Card, then it will boot but you cannot access the system from SSH.

When you connect serially and do an "ifconfig" eth0 does not show up.


I have to issue a "rm -f /etc/udev/rules.d/number_filename.rules" which deletes the eth0 config apparently and then the next reboot will reset eth0.

I need to get into my boot params again and see if there was a default ip set.

The issue never happens with the same SD card, only if I switch.

Both SD Cards have the same debian squeeze image, I believe. I installed them about 3-4 days apart.

Anyone have any ideas?
Logged

Pages: [1]
Print
Jump to: