PDA

View Full Version : Sample rc.sysinit.author


bigphil1
12-24-2007, 05:21 AM
Could someone post a sample rc.sysinit.author for an S3 with telnet and the console working? I have already done steps 0-7 on the following thread:

http://www.dealdatabase.com/forum/showpost.php?p=279041&postcount=10

Unfortunately, step 8 has turned out to be more challenging than anticipated. I have been struggling with this for days now and any samples I've had from my previously hacked Tivo's don't seem to work out.

Thanks

ScanMan
12-24-2007, 08:34 AM
Could someone post a sample rc.sysinit.author for an S3 with telnet and the console working? I have already done steps 0-7 on the following thread:

http://www.dealdatabase.com/forum/showpost.php?p=279041&postcount=10

Unfortunately, step 8 has turned out to be more challenging than anticipated. I have been struggling with this for days now and any samples I've had from my previously hacked Tivo's don't seem to work out.

Thanks
Sample rc.sysinit.author:#!/bin/bash
export PATH=$PATH:/hacks:/hacks/bin
tnlited 23 /bin/bash -login &
tivoftpd &
/hacks/TivoWebPlus/tivoweb &

'bootpage -p' output:bash-2.02# bootpage -p /dev/hda
root=/dev/hda4 dsscon=true console=1,115200 upgradesoftware=false
I have a TivoHD using Jamie's custom kernel. Don't forget to disable iptables. FYI, for the TivoHD (not original S3) you'll need an RS232-TTL converter for console; see this (http://www.dealdatabase.com/forum/showthread.php?t=56384) thread. See this (http://www.dealdatabase.com/forum/showthread.php?t=53169) post for info on the original Series 3 console cable setup.

bigphil1
12-24-2007, 09:42 AM
Sample rc.sysinit.author:#!/bin/bash
export PATH=$PATH:/hacks:/hacks/bin
tnlited 23 /bin/bash -login &
tivoftpd &
/hacks/TivoWebPlus/tivoweb &

'bootpage -p' output:bash-2.02# bootpage -p /dev/hda
root=/dev/hda4 dsscon=true console=1,115200 upgradesoftware=false
I have a TivoHD using Jamie's custom kernel. Don't forget to disable iptables. FYI, for the TivoHD (not original S3) you'll need an RS232-TTL converter for console; see this (http://www.dealdatabase.com/forum/showthread.php?t=56384) thread. See this (http://www.dealdatabase.com/forum/showthread.php?t=53169) post for info on the original Series 3 console cable setup.

Thanks. I have the original S3. I guess the step I am missing is disabling iptables (since its not in steps 0-8). I will try this procedure now - which was coincidentally posted by you.

http://www.dealdatabase.com/forum/showpost.php?p=252428&postcount=1

ScanMan
12-24-2007, 11:22 AM
Thanks. I have the original S3. I guess the step I am missing is disabling iptables (since its not in steps 0-8).That's one way, and definitely the way needed when using custom kernels compiled with NETFILTER OFF. A simpler way if you're just using a replace_initrd kernel is to just insert:iptables -Finto your rc.sysinit.author right after the EXPORT line; it simply "flushes" all the firewall rules and gives you an open machine.

Oh and re: that post, you don't need the sleep, netfilter-disable stuff. Just make sure you get that syntax right. That's a newline (\n) in there. In the end your iptables should look like:#!/bin/bash
exit 0And be chmod 755.

bigphil1
12-24-2007, 12:04 PM
Thanks. I have the original S3. I guess the step I am missing is disabling iptables (since its not in steps 0-8). I will try this procedure now - which was coincidentally posted by you.

http://www.dealdatabase.com/forum/showpost.php?p=252428&postcount=1

I did the procedure below to disable iptables. The tivo started a rebooting cycle following this. Once I put the original iptables file back, it booted fine again.

mv iptables iptables.old
echo -e '#!/bin/bash\nexit 0' > iptables
chmod 755 iptables

One thing I noticed is that the original iptables was not a plaintext file when I viewed it. The new one that was created was a regular text file.

ScanMan
12-24-2007, 12:21 PM
I did the procedure below to disable iptables. The tivo started a rebooting cycle following this. Once I put the original iptables file back, it booted fine again.Try the 'iptables -F' trick; btw, what kernel are you using? Describe your exact steps a little more, that post is more of an outline. Yes, the stock iptables is a binary file. If you can't get console messages, what does your 'kernel' log look like; it's in the 9th partition (/var) log directory.

Jamie
12-24-2007, 01:17 PM
Try the 'iptables -F' trick; btw, what kernel are you using? Describe your exact steps a little more, that post is more of an outline. Yes, the stock iptables is a binary file. If you can't get console messages, what does your 'kernel' log look like; it's in the 9th partition (/var) log directory.You will cause a reboot loop if you screw up /bin/iptables. It's best to verify that the script runs without error before you attempt to boot the tivo with it.

