PDA

View Full Version : I killed my rc.sysinit


markwilliams
04-28-2003, 12:18 AM
I posted a longer version of this in the Newbie forum thinking it was a "stupid question", and then decided it was a "stupid user"

So here's a shorter version:

First, I'm a Windows user. My PC runs Windows 2000 PRO with an NTFS partition due to the very large HD size. My Linux experience is limited to what I've learned through this forum to hack my unit.

About a year ago I added the Tivonet, Tivoweb, Tytool5, and the Alphawolf noscramble kernel patch to my Philips DSR 6000 to extract videos to burn onto DVD. I didn't use the 2.5Xtreme, or anything special. I didn't need any of the special feature and wanted to keep my unit basically as it came out of the box.
Finally I editted the rc.sysinit file using the JOE editor to automatically start up the TyTool5 and TivoWeb programs.
As a Windows user, this editting was not easy. (More later)

Then a few months ago, 3.1 got loaded on my unit, and blew all of that away. (one downside to not having the 2.5Xtreme I guess).

So I needed to redo all of my previous work. I re-installed the TivoNet software about a month ago, and applied the latest noscramble kernel patch from alphawolf. It is the one that begins dd if=/dev/hda3. Last week I installed the TyTool6 (as I read that it was designed for version 3.0 and up). Yesterday I added TivoWeb. Everything up to this point was working as it was befre.

Now all that remained was to edit the rc.sysinit so everything launched automatically whenever the system rebooted, like it was before the 3.1 upgrade.

That's when I believe I screwed up. I remembered from my last session that using the JOE editor was somewhat difficult. I'm used to graphical utilities, so I FTP'd the rc.sysint to my PC, made a copy using the Windows explorer, edited the file with Notepad, FTP'd it back. Then I CHMOD'd it to 755 from the BASH prompt via the telnet client and re-booted.

And now I get the "Welcome. Powering up.." and that's it.

I'm assuming that when I FTP'd the file over, I did it as an ASCII, not binary and that screwed up the file, and/or when I put it back that did it. Or possibly from the threads I've seen, I didn't
do the mounting and remounting of the partition, and that screwed it up. or both, or something else, Notepad?

So now I need to know how to get the system to at least come up normally. If I have to reinstall TivoNet so be it. Everything else should still be there in my /var/hack folder. Other than getting the unit back up, I don't want to lose all of the shows already stored on the unit, nor the kernal patch. I've got about 20 shows on the unit I still need to extract.

I don't have a backup of the Tivo HD, as the backup tools I tried to use the first time I did all this work a year ago wanted to copy everything to a FAT partition, and my PC uses an NTFS partition.

I can put the Tivo HD into a PC, and use a bootable CD to work on the drive, similar to what the Tivonet install does.
I was thinking I could put the backup copy of the rc.sysinit I have onto a floppy, but after that, I don't know how to get it onto the HD. And is it damaged by being FTP'd to the Windows PC?
Better yet, does someone have a virgin rc.sysyinit (non-Xtreme).
What I'd really appreciate is advice/steps on what tools to use, bootable CD image recommended, and how get the rc.sysinit onto the drive, setup right, and partitions mounted right.

blahman
04-28-2003, 01:04 PM
Actually your problem most likely has nothing to do with the FTP process:


edited the file with Notepad


notepad munged the linefeed/carriage returns to a non-unix format.

You can try the following util to fix the file and then copy that to the HD after you have mounted it in the PC.

DOS2UNIX (http://pvrhack.sonnik.com/tivo/DOS2UNIX ) Utility for converting text files from DOS format to UNIX/Linux compatible files; recommended for files edited in textpad (file name is UDDU.zip in the Downloads section)

To mount the Floppy drive:

mkdir /mnt/df
mount -t vfat /dev/fd0 /mnt/df

then just cp the files to the tivo

cp /mnt/df/rc.sysinit /etc/rc.d

This assumes I got the linux commands correct.

markwilliams
04-28-2003, 02:42 PM
Thanks for your suggestion.

That appears to help fix the file, but how do I get to the point that I can copy the file over? Remember, the system doesn't boot up. I realize I'll need to put the drive into a PC, and I'll have to have some sort of Linux Booting CD, but which one and what commands would I be entering to get to the point where I can copy the floppy file over? And I'm going to have to do mount read-write and read-only command to the drive as well, right?

So I guess what I need, in addtion to what you already given me, is everything from beginning to end.

Robert S
05-06-2003, 01:57 PM
He's assuming you're booting a TiVo boot disk. Any byte-swapping disk would do fine (Dylan or TiVoMad's boot floppies or Kazymyr's CD, MFS Tools 2.0 would make things difficult). Remember to unlock the drive if it's the original Quantum hard drive.

When the disk boots you'll see it print out the TiVo's partition table and you'll be able to mount the TiVo system partitions.

Because the TiVo boot disks boot to a RAM disk, once you get a command prompt the boot floppy won't be accessed again and you can replace it with the floppy with DOS2UNIX on it (I assume you run it from this environment to repair the script and then the TiVo will boot).

You should have FTP'd in ASCII mode in both directions, but Notepad does strange things to text files.