PDA

View Full Version : ping works, but ftp/telnet/serial bash don't?



grins
09-21-2004, 01:52 PM
I'm doing killhdinitrd on my HR10-250.

I added rc.sysinit.author, which starts bash on the serial port, loads the network drivers, starts telnet, starts tivoftpd.mips.

Lights light on usb200M and router, I can ping the HDTiVo successfully, however

1) teraterm to the serial port gives no response at 8n1 none either at 9600 or 115200.

2) telnet says Could not open connection to the host, on port 23: Connect failed

3) ftp says
> ftp: connect :Unknown error number

Any ideas? I'm thinking of adding a sleep 300 and then a ps >>hackinit.log to rc.sysinit.author, just to see if the processes are there...

Jamie
09-21-2004, 05:29 PM
I'm doing killhdinitrd on my HR10-250.

I added rc.sysinit.author, which starts bash on the serial port, loads the network drivers, starts telnet, starts tivoftpd.mips.

Lights light on usb200M and router, I can ping the HDTiVo successfully, however

1) teraterm to the serial port gives no response at 8n1 none either at 9600 or 115200.

2) telnet says Could not open connection to the host, on port 23: Connect failed

3) ftp says
> ftp: connect :Unknown error number

Any ideas? I'm thinking of adding a sleep 300 and then a ps >>hackinit.log to rc.sysinit.author, just to see if the processes are there...


Did you disable the netfilter firewall on the tivo?

grins
09-21-2004, 05:49 PM
Did you disable the netfilter firewall on the tivo?

Hi Jamie! Thanks for your suggestion. In some threads, it says that netfilter applies to 4.0, and the HDTiVo is 3.1.5. I'll check my rc.sysinit when I get home tonight to see if it's there, and if so, I'll disable it.

That would be great if that's all it was :D

thanks again

t

malfunct
09-21-2004, 06:01 PM
I'm doing killhdinitrd on my HR10-250.

I added rc.sysinit.author, which starts bash on the serial port, loads the network drivers, starts telnet, starts tivoftpd.mips.

Lights light on usb200M and router, I can ping the HDTiVo successfully, however

1) teraterm to the serial port gives no response at 8n1 none either at 9600 or 115200.

2) telnet says Could not open connection to the host, on port 23: Connect failed

3) ftp says
> ftp: connect :Unknown error number

Any ideas? I'm thinking of adding a sleep 300 and then a ps >>hackinit.log to rc.sysinit.author, just to see if the processes are there...


Did you ever add any lines that start the telnet daemon or ftp daemon or bash to the rc.sysinit or rc.sysinit.author? It seems like you think you did, verify it. Also make sure that you don't have a line thats running in the foreground blocking the init scripts from executing lines below it.

Jamie
09-21-2004, 06:07 PM
Hi Jamie! Thanks for your suggestion. In some threads, it says that netfilter applies to 4.0, and the HDTiVo is 3.1.5. I'll check my rc.sysinit when I get home tonight to see if it's there, and if so, I'll disable it.

That would be great if that's all it was :D

thanks again

t

Yeah, it occured to me later that my only experience is with 4.0 and 5.1. I don't know if 3.1.5 has the /etc/netfilter-enable stuff or not. Sorry for wasting your time if I lead you down the wrong path.

I found a serial console cable was pretty useful for debugging startup problems.

malfunct
09-21-2004, 06:12 PM
Yeah, it occured to me later that my only experience is with 4.0 and 5.1. I don't know if 3.1.5 has the /etc/netfilter-enable stuff or not. Sorry for wasting your time if I lead you down the wrong path.

I found a serial console cable was pretty useful for debugging startup problems.

Problem is he isn't even getting bash started on the serial port. I don't know how much it will help him at that point.

Jamie
09-21-2004, 06:48 PM
Problem is he isn't even getting bash started on the serial port. I don't know how much it will help him at that point.

Guess I missed that fact that his serial output wasn't working. I was thinking the boot up messages would be useful (e.g. assuming something like "dsscon=true console=2,115200" in the boot parameters.), even if bash wasn't running. But then again, I don't have any experience with an HR10-250, so maybe I should just shutup and listen :)

grins
09-22-2004, 12:05 PM
Wow! Thanks, guys!

I've rearranged a bit. I messed up the starting bash on the serial port (I know, Shocking! ;) I had ttys2 instead of ttyS2 )

Now, I get console output, ftp, I can see the telnet server running, but still no telnet.

I've attached the console output in its entirety, and I've inlined what I think are the relevant portions.

I bracketed my statements in rc.sysinit with echo, specifically

Scanning for phase4 repair scripts << from tivo
starting customizations << my echo
About to setpri <<mine
/etc/rc.d/rc.sysinit: /var/hack/setpri: cannot execute binary file << yeah, I tried to use setpri
Path was /bin:/sbin:/tvbin:/devbin << mine
Path is /bin:/sbin:/tvbin:/devbin:/var/hack/bin/:/var/mfs_ftp:/var/hack << mine
Starting bash <<mine
Starting telnet <<mine
Starting ftp <<mine
bash: no job control in this shell <<seems pretty bad, but it's afer starting ftp, which does, in fact, start up

