Telnet into Redboot

From Buici

Jump to: navigation, search

This is (yet another) version of the procedure for connecting, by telnet, to RedBoot running on the LinkSys NSLU2, a.k.a. Slug. This procedure is not significantly different from the ones posted on the nslu2-linux wiki, though it should help people run on a wide variety of Linux hosts.

Connecting to RedBoot with Telnet

RedBoot will briefly listen for a telnet connection while it is booting the Slug. By brief, I mean literally brief. If you are alert and nimble you will succeed in this procedure more often than not.

You will need:

  • A GNU/Linux host.
  • A telnet program.
  • A ping program.
  • The host and the Slug on the same Ethernet segment.
  • Perhaps iproute or ifconfig for configuring the host.

The Slug initializes itself with the address 192.168.0.1. You'll have to put your host on that network. I like to use the iproute tools. In this case, I'm using device eth0 but you may need to use a different device name, e.g. ath0, wlan0.

ip addr add 192.168.0.2/24 dev eth0

This will put the host on the 192.168.0/24 network with address 192.168.0.2 and which is available to the host on eth0. If the address 192.168.0.2 is already used, try another on the same network. Also, make sure that the device name, eth0 in this case, is the correct one.

Let's test it. Power the Slug off and then run ping. Power the Slug on.

# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.8 icmp_seq=2 Destination Host Unreachable
From 192.168.0.8 icmp_seq=3 Destination Host Unreachable
From 192.168.0.8 icmp_seq=5 Destination Host Unreachable
From 192.168.0.8 icmp_seq=6 Destination Host Unreachable
From 192.168.0.8 icmp_seq=7 Destination Host Unreachable
64 bytes from 192.168.0.1: icmp_seq=8 ttl=64 time=2015 ms
64 bytes from 192.168.0.1: icmp_seq=9 ttl=64 time=1015 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=15.8 ms
64 bytes from 192.168.0.1: icmp_seq=11 ttl=64 time=1.64 ms

The Slug will start returning ICMP packets in about 9 seconds. If you don't see packets coming back or if you get some other error, you need to check that the ip address is properly configured, that your cabling is correct, and that the Slug and host are on the same physical network.

Now, comes the tricky part. Power the Slug off and run the following command. As soon as ICMP packets start coming back from the Slug, press ^C twice. The first ^C cancels the ping command and the second one stops RedBoot from booting the operating system. You'll have something less than 2 seconds to press ^C the second time.

# ping 192.168.0.1 ; telnet 192.168.0.1 9000
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.8 icmp_seq=2 Destination Host Unreachable
From 192.168.0.8 icmp_seq=3 Destination Host Unreachable
From 192.168.0.8 icmp_seq=4 Destination Host Unreachable
From 192.168.0.8 icmp_seq=6 Destination Host Unreachable
From 192.168.0.8 icmp_seq=7 Destination Host Unreachable
From 192.168.0.8 icmp_seq=8 Destination Host Unreachable
64 bytes from 192.168.0.1: icmp_seq=9 ttl=64 time=2014 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=1014 ms
64 bytes from 192.168.0.1: icmp_seq=11 ttl=64 time=14.5 ms
 
--- 192.168.0.1 ping statistics ---
11 packets transmitted, 3 received, +6 errors, 72% packet loss, time 10000ms
rtt min/avg/max/mdev = 14.578/1014.454/2014.331/816.396 ms, pipe 3
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.
== Executing boot script in 0.340 seconds - enter ^C to abort
^C
RedBoot> 

Keep trying until you get it. You may want to experiment with starting the ping command after the Slug is powered on.

--Elf 16:06, 6 April 2006 (PDT)

Personal tools