# Help - no nic_config



## CarlWalters (Oct 17, 2001)

I've just noticed that my last successful call was on 30 December (just before I went on holiday - typical  ). I can access TiVoWeb OK but if I try to make a test call from there it reports "Failed. Wrong Number". If I do this from the TiVo menu it reports "Failed. Couldn't connect". I can telnet into TiVo OK but if I type nic_config (to check the network setup) I just get "bash : nic_config : command not found".

Help!


----------



## Rob Nespor Bellis (Feb 17, 2001)

The command is nic_config_tivo - try that 

Rgds,

R.


----------



## JonnyD (Oct 1, 2001)

Carl

You should be typing nic_config_tivo

John


----------



## CarlWalters (Oct 17, 2001)

thanks for the quick replies 

if I type the correct command (  )"nic_config_tivo" then it says that the daily call is set to "network" so if I can "see" TiVo via my network then I wonder why it can't make the call?


----------



## CarlWalters (Oct 17, 2001)

I've changed over the daily call type to "dialup" and tried making a test call. If I do it from TiVo I get "Failed. Number Unavailable" If I do it from TiVoWeb I get "Failed. Service Is Not Answering". My account is showing "3 : In Good Standing". 

Does anyone have any ideas please?


----------



## Rob Nespor Bellis (Feb 17, 2001)

I am assuming that you are using a remote access "something" to get into a PC that is on the same lan as the TiVo and then telnetting to it?

If so there may be some sort of routing issue ( try a few pings - the actual IP of the TiVo servers is somewhere around, it only came up a few days ago. )

Of course there is the dreaded transparent proxy issue too.....

Rgds,

R.


----------



## CarlWalters (Oct 17, 2001)

no - I'm actually at home today so the PC I'm using is on the same network (wirelessly) as my TiVo. I can ping and telnet and access TiVoWeb OK. Mind you this wouldn't explain why the "dialup" wasn't working . I seem to remember I changed over to "network" from "dialup" a few months ago as the "dialup" wasn't working for some reason. So "dialup" connection may be a separate issue. But the "network" connection was working fine up until 30 Dec. 

Sill confused


----------



## davey971 (Apr 4, 2004)

CarlWalters said:


> But the "network" connection was working fine up until 30 Dec.


I see from your footer you're on NTL - there was a thread recently about a problem with guide data when using NTL to download it something to do with transparent proxies - might be related?

http://www.tivocommunity.com/tivo-vb/showthread.php?t=334236


----------



## Pete77 (Aug 1, 2006)

davey971 said:


> I see from your footer you're on NTL


Talking of the footer surely Carl must be on a faster broadband speed with NTL than 750k by now?


----------



## CarlWalters (Oct 17, 2001)

