Henry's Site Forum Index Henry's Site
A quiet contemplative island amid a sea of noise
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Howto Enable FTP and Telnet on HDTIVO

 
Post new topic   Reply to topic    Henry's Site Forum Index -> HDTivo talk
View previous topic :: View next topic  
Author Message
bdraw



Joined: 19 Aug 2004
Posts: 9

PostPosted: Sun Aug 29, 2004 9:40 am    Post subject: Howto Enable FTP and Telnet on HDTIVO Reply with quote

Introduction:

This document is the work of several folks who were kind enough to take the time to document and test this HOW TO. The intent was to make this HOW TO as simple as possible so non LINUX folks would be able to do these procedures.
However, It is highly recommended that you do think about what you are doing as you go through this rather than just blindly doing each step.

Please note: The authors take NO responsibility if you choose to modify your HDTVO from this HOW TO and end up messing up your TIVO’s disk.


Notes: Please read

It is assumed that the PC has a connection to the internet for downloading and such.

You can use the windows unzip for the Linux binaries but NOT for any scripts because it adds <cr><lf> to end of each line (DOS format) and the scripts won't execute. Dos2unix should fix if you forget.

You will need a text editor for many of the steps in this document. There is a LINUX version of vi called vim so you can edit in LINUX you can also use nano if you don't know how to use vi or you can download the trial version of Textpad which will let you edit on the PC but save in UNIX format ie. lines end in the Null character.
If you run a script on the Linux PC and you get an error it is due to either it was saved in DOS format or you have not made it executable via chmod 775 on it or you messed up syntax in the script(stating the obvious).
You can tell if you saved it in UNIX format by opening the file in Windows using Notepad and the lines should all mash together with no line feeds.

Please note that this is an evolving document as folks go through these steps and will require some revisions (that is why we are up to several revisions of this document already). This author tried to be methodical and take good notes as I went through this process. However, there was no HOW TO when I did it so my notes got a bit messy as I found myself going off to figure how to do something by reading and trying things .
The point is, please think a bit about what you are doing as you go through this

Pre-requisites:

You will need to buy 3 things and download some programs.
1 - The Linksys USB Ethernet adaptor USB200M as the drivers for it are already on the HDTIVO Netgear FA120 also works with same drivers

2- A 250 GB disk which when done will be the disk that stays in your TIVO.

3 - A torx screwdriver #10 to remove the TIVO’s case and disk drive #15 for drive-to-drive-sled screws, #10 for case & drive-sled-to-case screws. Some folks have reported needing the #15 but this author’s TIVO did not.

4 – Software, there are lots of utilities and other downloads, if you want to download them all first there is a list of all the downloads at the bottom of this document.


Step 1 – Make a backup of the original Tivo disk.
This is the MOST important step in the whole process.

If you do these 3 things correctly, you can NOT possibly muck up your TIVO.

The method that I describe may be a bit of overkill but to me it is the safest because you will be doing all the patching to and running your HDTIVO off of the CLONED’ disk. I look at it as a $160 insurance policy because the Original Disk is not touched.


1) Buy the same make and model of the disk in the TIVO. Mine is a Western digital WD2500LB and I bought almost the same drive at Best Buy. The difference is that the LB is a quieter version but almost impossible to find.

2) Do a COMPLETE clone of the Tivo disk in a PC booted off of the MFS tools CDROM

3) Take the Original and put it in a safe place. Use the cloned disk for all the hacks.

#2 is the key because that is a bit for bit copy of the Original and you do all the hacking on the clone. My original disk is now in a static bag, bubble wrapped and marked - KTFO

So, #2 is the scariest part of the WHOLE hacking process because you have to get the syntax correct or you can wipe out your Original.
But keep reading and if you think before you act, it's no sweat.


A) Find the MFS Tools iso and make a bootable CDROM from it
You must use a version that has lba48 support so you can get it here:
http://www.ptvupgrade.com/downloads/ptv-mfstools2-large-disk.iso