bigphil1
12-24-2007, 03:50 PM
Try the 'iptables -F' trick; btw, what kernel are you using? Describe your exact steps a little more, that post is more of an outline. Yes, the stock iptables is a binary file. If you can't get console messages, what does your 'kernel' log look like; it's in the 9th partition (/var) log directory.

I will try to describe the steps I took as best I can. I was up to 5am on this so things got a little unclear at some point.

1.Booted up using the Mfslive cd
2.Backed up the entire S3 tivo drive with a 'backup' command to a fat32 drive
3.Used bootpage to determine i was using hda7 so I backed up the kernel using the dd command to backup sda6 to a fat32 drive
4.Rebooted using the PTV upgrade disk and ran the replace_initrd x86 version from NillaZilla on the file on my FAT32 drive.
I think I used the command "/dos/replace_initrd.x86 /dos/kernelbackup.krn /dos/null-linuxrc.img.gz /mnt/dos/original_kernel.bak"
5.Rebooted with the mfslive disk and used the DD command to copy the patched kernel file back to hda6
6.Attemped to copy Alphawolfs tivotools over using the cpio command but ran into trouble because it didn't recognize the -H flag.
7. I extracted tivotools on a pc, burned it to a cd, then mounted and copied the files to a tivobin directory on sda7
8. I then created a rc.sysinit.author file using joe using the exact commands in the above post that should start tnlited automatically. I used chmod 755 on it. I assume that rc.sysinit.author gets called automatically. Does it have to be referenced in rc.sysinit?
9.After realizing I could only ping the tivo, I tried renaming and creating a new iptables using the method in the previous post. This put it in a booting cycle, so i removed it and tried the method of using "[-x /etc/netfilter-disable] && /etc/netfilter-disable". This did not seem to have any effect.
The console cable I am using I do not believe is working properly since I can't get a console connection on my old dsr6000 either.

I will try the suggestions you just made in a little while. I will everyone know how it goes. Since I don't have console access for the moment any suggestion for verifying some of this while the drive is in the pc would be great.
Thanks

ScanMan
12-24-2007, 11:49 PM
I will try to describe the steps I took as best I can. I was up to 5am on this so things got a little unclear at some point.Ok, that would explain the typos; you refer to your hard drive as sda and then hda and also your replace_initrd command line uses /dos and then /mnt/dos. Assuming those were errors in translation, your steps look good in general. I would restore the stock iptables, insert the 'iptables -F' early in your rc.sysinit.author file and see what happens. Again you could mount the 9th partition of your tivo drive and look for /log/kernel and perhaps post it if unsuccessful.

bigphil1
12-25-2007, 12:46 AM
Ok, that would explain the typos; you refer to your hard drive as sda and then hda and also your replace_initrd command line uses /dos and then /mnt/dos. Assuming those were errors in translation, your steps look good in general. I would restore the stock iptables, insert the 'iptables -F' early in your rc.sysinit.author file and see what happens. Again you could mount the 9th partition of your tivo drive and look for /log/kernel and perhaps post it if unsuccessful.

The sda is how the mfslive linux build views the SATA drive. I made sure I used hda on any file that the tivo references such as the bootpage string. Also, I did use /dos instead of /mount/dos as the mount point and for the actual commands I typed in, I believe.

I tried the 'iptables -F' command near the start of the rc.sysinit.author file prior to this last bootup but it didn't seem to disable anything. I can still ping, but cannot ftp or telnet. Hopefully this had no impact but when I booted the tivo to see if the iptables -F trick would work, I got the "installing a service update" message and then "preparing the service update - this may take up to any hour possibly longer" message. I haven't checked yet, but hopefully this didn't screw anything up.

The /log/kernel file on hda9(sda9) was empty and was zero bytes in length. It did however have a 832k log file in the same folder named 'Okernel'.

Is there any way to log the results/output of the tivo bootup so I can view it once I hook the drive back up to a PC? Perhaps there is an error message that would make the problem obvious.

ScanMan
12-25-2007, 11:08 AM
That iptables trick should work; I assume your rc.sysinit.author file has correct permissions (chmod 755). The only way to examine the tivo bootup process absent a serial cable is to look at the kernel or Okernel (old kernel) logs. You're probably going to need some console/log output to troubleshoot this further. Console output is invaluable as it provides real-time examination of the boot process; you might want to spend some time getting that serial cable working.

bigphil1
12-26-2007, 10:57 AM
That iptables trick should work; I assume your rc.sysinit.author file has correct permissions (chmod 755). The only way to examine the tivo bootup process absent a serial cable is to look at the kernel or Okernel (old kernel) logs. You're probably going to need some console/log output to troubleshoot this further. Console output is invaluable as it provides real-time examination of the boot process; you might want to spend some time getting that serial cable working.