nope the footer is out of date (and I daren't change it because of the 200 character limit  ) I'm actually on Sky Max (quoted as 16Mbit but I get between 12.4 Mbit and 12.8Mbit which isn't too bad)

but I digress 

I'm on Sky now anyhow but my connection seems to have stopped working at the same time as PaulWilkins in this thread I wonder if he's fixed it? I'll ask.

Perhaps a router reboot would help?


----------



## CarlWalters (Oct 17, 2001)

nope a router reboot doesn't help 

the tclient log looks like this for a test call if that gives any clue?

```
01/10:22:14:59: /tvbin/TClient: inside TClient
01/10:22:15:00: /tvbin/TClient: No previously downloaded files remain in /var/packages
01/10:22:15:00: /tvbin/TClient: TClient: invoking init w/argv=-t -backup
01/10:22:15:00: /tvbin/TClient: writing In Progress to LastCallStatus
01/10:22:15:00: /tvbin/TClient: TClient init: 0
01/10:22:15:00: /tvbin/TClient: dial config code: () found
01/10:22:15:01: /tvbin/TClient: no line matches code =
01/10:22:15:01: /tvbin/TClient: Using default TiVo Service params
01/10:22:15:01: /tvbin/TClient: updateStatus: In Progress EX| 29 48
01/10:22:15:01: /tvbin/TClient: writing In Progress to LastCallStatus
01/10:22:15:01: /tvbin/TClient: SendDialupEvent 30 9 EX|29
01/10:22:15:01: /tvbin/TClient: curPhNum is (), tollFreeAuth is (3)
01/10:22:15:01: /tvbin/TClient: allowing Def TFN use based on TFA
01/10:22:15:01: /tvbin/TClient: Host = 204.176.49.3
01/10:22:15:01: /tvbin/TClient: Port = 80
01/10:22:15:01: /tvbin/TClient: Phone = 08081050005
01/10:22:15:01: /tvbin/TClient: updateStatus: In Progress EX| 29 8
01/10:22:15:01: /tvbin/TClient: SendDialupEvent 30 9 EX|29
01/10:22:15:01: /tvbin/TClient: DataSets may not be enabled, could not find ShowcaseVersion: DataSet ShowcaseVersion does not exist.
01/10:22:15:02: /tvbin/TClient: mrsigtype=3 mrconnector=7...
01/10:22:15:02: /tvbin/TClient: mrsigtype=5 mrconnector=7...
01/10:22:15:02: /tvbin/TClient: Found 2.5.5-01-1 running
01/10:22:15:02: /tvbin/TClient:
01/10:22:15:02: /tvbin/TClient: Start Ident =====================
01/10:22:15:02: /tvbin/TClient: version: 3
01/10:22:15:02: /tvbin/TClient: centerID: 02300006023B5CC
01/10:22:15:02: /tvbin/TClient: reasonCode: 4
01/10:22:15:02: /tvbin/TClient: softwareDesc: NONE
01/10:22:15:02: /tvbin/TClient: locationID: NONE
01/10:22:15:02: /tvbin/TClient: sequenceCookie: NONE
01/10:22:15:02: /tvbin/TClient: headendID: NONE
01/10:22:15:02: /tvbin/TClient: showcaseDesc: NONE
01/10:22:15:02: /tvbin/TClient: inventoryFile: 0001172-13512|SKYRADIO-13512|ids:uk
01/10:22:15:02: /tvbin/TClient: waitingCount: 0
01/10:22:15:02: /tvbin/TClient: dialConfig:
01/10:22:15:02: /tvbin/TClient: confInfo:
01/10:22:15:02: /tvbin/TClient: messageDesc:
01/10:22:15:02: /tvbin/TClient: irdbVersion: 299
01/10:22:15:02: /tvbin/TClient: genreVersion: 35
01/10:22:15:02: /tvbin/TClient: logoVersion: 24
01/10:22:15:02: /tvbin/TClient: affiliationVersion: 8
01/10:22:15:02: /tvbin/TClient: showcaseVersion:
01/10:22:15:02: /tvbin/TClient: swVerName: 2.5.5-01-1-023
01/10:22:15:02: /tvbin/TClient: configParameterList: zip=RG4,dar=0,rcq=0,tz=,as=,tun=,suc=7
01/10:22:15:02: /tvbin/TClient: sourceParameterList: st=3,con=7,drm=2,ekr=,ccn=20016,brn=THOMSON,lin=17,irs=150;st=5,con=7,drm=,ekr=,ccn=20057,brn=SKY_RADIO,lin=1,irs=150
01/10:22:15:02: /tvbin/TClient: apgOnly:
01/10:22:15:02: /tvbin/TClient: useChksums: TRUE
01/10:22:15:02: /tvbin/TClient: premiumShowcases: SC_bsky50-298|SC_bsky55-296|SC_bsky59-297|SC_bsky62-296|SC_chfour56-301|SC_chfour57-301|SC_chfour66-302|SC_iGuideUK1-291|SC_ukgold58-296|
01/10:22:15:02: /tvbin/TClient: captureRequests:
01/10:22:15:02: /tvbin/TClient: menuItems:
01/10:22:15:02: /tvbin/TClient: otherDataSets:
01/10:22:15:02: /tvbin/TClient: rbBackgrounds:
01/10:22:15:02: /tvbin/TClient: dataGroupList: CR_Standard|DG_standard|MI_Standard|SC_bsky50|SC_bsky55|SC_bsky59|SC_bsky62|SC_chfour56|SC_chfour57|SC_chfour66|SC_iGuideUK1|SC_ukgold58|SF_SerialLogging|SW_released
01/10:22:15:02: /tvbin/TClient: lstAvalancheDnload: 0,0 0,0
01/10:22:15:02: /tvbin/TClient: userInitiated: 1
01/10:22:15:02: /tvbin/TClient: End Ident =====================
01/10:22:15:02: /tvbin/TClient:
01/10:22:15:02: /tvbin/TClient: Logging camid.
01/10:22:15:02: /tvbin/TClient: CAM_ID not found.
01/10:22:15:02: /tvbin/TClient: Ird Id.
01/10:22:15:02: /tvbin/TClient: updateStatus: In Progress CL| 30 24
01/10:22:15:02: /tvbin/TClient: SendDialupEvent 30 9 CL|30
01/10:22:15:02: /tvbin/TClient: updateStatus: In Progress ST| 33 14
01/10:22:15:02: /tvbin/TClient: SendDialupEvent 30 9 ST|33
01/10:22:15:02: /tvbin/TClient: About to connect to 204.176.49.3:80
01/10:22:15:02: /tvbin/TClient: Executing HTTP command: /tvbin/http_post /var/log/svclog http://204.176.49.3:80/tivo-service/mlog.cgi OFF OFF ON
01/10:22:15:02: /tvbin/TClient: Failed while POSTing downloaded files stats: connect failed, reason = Network is unreachable
connect failed, reason = Network is unreachable
01/10:22:15:02: /tvbin/TClient: about to do HServer Call
01/10:22:15:02: /tvbin/TClient: Executing HTTP command: /tvbin/tclient_post 204.176.49.3:80 /var/tmp/HServer.send /var/tmp/HServer.recv 300 ON
01/10:22:15:03: /tvbin/TClient: http POST command failed: connect failed, reason = Network is unreachable
01/10:22:15:03: /tvbin/TClient: doHttpCall returned: 0
01/10:22:15:03: /tvbin/TClient: Connect/POST has failed, we've warned the user, set status to Failed
01/10:22:15:03: /tvbin/TClient: failed connect - aborting
01/10:22:15:03: /tvbin/TClient: Will kill pppd
01/10:22:15:08: /tvbin/TClient: updateStatus: Failed ST| 33 14
Saving 'ST|14' to result file
01/10:22:15:08: /tvbin/TClient: writing Failed to LastCallStatus
01/10:22:15:09: /tvbin/TClient: SendDialupEvent 30 9 EX|14
01/10:22:15:09: /tvbin/TClient: TClient login: 1
01/10:22:15:09: /tvbin/TClient: TClient backhaulDone: 0
```


----------



## CarlWalters (Oct 17, 2001)

some more info - if I telnet into TiVo and type "route.tivo -n" then I get

TiVo: [/var/tmp] % route.tivo -n
route_info, afname=inet, options=37
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 32767 0 0 eth0

and then if I try to ping something from TiVo (216.239.59.103 - google??) which I can ping OK from my PC then I get

TiVo: [/var/tmp] % ping 216.239.59.103
PING 216.239.59.103 (216.239.59.103): 56 data bytes
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable
ping: sendto: Network is unreachable

--- 216.239.59.103 ping statistics ---
12 packets transmitted, 0 packets received, 100% packet loss


----------



## terryeden (Nov 2, 2002)

CarlWalters said:


> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.0.0 0.0.0.0 255.255.255.0 U 32767 0 0 eth0


I might be misreading this - but isn't it usually to have your destination as 192.168.0.*1*?


----------



## terryeden (Nov 2, 2002)

Scratch that - mine says


```
route_info, afname=inet, options=37
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     32767  0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
```


----------



## CarlWalters (Oct 17, 2001)

this is odd because mine only has the first entry and is missing the second


```
% route.tivo -n
route_info, afname=inet, options=37
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     32767  0        0 eth0
%
```


----------



## Rob Nespor Bellis (Feb 17, 2001)

The second entry defines the default route/gateway.

You have got the default gateway set in nic_config_tivo? Or try removing it and putting it back.

Oh and have you changed the call type back to network?

Rgds,

R.


----------



## CarlWalters (Oct 17, 2001)

if I run nic_config_tivo I get 


Current/New Configuration:
mac address = 01:23:45:67:89:AB
ip address = 192.168.0.100
ip subnet mask = 255.255.255.0
ip gateway = 192.168.1.1
debug level = off
daily call = network 
cache statistics = 0 seconds

should the ip gateway be 192.168.0.1 rather than 192.168.1.1 ?


----------



## Rob Nespor Bellis (Feb 17, 2001)

The IP address for the default gateway should be the IP address of your router. If your router is set to 192.168.1.1 then yes that is what it should be set to on the TiVo 

At the moment yes it is wrong because the TiVo and the current gateway addresses are on different networks.

Rgds,

R.


----------



## CarlWalters (Oct 17, 2001)

OK I've used nic_config_tivo to change the default gateway from 192.168.1.1 to 192.168.0.1 (which is the same default gateway as reported on my PC when I do ipconfig -all) and rebooted TiVo.

Then when I telnet in and run "route.tivo -n" I get

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 32767 0 0 eth0
0.0.0.0  192.168.0.1 0.0.0.0 UG 0 0 0 eth0

Which looks correct I think.

Next if I try a "ping 216.239.59.103" then I get a reply back OK. So TiVo must be able to get through to the outside world OK I guess?

But if I now try a test phone call (from TiVoWeb) I get a "Failed. Wrong Number" and the tclient log looks like this with warnings about PPP failed


```
01/11:15:37:06: /tvbin/TClient: No previously downloaded files remain in /var/packages
01/11:15:37:06: /tvbin/TClient: TClient: invoking init w/argv=-t
01/11:15:37:06: /tvbin/TClient: writing In Progress to LastCallStatus
retrying after errTmBackgroundHoldoff ...
01/11:15:37:09: /tvbin/TClient: writing In Progress to LastCallStatus
01/11:15:37:10: /tvbin/TClient: TClient init: 0
01/11:15:37:10: /tvbin/TClient: dial config code: () found
01/11:15:37:10: /tvbin/TClient: no line matches code =
01/11:15:37:10: /tvbin/TClient: Using default TiVo Service params
01/11:15:37:10: /tvbin/TClient: updateStatus: In Progress EX| 29 48
01/11:15:37:10: /tvbin/TClient: writing In Progress to LastCallStatus
01/11:15:37:10: /tvbin/TClient: SendDialupEvent 30 9 EX|29
01/11:15:37:11: /tvbin/TClient: curPhNum is (), tollFreeAuth is (3)
01/11:15:37:11: /tvbin/TClient: allowing Def TFN use based on TFA
01/11:15:37:11: /tvbin/TClient: Host = 204.176.49.3
01/11:15:37:11: /tvbin/TClient: Port = 80
01/11:15:37:11: /tvbin/TClient: Phone = 08081050005
01/11:15:37:11: /tvbin/TClient: updateStatus: In Progress EX| 29 8
01/11:15:37:11: /tvbin/TClient: SendDialupEvent 30 9 EX|29
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
01/11:15:37:18: /tvbin/TClient: DataSets may not be enabled, could not find ShowcaseVersion: DataSet ShowcaseVersion does not exist.
01/11:15:37:19: /tvbin/TClient: mrsigtype=3 mrconnector=7...
01/11:15:37:19: /tvbin/TClient: mrsigtype=5 mrconnector=7...
01/11:15:37:19: /tvbin/TClient: Found 2.5.5-01-1 running
01/11:15:37:19: /tvbin/TClient:
01/11:15:37:19: /tvbin/TClient: Start Ident =====================
01/11:15:37:19: /tvbin/TClient: version: 3
01/11:15:37:19: /tvbin/TClient: centerID: 02300006023B5CC
01/11:15:37:19: /tvbin/TClient: reasonCode: 4
01/11:15:37:19: /tvbin/TClient: softwareDesc: NONE
01/11:15:37:19: /tvbin/TClient: locationID: NONE
01/11:15:37:19: /tvbin/TClient: sequenceCookie: NONE
01/11:15:37:19: /tvbin/TClient: headendID: NONE
01/11:15:37:19: /tvbin/TClient: showcaseDesc: NONE
01/11:15:37:19: /tvbin/TClient: inventoryFile: 0001172-13512|SKYRADIO-13512|ids:uk
01/11:15:37:19: /tvbin/TClient: waitingCount: 0
01/11:15:37:19: /tvbin/TClient: dialConfig:
01/11:15:37:19: /tvbin/TClient: confInfo:
01/11:15:37:19: /tvbin/TClient: messageDesc:
01/11:15:37:19: /tvbin/TClient: irdbVersion: 299
01/11:15:37:19: /tvbin/TClient: genreVersion: 35
01/11:15:37:19: /tvbin/TClient: logoVersion: 24
01/11:15:37:19: /tvbin/TClient: affiliationVersion: 8
01/11:15:37:19: /tvbin/TClient: showcaseVersion:
01/11:15:37:19: /tvbin/TClient: swVerName: 2.5.5-01-1-023
01/11:15:37:19: /tvbin/TClient: configParameterList: zip=RG4,dar=0,rcq=0,tz=,as=,tun=,suc=7
01/11:15:37:19: /tvbin/TClient: sourceParameterList: st=3,con=7,drm=2,ekr=,ccn=20016,brn=THOMSON,lin=17,irs=150;st=5,con=7,drm=,ekr=,ccn=20057,brn=SKY_RADIO,lin=1,irs=150
01/11:15:37:19: /tvbin/TClient: apgOnly:
01/11:15:37:19: /tvbin/TClient: useChksums: TRUE
01/11:15:37:19: /tvbin/TClient: premiumShowcases: SC_bsky50-298|SC_bsky55-296|SC_bsky59-297|SC_bsky62-296|SC_chfour56-301|SC_chfour57-301|SC_chfour66-302|SC_iGuideUK1-291|SC_ukgold58-296|
01/11:15:37:19: /tvbin/TClient: captureRequests:
01/11:15:37:19: /tvbin/TClient: menuItems:
01/11:15:37:19: /tvbin/TClient: otherDataSets:
01/11:15:37:19: /tvbin/TClient: rbBackgrounds:
01/11:15:37:19: /tvbin/TClient: dataGroupList: CR_Standard|DG_standard|MI_Standard|SC_bsky50|SC_bsky55|SC_bsky59|SC_bsky62|SC_chfour56|SC_chfour57|SC_chfour66|SC_iGuideUK1|SC_ukgold58|SF_SerialLogging|SW_released
01/11:15:37:19: /tvbin/TClient: lstAvalancheDnload: 0,0 0,0
01/11:15:37:19: /tvbin/TClient: userInitiated: 1
01/11:15:37:19: /tvbin/TClient: End Ident =====================
01/11:15:37:19: /tvbin/TClient:
01/11:15:37:19: /tvbin/TClient: Logging camid.
01/11:15:37:19: /tvbin/TClient: CAM_ID not found.
01/11:15:37:19: /tvbin/TClient: Ird Id.
01/11:15:37:19: /tvbin/TClient: toneOrPulse = 0
01/11:15:37:19: /tvbin/TClient: dialPrefix = {}
01/11:15:37:19: /tvbin/TClient: callWaitingPrefix == {}
01/11:15:37:19: /tvbin/TClient: phoneNumber = 08081050005
01/11:15:37:19: /tvbin/TClient: phoneAvailableDetection = 1
01/11:15:37:19: /tvbin/TClient: dialToneDetection = 0
01/11:15:37:19: /tvbin/TClient: Starting dial.expect with:
01/11:15:37:19: /tvbin/TClient: toneOrPulse = T
01/11:15:37:19: /tvbin/TClient: dialPrefix = {}
01/11:15:37:19: /tvbin/TClient: callWaitingPrefix = {}
01/11:15:37:19: /tvbin/TClient: phoneNumber = 08081050005
01/11:15:37:19: /tvbin/TClient: phoneAvailableDetection = 0
01/11:15:37:19: /tvbin/TClient: dialToneDetection = 1
01/11:15:37:19: /tvbin/TClient: useV34 = 0
01/11:15:37:19: /tvbin/TClient: updateStatus: In Progress CL| 30 24
01/11:15:37:19: /tvbin/TClient: SendDialupEvent 30 9 CL|30
01/11:15:37:29: /tvbin/TClient: Whole result is spawn /tvbin/modemtest -expect
ATZ
ATZ

OK
Checking for modem type...
ATI3

P2109-V90

OK
Modem type is 2109
*****NEW***** modem
ATQ0

OK
ATS0=0

OK
AT+GCI=B4

OK
AT-STE=2

OK
ATW2S6=8S7=50S11=100%C0&D2+MS=V34

OK
ATW1X4

OK
AT-TTE=1500,200,500

OK
Current line voltage (in volts, of course!):
AT-TRV

1.40
OK
new modem...line status interrupt disabled
ATDT08081050005

NO CARRIER
Modem dialup failure. Reason follows:
ATS86?

025

OK
Extention went offhook
dialcode is:12
01/11:15:37:29: /tvbin/TClient: PPP has failed, we've warned the user, set status to Failed
01/11:15:37:34: /tvbin/TClient: updateStatus: Failed CL| 30 24
Saving 'CL|12' to result file
01/11:15:37:34: /tvbin/TClient: writing Failed to LastCallStatus
01/11:15:37:34: /tvbin/TClient: SendDialupEvent 30 9 EX|12
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
01/11:15:37:43: /tvbin/TClient: TClient login: 1
01/11:15:37:43: /tvbin/TClient: TClient backhaulDone: 0
```


----------



## Rob Nespor Bellis (Feb 17, 2001)

That log shows your TiVo still trying to use the phone to get updates.

Check ( as above ) that you are set in nic_config_tivo to use NETWORK as your daily call type.

Rgds,

R.


----------



## CarlWalters (Oct 17, 2001)

well I've just run nic_config_tivo and it is definitely showing 
daily call = network


----------



## CarlWalters (Oct 17, 2001)

aha - yet another reboot seems to have done it. even though nic_config_tivo was showing 
daily_call = network 
it needed yet another reboot to pick up the changes properly.
Although how the default gateway got changed in the first place I've no idea  

So it's made a successful test call now Yay  
And is currently dowloading Guide Data. Double Yay  

Thanks to Rob and Everyone else for the help again.


----------



## CarlWalters (Oct 17, 2001)

having just forked out £199 for a lifetime sub I've just found that TiVo has stopped dialing in again. I checked all the things as last time so

ping TiVo is OK
TiVoWeb is OK 
telnet into TiVo is OK
route.tivo -n gives

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 32767 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

I can ping from TiVo OK e.g.
ping 216.239.59.103

nic_config_tico is definitely set up for daily call over network and yet if I try a test cal I get "Failed Wrong Number"

The last successful call was Saturday 10 Feb

I've rebooted TiVo a couple of time

so I'm stuck 

Any ideas anyone?


----------



## ColinYounger (Aug 9, 2006)

Carl - just a wild shot, but try using nic_config_tivo to switch to phone, reboot then switch to network (and reboot).


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> so I'm stuck
> 
> Any ideas anyone?


You want to either edit your rc.sysinit.author file with Joe or via the editor in the Hackman module or edit the rec.sysinit.author.edit file if you use sanderton's Startup Editor for Tivoweb. You then need to make sure that every line in the file ends with *>/dev/null 2>&1 &*

So for instance:-

/var/hack/tivoweb-tcl/tivoweb *>/dev/null 2>&1 &*

This *>/dev/null 2>&1 &* string backgrounds Tivoweb and each of the other utilities started up like endpad so they won't interfere with the normal running of Tivo's main program, which therefore runs with greater priority. The lack of this string on each command line in the rc.sysinit.author file usually seems to be the root cause of most failing daily calls.


----------



## CarlWalters (Oct 17, 2001)

my rc.sysinit.author file currently looks like this

TiVo: [/etc/rc.d] % cat rc.sysinit.author

/bin/setpri fifo 1 $$

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi
/var/hack/bin/tivoftpd &
/var/hack/tivoweb-tcl/tivoweb
/var/hack/TivoWebPlus/tivoweb
/var/hack/endpad.tcl -s 2 -e 5 >> /dev/null &
/var/hack/bin/vserver &
/var/hack/mfs_stream/tyhttpd 2000 4 >> /dev/null &
/var/hack/mfs_ftp/mfs_ftp.tcl &
#/var/hack/scripts/30sec.tcl >/dev/null 2>&1 &

so it would be best if I changed it to look like

/bin/setpri fifo 1 $$ >/dev/null 2>&1 &

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi
/var/hack/bin/tivoftpd >/dev/null 2>&1 &
/var/hack/tivoweb-tcl/tivoweb >/dev/null 2>&1 &
/var/hack/TivoWebPlus/tivoweb >/dev/null 2>&1 &
/var/hack/endpad.tcl -s 2 -e 5 >/dev/null 2>&1 &
/var/hack/bin/vserver >/dev/null 2>&1 &
/var/hack/mfs_stream/tyhttpd 2000 4 >/dev/null 2>&1 &
/var/hack/mfs_ftp/mfs_ftp.tcl >/dev/null 2>&1 &
#/var/hack/scripts/30sec.tcl >/dev/null 2>&1 &


----------



## CarlWalters (Oct 17, 2001)

ColinYounger said:


> Carl - just a wild shot, but try using nic_config_tivo to switch to phone, reboot then switch to network (and reboot).


as I'm at work at the moment - would a soft reboot (from telnet) do it do you think?


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> my rc.sysinit.author file currently looks like this
> 
> TiVo: [/etc/rc.d] % cat rc.sysinit.author
> 
> ...


Yes that appears to be it.

I imagine rebooting it from work should work fine as long as the file changes are correctly saved.


----------



## ColinYounger (Aug 9, 2006)

Carl:

I've used:

```
sync; sync; reboot
```
in the past to do the reboot which has worked.

The double sync makes sure everything is written from memory buffers, and I bet you'll guess what 'reboot' does.


----------



## CarlWalters (Oct 17, 2001)

arrghhhhhh!!!!!!!!!!!  

my TiVo is now completely bust! I made the changes to rc.sysinit.author

/bin/setpri fifo 1 $$ >/dev/null 2>&1 &

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi
/var/hack/bin/tivoftpd >/dev/null 2>&1 &
/var/hack/tivoweb-tcl/tivoweb >/dev/null 2>&1 &
/var/hack/TivoWebPlus/tivoweb >/dev/null 2>&1 &
/var/hack/endpad.tcl -s 2 -e 5 >/dev/null 2>&1 &
/var/hack/bin/vserver >/dev/null 2>&1 &
/var/hack/mfs_stream/tyhttpd 2000 4 >/dev/null 2>&1 &
/var/hack/mfs_ftp/mfs_ftp.tcl >/dev/null 2>&1 &
#/var/hack/scripts/30sec.tcl >/dev/null 2>&1 &

did a sync syc reboot

and now

The TiVo is running very very very slowly. It's spent the last 15 minutes on the "Preparing to Call" bit 

I can't ping it, I can't telnet in, nothing

It's all busted!

What am I going to do?


----------



## Pete77 (Aug 1, 2006)

I should have added that I only ever edit rc.sysinit.author.edit myself and always using sanderton's Startup Editor utility in Tivoweb.

You seem to have the Startup Editor function call in rc.sysinit.author so isn't it the rc.sysinit.author.edit file you should have been editing with Startup Editor and adding the backgrounding string to? But then why are these other commands also present in rc.sysinit.author?

Hope you manage to find a way to fix it.


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> The TiVo is running very very very slowly. It's spent the last 15 minutes on the "Preparing to Call" bit


To be fair its actually quite normal for a Tivo to spend 15 minutes Preparing to Call and doing Housekeeping. You may be worrying about nothing unnecessarily on that score.


----------



## CarlWalters (Oct 17, 2001)

I did do the editing in Sanderton's Startup Editor 

Oh Woe


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> I did do the editing in Sanderton's Startup Editor
> 
> Oh Woe


I don't access my Tivo on the web through a Windows server on my home network though but directly via my router and with a username and password.

I have done an edit using Startup Editor remotely on the web that way once and then rebooted the Tivo using Hackman and had no problems with doing so.


----------



## CarlWalters (Oct 17, 2001)

but I'm guessing that ther must be something in the changes that I made to rc.sysinit.author that has broken my TiVo - but I don't know what? The TiVo itself is still functioning but all network access seems to have vanished


----------



## Pete77 (Aug 1, 2006)

Perhaps blindlemon can suggest something as the one who most often has to help remedy this kind of situation.


----------



## CarlWalters (Oct 17, 2001)

I think a new drive is going to be the only way out of this kerfuffle 

Mr Blindlemon?


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> I think a new drive is going to be the only way out of this kerfuffle
> 
> Mr Blindlemon?


You should be able to pull the drive and boot on an MFSTools CD and sort out whatever is wrong that is preventing Telnet, FTP and TivoWeb from starting.

Unless of course you think you may as well install a larger hard drive while you are at it anyway?


----------



## blindlemon (May 12, 2002)

I would suggest booting the drive from the Silicondust NIC CD, mounting the root partition and editing rc.sysinit and rc.sysinit.author to remove all non-essential calls. 

If that doesn't fix your networking then re-install the network drivers from the NIC CD. As much as I'd love to sell you a new drive, all is not lost by any means


----------



## CarlWalters (Oct 17, 2001)

ooh hang on......I seem to be able to see TiVo on the network now. I can ping it and telnet in  but no TiVoWeb 

I guess my next step should be to try and sort out the rc.sysinit ? I had just installed Sanderton's StartUpEditor today follwing his instructions. Should I try to put back a "vanilla" flavoured rc.sysinit? 

I'm a bit nervous about stuf now....


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> ooh hang on......I seem to be able to see TiVo on the network now. I can ping it and telnet in  but no TiVoWeb
> 
> I guess my next step should be to try and sort out the rc.sysinit ? I had just installed Sanderton's StartUpEditor today follwing his instructions. Should I try to put back a "vanilla" flavoured rc.sysinit?


That sounds like a good idea.

A vanilla file one only seems to contain a *#!/bin/bash* line

Are you saying even if you reboot the Tivo with both a cold reboot (power off) and then warm reboot (through the System Reset menu) you still can't access Tivoweb?


----------



## blindlemon (May 12, 2002)

Pete77 said:


> A vanilla file one only seems to contain a *#!/bin/bash* line


Don't create an rc.sysinit with just that line 

I'm assuming you mean rc.sysinit._author_, but had to ask


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> I'm assuming you mean rc.sysinit._author_, but had to ask


rc.sysinit.author.edit file in my case edited in Startup Editor. Anyhow its got a # at the front so presumably it doesn't get run?

Perhaps it would be safer if you advised on this rather tricky matter blindlemon


----------



## blindlemon (May 12, 2002)

I've never used the startup editor so it would be a bit like asking a confirmed retrosexual to advise on face cream...


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> I've never used the startup editor so it would be a bit like asking a confirmed retrosexual to advise on face cream...


Are you a confirmed retrosexual then blindlemon? 

See www.guardian.co.uk/theguide/columnists/story/0,,1337921,00.html

Given your interest in Tivos I think not just yet as they are too up to date and relevant still, although give it another five years and Tivos will definitely be exclusively Retrosexual territory:-



> There's only one thing we retrosexuals love more than stinking out a train carriage with our manly fug, *and that's our not-inconsiderable fear of modern technology.*
> 
> You may love your thumb-sized life planner or your eyelid phone, *but we stinking retrosexuals greet anything new with a sneer/ befuddlement*. *Retrosexuals love anything matt black with big buttons that hums and breaks down*.
> 
> We build shrines to early 1980s technology, covering it in matt black candles and praying for the resurrection of laserdiscs and Xerox. *We call our god Old School, while younger, saner people reach for a bin bag and take this crap down to Oxfam. *


The Tivo S1 really isn't quite there yet but give it five years to a time when Windows Vista MCE does everything and Virgin Media have launched the Tivo S3 and it may well be seriously in the running. 

As I say the Tivo S1 isn't quite there yet but perhaps you have a Linn Sondek or two and a nice mountain of LPs around to help reinforce the image?


----------



## blindlemon (May 12, 2002)

I think the guy who wrote that is confusing retrosexuals with luddites. Just because you shave with piece of flint doesn't mean you have to like crap old black & white TVs...

He's clearly a metrosexual Mac user


----------



## Pete77 (Aug 1, 2006)

Is this more what you had in mind and would you say that you were one of them?

www.geocities.com/phatforrest/retro.html


----------



## CarlWalters (Oct 17, 2001)

morning all 

well I can still ping and telnet but no TiVoWeb

so I had a look at the contents of /etc/rc.d

now the tail of rc.sysinit contains this

[ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author

which I guess is trying to run /etc/rc.d/rc.sysinit.author?

and /etc/rc.d/rc.sysinit.author contains

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi

which I suppose is trying to run /var/hack/rc.sysinit.author.edit (the Sanderton StartUpEditor thing)?

and /var/hack/rc.sysinit.author.edit contains

/bin/setpri fifo 1 $$ >/dev/null 2>&1 &

#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi
/var/hack/bin/tivoftpd >/dev/null 2>&1 &
/var/hack/tivoweb-tcl/tivoweb >/dev/null 2>&1 &
/var/hack/TivoWebPlus/tivoweb >/dev/null 2>&1 &
/var/hack/endpad.tcl -s 2 -e 5 >/dev/null 2>&1 &
/var/hack/bin/vserver >/dev/null 2>&1 &
/var/hack/mfs_stream/tyhttpd 2000 4 >/dev/null 2>&1 &
/var/hack/mfs_ftp/mfs_ftp.tcl >/dev/null 2>&1 &
#/var/hack/scripts/30sec.tcl >/dev/null 2>&1 &

which looks as though it is trying to call itself. So Isn't it going to get locked up in some sort of "loop of death" with /var/hack/rc.sysinit.author.edit trying to run itself? Or am I being daft ?


----------



## blindlemon (May 12, 2002)

As I said before, I'm not familiar with the startup editor.

However, on the face of it, that doesn't look right, so I would be inclined to go back to the 'standard' setup - ie. just rc.sysinit.author - and see if that helps.

FWIW, the last few lines of my rc.sysinit are

```
echo "rc.sysinit is complete"
source /etc/rc.d/rc.net
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &
/sbin/tnlited 23 /bin/bash -login &
/sbin/tivoftpd

[ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author
```
and my 'default' rc.sysint.author just runs tivoweb:-

```
#!/bin/bash
/var/hack/tivoweb-tcl/tivoweb
```


----------



## CarlWalters (Oct 17, 2001)

three cheers for Mr BlindLemon 

I've gone back to a very simple rc.sysinit.author with just

#!/bin/bash
/var/hack/tivoweb-tcl/tivoweb

then 

sync
sync
reboot

and now not only do I have TiVoWeb back but also TiVo is making its Daily Call

Hurrah 


However it does mean that I probably wont need a new hard disk just yet Mr BlindLemon. Sorry


----------



## Pete77 (Aug 1, 2006)

*if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi*

These should not be in rc.sysinit.author.edit and are not part of mine or displayed by sanderton's Startup Editor. I believe those commands should only be in your rc.sysinit.author file.


----------



## Pete77 (Aug 1, 2006)

Using Hackman I see that my rc.sysinit.author file actually contains this

*#!/bin/bash
if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi*

That is what has by accident strayed into your rc.sysinit.author.edit file and is probably hanging things.

But my rc.sysinit file is shown by Hackman to contain all this:-

*#!/bin/bash
#
# /etc/rc.d/rc.sysinit - run once at boot time
#

#
# Useful functions
#

function nthword () {
n=0
for foo in $* ; do
if [ $n -eq $1 ] 
then 
echo $foo
fi
n=$(($n+1))
done
}

function runme () {
echo "Scanning for $1 repair scripts"
for foo in /var/persist/*.$1 ; do
if [ -f $foo ]
then
echo "Running repair program $foo"
rm -f $foo.old
mv $foo $foo.old
chmod 555 $foo.old
if /tvbin/crypto -vfs $foo.sig $foo.old /tvlib/misc/service-v3-s.pub ; then
$foo.old || echo "$foo failed."
else
echo "$foo failed signature check."
fi
rm -f $foo.old $foo.sig
fi
done
}

function fixmodem
{
typeset MAXTRIES=3

typeset MODEMTYPE=/tvlib/modem/utils/modemtype.expect

if test ! -r $MODEMTYPE ; then
echo "fixmodem: no modem id program: $MODEMTYPE"
return
fi

typeset modem_name=$(/bin/expect $MODEMTYPE)

if test -z "$modem_name" ; then
echo "fixmodem: no modem name"
return
fi

typeset PATCHER=/tvlib/modem/patches/$modem_name/ram/expect_script

if test ! -r $PATCHER ; then
echo "fixmodem: no patcher: $PATCHER"
return
fi

#
# There is a patcher.
# Let's see how many times we have tried to use it.
# The file is supposed to consist of a single line; the number
# of characters on that line is the number of tries so far.
#
typeset FLAGFILE=/var/persist/modem_patch_tries

#
# The FLAGFILE must be a regular file, and it must be readable and writable.
# Otherwise, the file is created from scratch.
#
test -f $FLAGFILE -a -r $FLAGFILE -a -w $FLAGFILE ||
{
rm -rf $FLAGFILE
echo 'X' > $FLAGFILE
}

echo "Attempting to fix modem using: $PATCHER"

/bin/expect $PATCHER

typeset result=$?

if test $result -ne 0 ; then
typeset line tries

read line < $FLAGFILE
tries=${#line}

if test $tries -lt $MAXTRIES ; then
echo "Failed to fix modem; this was try #$tries"
line="${line}X"
echo $line > $FLAGFILE

#
# Verify that the file size has actually changed
#
typeset new_line

read new_line < $FLAGFILE
if test "$new_line" = "$line" ; then
sync
sync
sync
echo "Rebooting system to attempt another modem patch"
reboot
fi
echo "Failed to increase try count (file system full ?)"
else
echo "Too many unsuccessful tries to patch modem: $tries (giving up)"
fi
fi

#
# Eliminate the FLAGFILE, so that next time we reboot, we start
# the whole patch process again.
#
rm -f $FLAGFILE
}

# Set the path
PATH=/bin:/sbin:/tvbin:/devbin
export PATH

# Read in our testing configuration, if there is one.
[ ! -f /test.conf ] || source /test.conf

if [ "$sysgen" = true ]; then
echo Starting shared library installation environment
echo You may either Telnet in or type into secondary
echo serial port. Both the serial port and the telnet
echo connection will run bash as the login shell.
echo setting hostname to `/bin/getprom -hostname` >& /dev/console
/bin/hostname `/bin/getprom -hostname` >& /dev/console

echo setting ipaddr to `/bin/getprom -ipaddr` >& /dev/console
echo setting macaddr to `/bin/getprom -macaddr` >& /dev/console
/sbin/ifconfig eth0 hw ether `/bin/getprom -macaddr` `/bin/getprom -ipaddr` >& /dev/console

echo Starting Telnet Listner ... >& /dev/console
/sbin/tnlited 23 /bin/bash >& /dev/console

echo Starting /proc Listener ... >& /dev/console
mount /proc >& /dev/console
/tvbin/procd >& /dev/console >& /dev/console
while true; do sleep 1000; done
fi

# Some tcl scripts expect TIVO_ROOT to be set. It would be cleaner to 
# just use the path, but that's not the way it is right now. The
# contents of TIVO_ROOT is prepended to paths, so the empty string is
# just fine.
TIVO_ROOT=
export TIVO_ROOT

echo "Starting rc.sysinit"

# Release the old initrd
echo "Releasing /initrd and clearing ramdisk, if they exist"
umount -n /initrd
freeramdisk /dev/ram

# Start up swapping.
echo "Activating swap partitions" 
swapon -a

echo "Loading i2c driver"
insmod /lib/modules/i2c.o

videoconfig=`getprom -videoconfig`

# By default, we are running in NTSC mode.
if [ "$TV_STD" = "" ]; then 
case $videoconfig in
0|1|2|3|4|5|6) export TV_STD=NTSC;;
7) export TV_STD=PAL;;
esac
fi
echo "Box setup for $TV_STD mode"

# This shouldn't be here... Drivers should autoconfig.
echo "Loading FPGA driver"
case $videoconfig in
0 | 1) insmod /lib/modules/fpga7114_p15.o sTVStandard=$TV_STD;;
2) insmod /lib/modules/fpga7112.o sTVStandard=$TV_STD;;
3|4|7) insmod /lib/modules/fpga7114.o sTVStandard=$TV_STD;;
5|6) insmod /lib/modules/fpgacombo.o sTVStandard=$TV_STD;;
esac

# This should be read from /etc/fstab... or a config file somewhere.
export varpartition=/dev/hda9

# Check for panic signal
echo "Checking for Kickstart panic signal"

checkpanic

panic=$?
export EMERGENCY_REINSTALL=0
do_mfs_assert=0
do_mfs_cleanup=0

if [ $panic -ne 0 ] ; then
case $panic in
169)
echo "Kickstart code 5 2 - emergency reinstall"
export EMERGENCY_REINSTALL=1
;;	
174)
echo "Kickstart code 5 7 - force MFS check"
do_mfs_assert=1
;;
175)
echo "Kickstart code 5 8 - perform MFS cleanup"
do_mfs_cleanup=1
;;
*)
kickstart $panic
reboot
;;
esac
fi

echo "Cleanup $varpartition pass 1" 
if e2fsck -p $varpartition ; then
echo "$varpartition is clean" 
else 
echo "Cleanup $varpartition pass 2" 
if e2fsck -p $varpartition ; then
echo "$varpartition is clean after pass 2" 
else
echo "Can't clean $varpartition - rebuilding" 
mke2fs -c $varpartition 
echo "Mounting /var to rebuild it"
mount -t ext2 -n $varpartition /var 
mkdir /var/log /var/tmp /var/run /var/packages /var/dev /var/bin /var/utils /var/persist
umount -n /var 
fi
fi

echo "Mounting /var"

# If this is an NFS root, we may want to allow for /var to stay in root 
mount -v -n /var

echo "Cleaning up /var/mtab..." 
cp /dev/null /var/mtab

# Set the TIVO_SVR_ADDR up.
if [ ! "$xTIVO_SVR_ADDR" = "" ]; then
echo "Changing SVR ADDR to $xTIVO_SVR_ADDR"
export TIVO_SVR_ADDR=$xTIVO_SVR_ADDR
else 
echo "Using default TIVO_SVR_ADDR"
export TIVO_SVR_ADDR=192.168.50.1:80
fi

echo "Mounting initial environment..." 
mount -f / 
mount -f /var 
mount /proc /proc -t proc

echo "Cleaning up temporary files in /var/tmp"
rm -rf /var/tmp
mkdir /var/tmp

for dir in /var/log /var/run /var/packages /var/utils /var/persist /var/dev ; do
if [ ! -d $dir ] ; then
rm -rf $dir
mkdir $dir
fi
done

echo "Cleaning up old slices and bundles in /var/packages..."

rm -f /var/packages/*slice
rm -f /var/packages/*bnd
rm -f /var/packages/*jpm
rm -f /var/packages/*cpio
rm -f /var/packages/*gz

echo "Checking space in /var"

dfspace=$(df -P /var)

purge=0

if [ ! -z "$dfspace" ]; then
spacepct=$(nthword 12 $dfspace)
if [ ! -z "$spacepct" ]; then
spaceused=${spacepct%'%'}
if [ ! -z "$spaceused" ]; then
if [ $spaceused -gt 40 ]; then
purge=1
fi
fi
fi
fi

old_log_cleanup=0
too_big_logs=""
if [ $purge -ne 0 ]; then
echo "/var partition is rather full..."
du -s /var
echo "Removing old logs..."
rm -f /var/log/O*
old_log_cleanup=1
for foo in /var/log/* ; do
filesize=$(du -s "$foo")
if [ ! -z "$filesize" ]; then
kbytes=$(nthword 1 $filesize)
if [ ! -z "$kbytes" ]; then
if [ $kbytes -gt 10000 ]; then
echo "$foo is too big, removing it"
too_big_logs="$too_big_logs $foo"
rm -f "$foo"
fi
fi
fi
done
echo "Performed an emergency /var cleanup" >> /var/log/messages
fi

fixmodem

# Run the Phase 1 (/var is mounted and has some free space) scripts
runme phase1

echo "Initializing TiVo extension..." 
# TODO: tivosetup ??? what does this do in tivosh?

echo "Set up environment vars for hardware configuration..."

# Need a way to override these...
# Should just source /etc/tivoconfig/hardware... It should set these up...
if [ "$TIVO_REMOTE" = "" ]; then export TIVO_REMOTE=TIVO; fi
echo "Remote control is " $TIVO_REMOTE

if [ "$MFS_DEVICE" = "" ]; then export MFS_DEVICE=/dev/hda10; fi
echo "MFS partition on " $MFS_DEVICE

echo "Loading media drivers..."

if [ "$runideturbo" = false ]; then
echo "Running without ideturbo mode ..."
else
echo "Loading ideturbo ..."
insmod /lib/modules/ideturbo.o
fi

if [ "$LOG5505TOSERIAL" = true ]; then
echo "installing oslink.o"
insmod /lib/modules/oslink.o

echo "Waiting for response on DSS serial port"
/bin/expect /etc/boot.expect > /dev/ttyDSS < /dev/ttyDSS

if [ ! $? = 0 ]; then
jeiboot=true
else
echo "Booting from oslink..." > /dev/ttyDSS
fi
fi

asicversion=`/bin/asicVersion` 
if [[ "$oslink" = false || "$jeiboot" = true ]]; then
echo "Not going to boot over oslink ..."
else
echo "Auto-detecting oslink module (asic $asicversion)."
#if [ "$tuner1" = "" ]; then
# tuner1=199;
#fi
#if [ "$tuner2" = "" ]; then
# tuner2=199;
#fi
#
#case $tuner1 in
#199)
#	tunerboot1="/etccombo/boot199.btl"
#	;;
#299)
#	tunerboot1="/etccombo/boot299.btl"
#	;;
#esac
#
#case $tuner2 in
#199)
#	tunerboot2="/etccombo/boot199.btl"
#	;;
#299)
#	tunerboot2="/etccombo/boot299.btl"
#	;;
#esac

case `/bin/getprom -tunerconfig` in
0)
tuner1=199
tuner2=199
;;
1)
tuner1=299
tuner2=199
;;
2)
tuner1=199
tuner2=299
;;
3)
tuner1=299
tuner2=299
;;
esac

if [ "$DUAL" = true ] ; then
echo "Dual Sniffer Verifier Enabled"
tunerboot1="/etccombo/ndsdualboot"$tuner1".btl"
tunerboot2="/etccombo/ndsdualboot"$tuner2".btl"
else
if [ "$NDS" = true ] ; then
echo "Sniffer Verifier Enabled"
tunerboot1="/etccombo/ndsboot"$tuner1".btl"
tunerboot2="/etccombo/ndsboot"$tuner2".btl"
else
echo "Multi-Verifier"
tunerboot1="/etccombo/boot"$tuner1".btl"
tunerboot2="/etccombo/boot"$tuner2".btl"
fi
fi

case $asicversion in
0|1)
echo "Not Installing oslink module."
irmicrofile='/sbin/irmicro.hex'
;;
2|3)
echo "Installing oslink module (tuner $tuner1)"
irmicrofile='/sbin/irbmicro.hex'
insmod /lib/modules/oslink.o
cat $tunerboot1 > /dev/oslink
;; 
4)
echo "Installing both oslink (tuners $tuner1:$tuner2)"
irmicrofile='/sbin/irbmicro.hex'
insmod /lib/modules/oslink.o
cat $tunerboot1 > /dev/oslink
cat $tunerboot2 > /dev/oslink2
;;
esac
fi

echo "Loading fan ..."
insmod /lib/modules/fan.o

echo "Loading therm ..."
insmod /lib/modules/therm.o

echo "Loading pxmpegdecode ..."
insmod /lib/modules/pxmpegdecode.o sTVStandard=$TV_STD

if [ $videoconfig = 7 ]; then
echo "Loading scartmux ..."
insmod /lib/modules/scartmux.o
fi

echo "Splash the screen..." 
osdwriter /tvbin/PromScreen2Version7.$TV_STD.cs22 
/sbin/insmod -f /lib/modules/cachecard.o stats=1800
/sbin/cachectl -t
osdwriter /tvbin/PromScreen2Version7.$TV_STD.cs22

echo "Update IR microcode using $irmicrofile"
irprog -f $irmicrofile

# Figure out the system serial number. (On combo box,
# this is called the TiVo Service ID.)
SysSerial=`crypto -gsn`
if [ $? -ne 0 ]; then SysSerial=""; fi
if [ -z $SysSerial ]; then SysSerial=`driveid /dev/hda`; fi
if [ -z $SysSerial ]; then SysSerial=000000000000000; fi
export SerialNumber=$SysSerial
export HDA_ID=`/bin/driveid /dev/hda`
export HDB_ID=`/bin/driveid /dev/hdb`

# On combo box, determine the IRD Serial Number (which is
# dependent on the exported SerialNumber environment variable).
IrdSerial=`irdSerialNumber`
export IrdSerialNumber=$IrdSerial

#
# Export the prom version information
#
export PROMVERSION=`getprom -version`

# ??? Does this really add value?
echo "Starting update ..." 
/sbin/update

export DEBUG_BOARD=false
me=`getprom -hostname`
ipaddr=`getprom -ipaddr`
mac=`getprom -macaddr`

#
# Look up /proc/ioports for TCD8390 (should be first string). If present, 
# assume we have a debug board. There is probably an easier way to do this,
# but...
#

echo "Look for debug board ..."
tnforce=false
xxx=`cat /proc/ioports`
set -- $xxx
shift 2
if [ "$1" == TCD8390 ] ; then
tnforce=true
fi

set --

if /sbin/ifconfig eth0 hw ether $mac $ipaddr || [ "$tnforce" = true ] ; then
PATH=/bin:/sbin:/tvbin:/devbin
export PATH
echo "Starting network ..." 
gw=`getprom -gateway`
if [ ! $gw = 0.0.0.0 ]; then 
route add -net 192.168.0.0 gw $gw netmask 255.255.0.0
fi

export TMK_DEBUGGER=sleep
export DEBUG_BOARD=true
echo "Starting Telnet Listener..." 
if [ -x /bin/bash ] ; then
tnlited 23 /bin/bash -login &
else
export TIVOSH_POOLSIZE=800000
tnlited 23 /tvbin/tivosh -login &
fi

echo "Starting /proc Listener..." 
procd

# if [ -x /sbin/thttpd ]
# then
# echo "Starting http daemon..."
# thttpd
# ifconfig lo up
# fi
fi

echo "Setting TCP keepalive parameters..."

if [ -e /proc/sys/net/ipv4/tcp_keepalive_time ]; then
echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time
fi

if [ -e /proc/sys/net/ipv4/tcp_keepalive_probes ]; then
echo 3 > /proc/sys/net/ipv4/tcp_keepalive_probes
fi

if [ "$runsyslog" = false ]; then 
echo "No logging daemons started..."
else
echo "Starting logging daemons..." 
rm -f /var/run/syslogd.pid /var/run/klogd.pid
syslogd -p /var/dev/log -m 10000
klogd 
fi

echo "Check for PROM update ..."
if [ "$updateprom" = true ]; then
if [ -e /prom/TiVoProm.bin ]; then
osdwriter /tvbin/InstallingSoftware.$TV_STD.cs22
getprom -Update /prom/TiVoProm.bin
echo "Sleep...waiting for reboot"
sleep 1000000
restart
fi
echo "Can't find PROM image"
fi

echo "Loading mixaud ..." 
insmod /lib/modules/mixaud.o

echo "Updating system clock UID=$UID" 
settime -rtc

# If the clock is set to before 1970, ntpdate won't work. So we will
# bump it up closer. The factory default seems to be 1910.
year=`date +%Y`

if [ $year -lt 1998 ] ; then
settime 199811241010
settime -rtc
fi

#
# Log into the moderated log any emergency cleanup deletions we
# did. We need the TCD_ID, TIME and CALL_ID for this
#
if [ -e /var/persist/lastCallId ] ; then
lastCallId=`cat /var/persist/lastCallId`
else
lastCallId="UNKNOWN"
fi
now=`date '+%s'`

if [ $old_log_cleanup -ne 0 ]; then
echo "emergency_cleanup TCD_ID=$SerialNumber TIME=$now CALL_ID=$lastCallId FILE=/var/log/O" >> /var/log/svclog
fi

for logf in $too_big_logs ; do
echo "emergency_cleanup TCD_ID=$SerialNumber TIME=$now CALL_ID=$lastCallId FILE=$logf" >> /var/log/svclog
done

# Add second disk if there and uninitialized. No, we didn't take this out...
echo "Checking for additional disk..."
mfsadd

if [ $do_mfs_cleanup -eq 1 ] ; then
echo "Initiating MFS cleanup"
/tvbin/fsfix -nokill -splash -uncollide -rehash -salvage -reboot
fi

# Start the EventSwitcher and MfsDaemon
echo "Starting EventSwitcher..." 
switcherstart -m

if [ $do_mfs_assert -eq 1 ] ; then
echo "Rebooting to perform MFS and database check"
/tvbin/mfsassert -please
/tvbin/reboot
fi

# Start the fan control process.
echo "Start fan control..."
fancontrol &

# Let him get started ??
sleep 1

# Run the Phase 2 (MFS is up) scripts
runme phase2

# Check whether we should enter diagnostics
# The authserial program detects the presence of a diagnostics test fixture.

if [ ! -x /tvbin/authserial -o \
! -x /tvbin/genkey -o \
! -r /tvlib/misc/diagkey.pub ] ; then
echo "Essential diagnostic file missing"
reboot
fi

/tvbin/genkey 128 1 > /var/tmp/challenge.dat

dodiag=false

if [ "$runfactorydiag" = true ] ; then
dodiag=true
if [ $asicversion -gt 1 ] ; then
# this is combo:
# the "runfactorydiag" bootparam indicates that we are in the factory
# with a brand new disk. Don't quit until we've established link
# with diag station
while ! /tvbin/authserial -authslave /tvlib/misc/diagkey.pub /var/tmp/challenge.dat ; do
echo Diagnostics station not found, trying again
sleep 1
done
else
# this is standalone, so we will just enter diagnostics
echo "Standalone diagnostics"
fi
else
if /tvbin/authserial -authslave /tvlib/misc/diagkey.pub /var/tmp/challenge.dat ; then
echo Diagnostics station present and authenticated
dodiag=true
fi
fi

rm -f /var/tmp/challenge.dat

# Run factory diagnostics?
if [ "$dodiag" = true ] ; then
if [ ! -x /tvbin/factorydiag ] ; then
echo "No factorydiag TCL script!"
else
echo Entering diagnostics...
if /tvbin/factorydiag ; then
echo "Diagnostics passed"
else
echo "Error running factory diagnostics"
reboot
fi
fi
fi

# Run the final test?
if [ "$runfinaltest" = true ] ; then
if [ -x /var/diag/finaltest ] ; then
if /tvbin/crypto -vfs /var/diag/finaltest.sig /var/diag/finaltest /tvlib/misc/service-v3-s.pub ; then
/var/diag/finaltest
else
echo "/var/diag/finaltest failed signature check."
reboot
fi 
elif [ -x /diag/finaltest ] ; then
/diag/finaltest
else
echo "Final test not found!"
fi
fi

# see if we need to check the battery
if [ -f /var/log/battery-check-needed ] ; then
if [ -x /var/diag/batterycheck ] ; then
if /tvbin/crypto -vfs /var/diag/batterycheck.sig /var/diag/batterycheck /tvlib/misc/service-v3-s.pub ; then
/var/diag/batterycheck
else
echo "/var/diag/batterycheck failed signature check."
reboot
fi 
elif [ -x /diag/batterycheck ] ; then
/diag/batterycheck
else
echo "Battery check not found!"
fi
fi

# combo diagnostics testmaster starts here
if [ "$testmaster" = true ]; then
if [ -f /etc/rc.d/rc.sysinit.diag ]; then
echo "Starting Diagnostic Test Master"
source /etc/rc.d/rc.sysinit.diag
else
echo "rc.sysinit.diag not found"
fi
fi

if [ "$runwriteback" = true ]; then
/diag/writeback /dev/hda11 256 -a2 &
/diag/writeback /dev/hdb3 256 -a2 &
while true; do sleep 1000; done
fi

if [ "$rundriverstress" = true ]; then
if [ -x /diag/SimpleStress ]; then
echo "Running SimpleStress"
/diag/SimpleStress
echo "SimpleStress exited"
reboot
fi
fi

# System Statistics to "messages" log file.
syslog -t Stats "== System startup resource statistics =="
syslog -t Stats "++ System build version numbers ++"
syslog -t Stats -f /etc/build-version
getprom -version | syslog -t Stats
IRvers=`irtest -t /dev/ttyS0 -V`
syslog -t Stats "IR version $IRvers"
syslog -t Stats "System Serial Number: $SysSerial"
syslog -t Stats -f /proc/version
syslog -t Stats "++ Memory usage ++"
syslog -t Stats -f /proc/meminfo
syslog -t Stats "++ CPU info ++"
syslog -t Stats -f /proc/cpuinfo
syslog -t Stats "++ Module info ++"
syslog -t Stats -f /proc/modules
syslog -t Stats "++ Device info ++"
syslog -t Stats -f /proc/devices
syslog -t Stats "++ Network device info ++"
syslog -t Stats -f /proc/net/dev

# Database conversions must happen before myworld, mcp, etc. are started.
if [ "$handcraft" != true ]; then
echo "Checking for database conversions..."
convert-db
fi

if [ "$upgradesoftware" = false ]; then
echo "Not upgrading software"
else 
# TODO... Find another way to do this...
tivosh /etc/rc.d/finishInstall.tcl
export -n EMERGENCY_REINSTALL
fi

# Run the Phase 3 (MyWorld is starting) scripts
runme phase3

cd /var/tmp

# Launch MyWorld and other services (apg, mcp, tcphonehome, dbgc) by telling
# the eventswitcher to launch it (via "switcherstart -l").

if [ "$handcraft" = true ]; then 
echo "Running without services." 
else
echo "Starting Services." 
switcherstart -l
fi

if [ "$audiostress" = true ]; then
echo "Starting audio stress"
if [ -x /devbin/audiostress ]; then
audiostress &
else
echo "Could not find audio stress prog"
fi
fi

if [ "$maintuner" = "1" ]; then
echo "Starting camtest for dual verifier mode"
camtest &
else
maintuner=0
fi

# Run the Phase 4 (background tasks have been started) scripts
runme phase4

if [ ! "$NDS" = "" ]; then
echo "Sleeping before enabling NDS sniffer output"
sleep 120
echo "Enabling NDS sniffer output"
/tvbin/send5505 "sniff 1"
fi

if [ ! "$BERR" = "" ]; then
echo "Sleeping before enabling Tuner BERR Test"
sleep 60
echo "Enabling Tuner BERR Test"
/tvbin/send5505 "wr299 28 40"
/tvbin/send5505 -i1 "wr299 28 40"
fi

if [ ! "$vmstat" = "" ]; then
echo "Starting memory statistic gathering"
vmstat 10 &
fi

[ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author

echo "rc.sysinit is complete"
source /etc/rc.d/rc.net
/sbin/tnlited 23 /bin/bash -login &
/sbin/tivoftpd[/quote]*

Perhaps blindlemon can opine on whether all of this content in rc.sysinit is normal?


----------



## CarlWalters (Oct 17, 2001)

I think that might be the problem you know. Perhaps I messed up somehow while installing Sanderton's StartUpEditor. Anyway I'm going to leave it alone for a day or two 

Thank's for everyone's help


----------



## Pete77 (Aug 1, 2006)

CarlWalters said:


> I think that might be the problem you know. Perhaps I messed up somehow while installing Sanderton's StartUpEditor. Anyway I'm going to leave it alone for a day or two
> 
> Thank's for everyone's help


In theory you can edit rc.sysinit.author fairly easily using the latest version of Hackman from www.tivohackman.com

This would be an alternative to using sanderton's Startup Editor module.


----------



## TCM2007 (Dec 25, 2006)

CarlWalters said:


> and /var/hack/rc.sysinit.author.edit contains
> 
> /bin/setpri fifo 1 $$ >/dev/null 2>&1 &
> 
> ...


Two things.

One, #!/bin/bash must the the very first line; it defines the language the rest of the script is written in.

Second, as you say it's calling itself, which will generate an infinite loop. Delete the whole

if [ -f /var/hack/rc.sysinit.author.edit ]; then
. /var/hack/rc.sysinit.author.edit
fi

line. Looks like someone followed my instructions by the letter on a steup which had already got Startup Editor installed, so copied StartupEditor's rc.syisinit.author into the .edit file.


----------



## blindlemon (May 12, 2002)

Pete77 said:


> Perhaps blindlemon can opine on whether all of this content in rc.sysinit is normal?


It is.

rc.sysinit is the main startup file for the TiVo - similar to autoexec.bat in the old DOS days - and controls everything that the TiVo does prior to getting to the main menu.


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> It is.
> 
> rc.sysinit is the main startup file for the TiVo - similar to autoexec.bat in the old DOS days - and controls everything that the TiVo does prior to getting to the main menu.


I had never even viewed it till today due to all the bad things I always heard about touching it. I hope viewing it but not saving it with Hackman will not have messed anything up.


----------