B) Hook up your Tivo disk and your new,blank disk and a cdrom into a PC. Remember those master/slave jumpers.
If you want to leave the jumper on cable select be sure to pay attention to where you connect the drive and confirm that the drive is set by the BIOS correctly.
The way you connect them does not matter if you remember how Linux assigns drive letters:
Primary Master = hda
Primary Slave = hdb
Secondary Master = hdc
Seconday Slave = hdd


I will use this convention:
Make the Tivo drive as a Secondary Slave, hence referred to as hdd and the new backup drive as Primary Master , hence hda.
The Cdrom will be Secondary Master,hence hdc

C) Set your PC to boot off of the CDrom and reboot.
You will end up with the Linux # prompt

D)Enable DMA cause this is gonna be slow anyway:
hdparm -d1 /dev/hda
hdparm -d1 /dev/hdd

If this command does not “take” due to moptherboard or other issues, copy should proceed but may take up to 3x longer. SMART drive should work for TivoWebPlus (later step) if buying like drive to existing one.

E) Stop, take a break and then Double check your disk setup and execute this command exactly:

dd if=/dev/hdd of=/dev/hda

This command stands for Data Dump, if=INPUT of=OUTPUT

"if" is the TIVO Disk and "of" is the new,backup disk if you connected them the way I said.

If you want to connect them in a different order, just remember the table above and use the correct hdX and hdY in the command above.

If you connected the disks correctly, all you will see is the red light on your PC solidly on for about 5 -6 hours.

An alternate that will give you a percent complete (I have NOT used this method) is:
mfsbackup -Tao - /dev/hdd | mfsrestore -zi - /dev/hda

F) When done, reset the jumper on the new,backup disk and put it in the TIVO and plug it in.
If the TIVO boots,acquires the data from the satellite and then flips to live TV, you are golden.
From here on out, You will be running off of the cloned disk so put the original in a safe place.

Step 2 – Putting the SW boot exploit - killhdinitrd onto the new disk

A) There is a little bit of a chicken and egg thing here that you may have to think out.

I recommend downloading all the utilities first and copying them to a fat partition. You can use a pendrive or a hard drive just so long as it is FAT and not NTFS. You can use a floppy which I chose not to or you can use the Windows boot disk.

B) Make a directory on the XP disk called tivotools

http://www.dealdatabase.com/forum/showthread.php?t=36692
read it,make a donation to EFF and at the bottom of the post is the boot exploit that you need to download to c:\tivotools on your XP boot disk.

E)Unzip it in c:\tivotools

F) While you are at it, go to:
http://tivoutils.sourceforge.net/
and download all the files for the Series 2 (mips processor version) eg. devbin,netbin,ps to c:\tivotools
The Tivo is missing a bunch of needed Linux commands. Also at this site is a version of the vi text editor for Series 2, vim61-s2.tgz

For the files netbin & devbin, these are actually directories of linix gzipped files. Get a good gz unzip (I use Stuffit) program in windows to put in a subdirectory of tivotools or gz unzip (not the same as unzip) or unzip on the pc side. These files will need to be chmodd’ed and can be put in the /bin directory or another directory in the path. Note these executables (make sure you download Series 2/MIPS) will NOT run from the PC boot CD or a NTFS partition. (which supports BulyBox and a variety of aliased utilities).


D) After you have collected all the files needed shut down the PC and Rearanged the jumpers on the disks in the LINUX/Windows PC so that the new TIVO disk was Secondary Master –hdc, my XP boot disk was Primary Master-hda and my CDROM was Primary Slave.

G), reconnect power to the TIVO drive and boot from the MFS tools Linux CD.

H) Mount the FAT disk that has killhdintird:
mount /dev/hda1 /mnt/c (for a windows drive)
For a pendrive
Mkdir /mnt/pendrive
mount –t vfat /dev/sda1 /mnt/pendrive
You 'may' need to do a mkdir if the directory doesn’t already exist.