As I suspected, tivo pushed an update while booting up to test the iptables -F trick. Bootpage -p now shows hda4.

I assume I can start from step 5 above and copy my already patched kernel file back to hda3 now instead?

bigphil1
12-27-2007, 11:12 PM
I finally did get telnet to work on the s3. I had to restore from a backup and start over to get everything to work though.

Here are the steps I followed. Since I was restoring from a backup, I did a 'restore -s 128 -zpi /dos/mybackup.bak /dev/sda and started from step 5b. Hopefully this will be useful to others that are having problems with this.

My S3 drive was sda - this is how the MFSlive linux build recognized it
My dos drive was hdb1
My cd-rom was hda

1.Booted up using the Mfslive cd
2.Mounted the dos fat32 drive using 'mount -t vfat /dev/hdb1 /dos'
3.Backed up the entire S3 tivo drive with the 'backup -f 9999 -6so /dos/mybackup.bak /dev/sda' command to the fat32 drive
4.Used bootpage to determine I was using hda7 so I backed up the kernel using the dd command to backup sda6 to the fat32 drive. The file should be 4096 Kb I believe.
5a.Rebooted using the PTV upgrade disk and ran the replace_initrd x86 version from NillaZilla on the file on my FAT32 drive. The command was "/dos/replace_initrd.x86 /dos/kernelbackup.krn /dos/null-linuxrc.img.gz /dos/original_kernel.bak"
5b.Rebooted with the mfslive disk and used the DD command to copy the patched kernel file back to hda6 using the command "dd if=/dos/hackedkernelsda6 of=/dev/sda6"
6.Mounted sda7 and created a rc.sysinit.author file using the joe editor. Then did chmod 755 rc.sysinit.author
My file was:
export PATH=$PATH:/tivo-bin
iptables -F

sleep 60
/bin/bash < /dev/ttyS1 &> /dev/ttyS1 &
tnlited 23 /bin/bash -login &
tivoftpd

7.I used the following bootpage command to prevent it from upgrading automatically.
bootpage -P "root=/dev/hda7 dsscon=true console=1,115200 upgradesoftware=false" -C /dev/sda
8.I unpacked Alphawolf's tivotools on a pc ,burned it to a cd, mounted it and copied the files to /tivo-bin on sda7. chmod 755 these also
9.I then umounted and shutdown

Other Notes
- I have not tested serial access as my serial cable appears to be broken. I have tested telnet and ftp successfully.
- When I restored from backup I started from step 5a but used the mfslive disk. Can someone with some expertise on this clarify why the PTV upgrade disk would be needed for this step?

Thanks again guys for all the help.

bigphil1
12-28-2007, 01:00 AM
I have completed 'the basics' of getting telnet and tivoftpd working on my S3. How do I get the tivoapp file patched to disable encryption? I am running 8.0.1c-01-2-648 currently and can find no tivo app patches for 8.x versions. Same for superpatch which shows 9.1 support.

According to this post, this should be pretty straightforward ???

http://www.dealdatabase.com/forum/showpost.php?p=291237&postcount=2

I guess this means I should try to force an upgrade to 9.1 then go through the whole process again?

ScanMan
12-28-2007, 10:06 AM
I have completed 'the basics' of getting telnet and tivoftpd working on my S3. How do I get the tivoapp file patched to disable encryption? I am running 8.0.1c-01-2-648 currently and can find no tivo app patches for 8.x versions. Same for superpatch which shows 9.1 support.You apply tivoapp patches either via an "echo/dd" command line or by running a 'superpatch.tcl' file which does a little more error checking, etc. Make sure you only apply patches specifically for your exact software version.

According to this post, this should be pretty straightforward ???
http://www.dealdatabase.com/forum/showpost.php?p=291237&postcount=2Basically, but you really don't have to pull the drive and start over. Check the link in my signature for an overview of a common 'manual upgrade' process performed via telnet.

I guess this means I should try to force an upgrade to 9.1 then go through the whole process again?If you don't take the upgrade, you'll eventually stop getting guide data and your paid-for features will stop working; with standalones these days, you can only go so long on an older software release.

bigphil1
12-28-2007, 02:49 PM
You apply tivoapp patches either via an "echo/dd" command line or by running a 'superpatch.tcl' file which does a little more error checking, etc. Make sure you only apply patches specifically for your exact software version.

Basically, but you really don't have to pull the drive and start over. Check the link in my signature for an overview of a common 'manual upgrade' process performed via telnet.

If you don't take the upgrade, you'll eventually stop getting guide data and your paid-for features will stop working; with standalones these days, you can only go so long on an older software release.

Thanks ScanMan. Unfortunately, I didn't catch this message before I started over.

The exact steps I followed to try to hack 9.2:

