Lou Jacob
08-22-2007, 03:00 PM
WARNING: Do not attempt to change the IP address of your unit unless you are 100% comfortable with the steps involved. Editing your system startup file improperly can cause unexpected and unhappy results! PTVupgrade is not responsible if you mess up your pre-configured kit. Be forewarned!
PTVnet kits come with a DHCP IP address so they will work on most any network that has a DHCP server. If you really MUST have a static IP address, you can certainly set one. If you decide to do this, we highly recommend you use a serial cable, just in case you lose network connectivity, but you can do it by simply change/set you IP address by using 'telnet' or TeraTerm pro to connect to your unit and then doing a few simple things.
The first step is to tell your unit not to use DHCP and to use STATIC, instead.
Open a terminal session to your unit and type the following at the bash-2.02# prompt:
bash-2.02# flag_swap NETWORK
and you will see a response similar to this (the first line will not be present if you are not connected with a serial cable)
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
STATIC set to OFF. Now setting it to ON and turning off DHCP
bash-2.02#
This is just a simple acknowledgement that you are setting a 'flag' to tell the unit to use a STATIC IP address instead of a DHCP one.
Now, there is already a default STATIC IP information that has already been set in the /etc/rc.d/rc.sysinit.author file. This is the information:
STATIC_IP=192.168.1.98
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1
If you want a different IP address than is already specified, you will need to use the vi editor to change the values in the file. Type:
rootwrite
vi /etc/rc.d/rc.sysinit.author
(note that there is a backup of this file in /ptvupgrade/etc/rc.sysinit.author and also note that the rootread and rootwrite commands make the root directory of your TiVo read-only and read-write in order to protect files and/or allow you to change them).
Now you will need to edit the file, which is not necessarily very intuitive. Use the "j" key to go down a line until you get to the first line you want to edit. Use the "l" key to go right, use the "x" key to delete a character, and use the "i" key to go into "insert" mode and actually type the information into the file. Use the "esc" key to exit "insert" mode and go back to navigational mode.
Once you have the file looking as it should you can write and quit the file by hitting "escape" followed by the ":x" command (just hit colon, and then "x"). If you get screwed up before writing the file, don't panic, just his "esc" and then hit ":quit" and you can then start over again. If things get really messed up, you can restore the file by typing:
cp /ptvupgrade/etc/rc.sysinit.author /etc/rc.d/rc.sysinit.author
and you will restore the old file.
When you are done, type:
rootwrite
With all of that said, you must be VERY careful when editing this file and not change anything that you don't understand. If you mess it up, you could create some real problems for the other modifications on your unit. If you do mess it up, you should still be able to communicate with your unit using a serial cable.
Well, if you've gotten this far, then you are good to go! Double check everything you did.
If you are running the 6.2 version of PTVnet, also type the following:
mv /sbin/dhclient /sbin/dhclient.orig
touch /sbin/dhclient
chmod 755 /sbin/dhclient
sync
and now, for all versions (311e and 6.2) type
restart
and your unit should start up with no problems and a new IP address!
PTVnet kits come with a DHCP IP address so they will work on most any network that has a DHCP server. If you really MUST have a static IP address, you can certainly set one. If you decide to do this, we highly recommend you use a serial cable, just in case you lose network connectivity, but you can do it by simply change/set you IP address by using 'telnet' or TeraTerm pro to connect to your unit and then doing a few simple things.
The first step is to tell your unit not to use DHCP and to use STATIC, instead.
Open a terminal session to your unit and type the following at the bash-2.02# prompt:
bash-2.02# flag_swap NETWORK
and you will see a response similar to this (the first line will not be present if you are not connected with a serial cable)
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
STATIC set to OFF. Now setting it to ON and turning off DHCP
bash-2.02#
This is just a simple acknowledgement that you are setting a 'flag' to tell the unit to use a STATIC IP address instead of a DHCP one.
Now, there is already a default STATIC IP information that has already been set in the /etc/rc.d/rc.sysinit.author file. This is the information:
STATIC_IP=192.168.1.98
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1
If you want a different IP address than is already specified, you will need to use the vi editor to change the values in the file. Type:
rootwrite
vi /etc/rc.d/rc.sysinit.author
(note that there is a backup of this file in /ptvupgrade/etc/rc.sysinit.author and also note that the rootread and rootwrite commands make the root directory of your TiVo read-only and read-write in order to protect files and/or allow you to change them).
Now you will need to edit the file, which is not necessarily very intuitive. Use the "j" key to go down a line until you get to the first line you want to edit. Use the "l" key to go right, use the "x" key to delete a character, and use the "i" key to go into "insert" mode and actually type the information into the file. Use the "esc" key to exit "insert" mode and go back to navigational mode.
Once you have the file looking as it should you can write and quit the file by hitting "escape" followed by the ":x" command (just hit colon, and then "x"). If you get screwed up before writing the file, don't panic, just his "esc" and then hit ":quit" and you can then start over again. If things get really messed up, you can restore the file by typing:
cp /ptvupgrade/etc/rc.sysinit.author /etc/rc.d/rc.sysinit.author
and you will restore the old file.
When you are done, type:
rootwrite
With all of that said, you must be VERY careful when editing this file and not change anything that you don't understand. If you mess it up, you could create some real problems for the other modifications on your unit. If you do mess it up, you should still be able to communicate with your unit using a serial cable.
Well, if you've gotten this far, then you are good to go! Double check everything you did.
If you are running the 6.2 version of PTVnet, also type the following:
mv /sbin/dhclient /sbin/dhclient.orig
touch /sbin/dhclient
chmod 755 /sbin/dhclient
sync
and now, for all versions (311e and 6.2) type
restart
and your unit should start up with no problems and a new IP address!