I) Execute the patch:
./mnt/c/tivotools/killhdinitrd /dev/hdc6
Or

/mnt/pendrive/tivotools/killhdinitrd /dev/hdc6

You may need to do a chmod 775 on killhdinitrd to make it an executable
chmod 775 /mnt/c/tivotools/killhdinitrd
I have not found one person who has said that the tivo bootcode is NOT in partition 6

J) It prints out terms, type YES to confirm hit enter and if no errors reported, shut the PC down

K) Move the jumper on the patched disk, Stick it in the TIVO and turn it on. It should boot, reload stuff from the sat and work as a regular HDTIVO

Step 3 - Getting the network up , telnet ,ftp,mfs ftp working and installing needed binaries

A) Boot the PC into XP (Only necessary if you didn't download all the files in advanced.)

B) The standard tivoftpd that comes with the MFSTools CD is not for a mips processor.
get tivoftpd from here:
http://tivo.stevejenkins.com/downloads/tivoftpd.mips and put on c:\tivotools

At this point you may want to read below and download all the required and recommended files for later use in the following steps. Will save a few reboots going back and forth between bootable Linux, reinstalling the drive, and Windows on the PC..

C) While you are at it, unzip all the files that you got from sourceforge eg. devbin,netbin,ps
Make sure you at least have the ls command as you will need it to look at your TIVO disk. Unzip the vim61-s2.tgz file to vim61-s2.tar


D) Save the enclosed rc.sysinit.author file in c:\tivotools
I know this file works because it is the one from my HDTIVO and I just now ftp'd it from my TIVO to my PC.
You should edit it to make sure that the ethernet address is the one you want. Do a "save as" if you are using Textpad on the PC to make SURE that it is in UNIX format. This is a REALLY important file as it is run at boot time by the tivo.

It installs the drivers for the Linksys USB adaptor so I hope you bought the USB200M,starts the telnet daemon,ftp deamon and configures your IP address

E) Shutdown PC and reconnect the TIVO drive and reboot from the CD

F) The TIVO has 2 partitions that you will be adding files to. Partition 7 contains the “/” “root” directory and partition 9 contains the “/var” directory. Assuming you have your Tivo disk connected as secondary master, use the following commands to mount the Tivo partitions:
mkdir –p /mnt/tivo
mount -t ext2 /dev/hdc7 /mnt/tivo
mount -t ext2 /dev/hdc9 /mnt/tivo/var

Note that you must mount partition 7 before mounting partition 9. Also note that you will have to change “hdd” to “hda”, “hdb”, or “hdc” if you have it connected to one of the other IDE channels.

Many of the tools will go into /mnt/tivo/var and some will go into /mnt/tivo so do :

mkdir /mnt/tivo/var/hack
mkdir /mnt/tivo/var/mfs_ftp


G) Copy the sysinit file that you previously saved on the disk tivotools directory to /mnt/tivo/etc/rc.d (you may need to mount your partition first,
if it is usb pendrive mount –t vfat /dev/sda1 /mnt/pendrive * don’t forget to create /mnt/pendrive
if it is NFTS mount –t ntfs /dev/had /mnt/c ( NTFS is read only)
cp /mnt/c/tivotools/rc.sysinit.author /mnt/tivo/etc/rc.d
Make it executable via
chmod 775 /mnt/tivo/etc/rc.d/rc.sysinit.author
if you forgot to edit your file before you can still to it now with pico (pico and nano are almost identical)
pico /mnt/tivo/etc/rc.d/rc.sysinit.author
use ctrl x to exit and be sure to save. Watch out for line breaks.


H) copy tivoftpd.mips to /mnt/tivo/var/hack and make it executable via chmod 775 <filename>
This is for ftp access to your Tivo

I)Copy the ls,ps and other LINUX commands from tivotools on the XP disk or pendrive into /mnt/tivo/bin on the TIVO disk