I telneted to the tivo and removed the 'upgradesoftware=false' from the bootpage line. After confirming in the info page on the tivo I was at 9.2a-01-2-648 I pulled the drive and hooked it back up to a pc.

1.Booted up using the Mfslive cd. I confirmed that active partition was now hda4
2.Mounted the dos fat32 drive using 'mount -t vfat /dev/hdb1 /dos'
3.Backed up the entire S3 tivo drive at 9.2 with the 'backup -f 9999 -6so /dos/9.2backup.img /dev/sda' command to the fat32 drive
4. Used the DD command to copy the patched kernel file to hda 3 and hda6 using the commands "dd if=/dos/hackedkernelsda6 of=/dev/sda3" "dd if=/dos/hackedkernelsda6 of=/dev/sda6" --- hackedkernelsda6 was the same kernel I got working on 8.0.1.
5.Mounted sda4 and sda7 and copied the existing working rc.sysinit.author file from sda7 to sda4 and confirmed it was executable.

My file was:
export PATH=$PATH:/tivo-bin
iptables -F

sleep 60
/bin/bash < /dev/ttyS1 &> /dev/ttyS1 &
tnlited 23 /bin/bash -login &
tivoftpd
7.I used the following bootpage command again to prevent it from upgrading automatically.
bootpage -P "root=/dev/hda4 dsscon=true console=1,115200 upgradesoftware=false" -C /dev/sda
8.I copied the Alphawolf tivotools files from sda7 to a newly created /tivo-bin on sda4
9.Did 'backup -f 9999 -6so /dos/9.2hackedbackup.img /dev/sda' again to
backup my image
9.I then umounted and shutdown

The tivo boots now but is not pingable. When I navigate to network setup on the tivo, it does not even recognize that a nic is installed. It asked me to plug in a usb nic card.

The only thing I can think of is that the hacked kernel that works on a 8.0.2 tivo doesn't support networking on a 9.2 tivo. Is that what is happening? Should I try using one of these kernels?

http://dealdatabase.com/forum/showpost.php?p=279214&postcount=1

Has anyone had any success with them on an s3?

ScanMan
12-28-2007, 04:13 PM
The tivo boots now but is not pingable. When I navigate to network setup on the tivo, it does not even recognize that a nic is installed. It asked me to plug in a usb nic card.

The only thing I can think of is that the hacked kernel that works on a 8.0.2 tivo doesn't support networking on a 9.2 tivo. Is that what is happening? Should I try using one of these kernels?

http://dealdatabase.com/forum/showpost.php?p=279214&postcount=1

Has anyone had any success with them on an s3?What type of NIC are you using? I'm assuming wireless since you're not using the built-in ethernet port. If you're using wireless you're better off using a stock kernel with initrd replaced. The custom kernels might not play well with wireless NIC drivers. It looks like you're going to have to re-image the 9.2a backup and the re-run replace_initrd on the 9.2a kernel; then hack away. There is a way to extract a stock kernel from MFS but you need serial or telnet access; it's not a bad idea to backup the new stock kernel before you blow it away.

bigphil1
12-28-2007, 05:38 PM
What type of NIC are you using? I'm assuming wireless since you're not using the built-in ethernet port. If you're using wireless you're better off using a stock kernel with initrd replaced. The custom kernels might not play well with wireless NIC drivers. It looks like you're going to have to re-image the 9.2a backup and the re-run replace_initrd on the 9.2a kernel; then hack away. There is a way to extract a stock kernel from MFS but you need serial or telnet access; it's not a bad idea to backup the new stock kernel before you blow it away.

I am using the built-in nic. The problem is that the tivo no longer sees the built-in nic once I hack the kernel using 9.2a. I am restoring to my full backup of 9.2 and will then try to do replace initrd on that.

ScanMan
12-28-2007, 05:44 PM
I am using the built-in nic. The problem is that the tivo no longer sees the built-in nic once I hack the kernel using 9.2a. I am restoring to my full backup of 9.2 and will then try to do replace initrd on that.Oh, OK just semantics. In this case, I was considering NIC to mean an external dongle. Anyway, strange the 8.x kernel doesn't work. Best bet to proceed with replace_initrd on the 9.2a kernel.

bigphil1
12-28-2007, 09:16 PM
Oh, OK just semantics. In this case, I was considering NIC to mean an external dongle. Anyway, strange the 8.x kernel doesn't work. Best bet to proceed with replace_initrd on the 9.2a kernel.

Ok. I worked when I did everything from scratch using my backup 9.2a image. I used replace initrd on the 9.2 kernel and it seems to work fine now. I have telnet and enable access. I tried it this time using only the Mfslive cd and it worked fine. I don't think the step with using the PTVupgrade disk is necessary anymore. Perhaps the newest Mfslive cd has resolved whatever problems people were having with dd and replace_initrd.

bigphil1
12-29-2007, 08:38 AM
No longer relevant