then a bunch of tivo messages

bash-2.02# MCP startup complete
Calling Run...
ApgLogFrequency( 0 sec )
....
In ClearChannels
Out ClearChannels

and then
rc.sysinit is complete << this is at the end of rc.sysinit. Doesn't that mean that it's not that a foregrounded job is blocking completion?

I don't see echoes from rc.sysinit.author, but it does run, I think. That's where I do the ifconfig of the USB200M, and you can see from the ifconfig that it worked.

bash-2.02#
bash-2.02# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:0.0.0.0 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0 Link encap:Ethernet HWaddr 00:10:60:26:31:28
inet addr:192.168.1.250 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0

bash-2.02# ps | grep ftp
118 0 388 S /var/hack/tivoftpd.mips
210 0 596 S grep ftp
bash-2.02# ps | grep tnl
117 0 428 S tnlited 23 /bin/bash -login
214 0 596 S grep tnl
bash-2.02#

try to connect with telnet over tcp/ip,
windows98 telnet says :
Could not open a connection to 192.168.1.250

teraterm says:
Cannot connect the host
Connection refused


Again, thanks so much for your assistance :)

Jamie
09-22-2004, 02:03 PM
Is it possible you are starting the telnet and ftp servers before the networking is setup? I seem to remember having problems with that not working right.

It's not clear to me whether you are starting these in your rc.sysinit.author or directly in your rc.sysinit file. In your earlier messages it sounded like it was in rc.sysinit.author, but in this latest one, it sounds more like rc.sysinit. If it's all in rc.sysinit.author, why don't you just attach the file so we can have a look?

I think it is best to start all services and hacks in the rc.sysinit.author file and leave the rc.sysinit in its pristine state. If you need to run things *before* rc.sysinit (e.g. to monte), use the rc.sysinit.bogus method described in various threads. This thread has an excellent description and can lead you back to the original source (link (http://www.dealdatabase.com/forum/showthread.php?t=37570)).

grins
09-22-2004, 03:07 PM
I was following NutKase's plan from here (http://www.dealdatabase.com/forum/showpost.php?p=183934&postcount=21)

I'm not doing a monte, so I don't need to touch rc.sysinit at all.

Here's the mods I made to my rc.sysinit

echo "starting customizations"
date > /var/hack/hackinit.log
echo "About to setpri"
echo "about to setpri" >> /var/hack/hackinit.log
/var/hack/setpri fifo 1 $$
echo "Path was " $PATH
echo "Path was " $PATH >>/var/hack/hackinit.log
export PATH=$PATH":"/var/hack/bin/:/var/mfs_ftp:/var/hack
echo "Path is " $PATH
echo "Path is " $PATH >>/var/hack/hackinit.log
echo "Starting bash"
echo "Starting bash" >> /var/hack/hackinit.log
/bin/bash </dev/ttyS2&>/dev/ttyS2&
echo "Starting telnet" >>/var/hack/hackinit.log
echo "Starting telnet"
tnlited 23 /bin/bash -login &
echo "Starting ftp"
echo "Starting ftp" >>/var/hack/hackinit.log
/var/hack/tivoftpd.mips
echo "calling rc.sysinit.author" >>/var/hack/hackinit.log

then rc.sysinit calls rc.sysinit.author


bash-2.02# cat rc.sysinit.author
#!/bin/bash

LD_LIBRARY_PATH=/var/hack/lib/":"$LD_LIBRARY_PATH
HOME=/var/hack/root

export LD_LIBRARY_PATH HOME

#load usb and ethernet modules
insmod /lib/modules/usbcore.o
#insmod /lib/modules/hcd.o
insmod /lib/modules/ehci-hcd.o
insmod /lib/modules/ax8817x.o
sleep 15

#configure linksys USB200M
ifconfig eth0 192.168.1.250 broadcast 192.168.1.255 netmask 255.255.255.0
sleep 60

echo "rc.sysinit.author done" >> hackinit.log

# Call the Tivo Package Manager Startup Scripts
/etc/rc.d/rc.sysinit.tpm



and that's it.

You are probably correct. When I first was having problems, I probably had everything in rc.sysinit.author, then I found NutKase's instructions and followed his "some things in rc.sysinit, somethings in rc.sysinit.author" method.

I'll try your suggestion of moving everything back to rc.sysinit.author and having the start of the telnet server after the ifconfig

grins
09-23-2004, 12:03 PM
Hi Jamie, your suggestion appears to have worked. I moved the startup of telnet and ftp to after the ifconfig, and everybody's happy, especially me! :D

I say appears, as I got the download of 3.1.5d, so I had to rebuild my /var/hack stuff and rc.sysinit.author. It's possible I just had a (nother) typo, which got fixed when I typed it in again.

Either way, thanks for your help. I'll make sure to start the services after the network from now on.

cheers!

t