Setting Up VI

J)) IF YOU WANT VI: copy the vim61-s2.tar file from tivotools on the XP disk into /mnt/tivo on the TIVO disk and then run the following command to unpackage it:

tar –xf vim61-s2.tar

This will put the vim executable in /var/hack/bin as well as a library file in /var/hack/lib. The vim program needs an environment variable set to tell it where the library file is, and an easy way to do that so you don’t have to type it every time is with a .bash_profile file. Using your favorite unix-line-feed editor on Windows (like Textpad) or vi itself from the mfs_tools CD create a file named .bash_profile in the directory /mnt/tivo containing the following commands:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/hack/lib
export PATH=$PATH:/var/hack/bin

The second line makes it possible to run vi just by typing “vim61” in any directory instead of having to type the whole path /var/hack/bin/vim61 each time.

Setting up nano
If you are like me and you never learned vi, you can use nano, harder to use, but much easier to learn.
Download from.
http://dealdatabase.com/forum/showthread.php?t=35936
extract nano and copy it to /mnt/tivo/bin and make it executable.
Extract terminfo and extract it to /mnt/tivo/var/

The nano program needs an environment variable set, and an easy way to do that so you don’t have to type it every time is with a .bash_profile file. Using your favorite unix-line-feed editor on Windows (like Textpad) or vi itself from the mfs_tools CD create a file named .bash_profile in the directory /mnt/tivo containing the following commands:

export TERMINFO=/var/terminfo/



Testing everything in this step

K) Put the TIVO disk (remember that jumper) into the TIVO and turn it on. If everything is hunky dory, you will get the standard starting up messages and after a bit, the lights on the USB adaptor will light up.

L) Reboot your PC in XP and assuming you have everyone connected to an Ethernet switch, test the network from a Windows command prompt window:
ping 192.168.1.40 (Is my TIVO's IP address)

If that works, try telnet 192.168.1.40 as well as ftp

If all that works, then congrats to both of us:) Me for my memory and you for following directions well.

Now that this is setup everything else can be done without removing the Hard drive from the Tivo.


Software
Mfs linux boot cd
http://www.ptvupgrade.com/downloads/ptv-mfstools2-large-disk.iso

Killhdinitrd
http://www.dealdatabase.com/forum/showthread.php?t=36692

mfsftp for mips
http://tivo.stevejenkins.com/downloads/tivoftpd.mips

Tivoutils
http://tivoutils.sourceforge.net/
and download all the files for the Series 2 (mips processor version) eg. devbin,netbin,ps to c:\tivotools
The Tivo is missing a bunch of needed Linux commands. Also at this site is a version of the vi text editor for Series 2, vim61-s2.tgz

For the files netbin & devbin, these are actually directories of linix gzipped files. Get a good gz unzip (I use Stuffit) program in windows to put in a subdirectory of tivotools or gz unzip (not the same as unzip) or unzip on the pc side. These files will need to be chmodd’ed and can be put in the /bin directory or another directory in the path. Note these executables (make sure you download Series 2/MIPS) will NOT run from the PC boot CD (which supports BulyBox and a variety of aliased utilities).

nano
http://dealdatabase.com/forum/showthread.php?t=35936

Files
rc.sysinit.author
Code:

#! /bin/bash
#install usb and ethernet drivers
insmod /lib/modules/usbcore.o
insmod /lib/modules/hcd.o
insmod /lib/modules/ehci-hcd.o
insmod /lib/modules/ax8817x.o
sleep 10

#configure ethernet
ifconfig eth0 192.168.1.40 broadcast 192.168.1.255 netmask 255.255.255.0
sleep 100

#telnet
tnlited 23 /bin/bash -login &

#ftp
/var/hack/tivoftpd.mips

#mfs_ftp
/var/mfs_ftp/mfs_ftp.tcl

_________________
Ben
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Henry's Site Forum Index -> HDTivo talk All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group