PDA

View Full Version : Hacking TivoHD with 2TB



Soapm
10-16-2011, 03:06 PM
I didn't know if I should ask in the existing thread or not so to be safe I started a new thread.


If anyone is interested, here is the script so far. For any neophytes, it rather demonstrates the basic requirements for hacking a prom-modded Series III class TiVo. Forgive the very pedestrian approach to scripting.


#!/bin/bash

tvalid=1
# Scan for TiVo partitions
for dspec in /dev/sd?;
do
# Check the target is a hard drive then Attempt to load the drive partitions
# Change the "disk" string if Linux thinks the drive is not a hard drive
ls -l $dspec | grep -q disk
if [ $? -eq 0 ];
then
echo $dspec
if test -b $dspec"10";
then
echo Tenth partition found for $dspec"10"
tvalid=0
break;
else
/hack/tivopart r $dspec 1> /dev/null 2>&1
if [ $? -eq 0 ];
then
tvalid=0
break;
fi;
fi;
fi;
done

if [ $tvalid -eq 1 ];
then
echo Valid TiVo Drive not found. Exiting.
exit 1;
fi
echo
# Get the active root partition using bootpage (assumes root=/dev/hdaX is the first parameter).
root=$( /hack/bootpage -p $dspec | cut -d" " -f1 )

# Get the active kernel partition using bootpage
kerndrv=$dspec$( /hack/bootpage -b $dspec )

tivo_type=$( dd if=$dspec"10" bs=8 count=1 | hexdump | grep 0000000 | cut -d" " -f4 )
case $tivo_type in
baab) # S3 TiVo
tivo_type=32
;;
baeb) # Tivo_HD
tivo_type=64
;;
esac
echo MFS file system is $tivo_type bits
echo
# Use the name of the root partition on the TiVo to set the name of the root partition on the PC
rootdrv=$dspec${root##*hda}

vardrv=${dspec}9
dstring=`date +%m-%d-%y`

# Display the active partitions and pause for 5 seconds.
echo Boot = $kerndrv
echo Root = $rootdrv
echo /var = $vardrv
echo
tvar=5
until [ $tvar -lt 1 ];
do
echo -ne " "$tvar "\r"
sleep 1
tvar=$[ $tvar - 1 ];
done
if ! [[ -s /hack/null-linuxrc.img.gz ]];
then
echo "Null initrd not found. This hack will not work without all the correct files in /hack."
exit 1
fi

echo " "
echo
echo Mounting Drives...
test -d /tivo || mkdir /tivo
mount | grep $rootdrv || mount $rootdrv /tivo
mount | grep $vardrv || mount $vardrv /tivo/var

sver=`cat /tivo/etc/build-version`
sver=${sver##*\ }

echo Writing new Kernel...
test -d /hack/Saved_Kernels/ || mkdir /hack/Saved_Kernels/
/hack/replace_initrd.x86 $kerndrv /hack/null-linuxrc.img.gz /hack/Saved_Kernels/"$sver"_Kernel:$dstring

echo
echo Replacing IP Tables Function
cd /tivo/sbin
cp iptables iptables.sav.$dstring
echo
tvar=5
until [ $tvar -lt 1 ];
do
echo -ne " "$tvar "\r"
sleep 1
tvar=$[ $tvar - 1 ];
done

echo Copying Files...
echo Copying tivohacks$tivo_type...
sleep 2
cd /tivo
tar -xvf /hack/tivohacks$tivo_type.tar
echo
echo Writing new tivoapp
/hack/hack_tivoapp

I don't have a Linux machine so I plan to insert these scripts along with Jamies custom kernels and other files in the root of the mfslive boot CD, mount the CD and run them from there. Do you think that would work?

What changes would I need to make to the script to have it insert James customer (Gen06) kernel along with "bcmenet.o" (into both places) instead of compromising the stock kernel? I'm not worried about backing up the stock kernel since I have the stock drive as backup.

I also have a rc.sysinit.author file I plan to insert that already has the entries. How do I change the script to have it copied over?

Will this script copy over tivoftpd and Alpha Wolf's All-in-one utilities and if so what do I name them and where do I place them on the boot cd?

Is there another script made somewhere that would better work in my situation?

Lastly, how do I save the script onto the CD and make it executable?

Bootpage -p /dev/hdc says my root = 4

My cdrom is hda and my tivo drive is hdc.

lrhorer
10-17-2011, 12:26 AM
I don't have a Linux machine so I plan to insert these scripts along with Jamies custom kernels and other files in the root of the mfslive boot CD, mount the CD and run them from there. Do you think that would work?
With modifications, it has been reported to do so, although not specifically with Jamie's kernel. There is no reason it should not work with Jamie's kernel, though. That said, have you ever modified a bootable .iso? It's not too terribly difficult if you have the right tools, but I wouldn't call it beginner level work. Beware using a USB => SATA or IDE => SATA adapter. In addition, the drive will possibly show up as /dev/hdx, rather than /dev/sdx, so you may need to change line 5 accordingly.


What changes would I need to make to the script to have it insert James customer (Gen06) kernel along with "bcmenet.o" (into both places) instead of compromising the stock kernel? I'm not worried about backing up the stock kernel since I have the stock drive as backup.
Well, look at the following area of the script:


echo Writing new Kernel...
test -d /hack/Saved_Kernels/ || mkdir /hack/Saved_Kernels/
/hack/replace_initrd.x86 $kerndrv /hack/null-linuxrc.img.gz /hack/Saved_Kernels/"$sver"_Kernel:$dstring
Instead of running replace_initrd.x86, use `dd` to copy Jamie's kernel to $kerndrv. Simply copy over bcmenet.o to ~/lib/modules/ using `cp`. If you are modifying the script, that would be

echo Writing new Kernel...
dd if=vmlinux-Gen06-netopt-ext3.px of=$kerndrv
cp /hack/bcmenet.o /tivo/lib/modules/


I also have a rc.sysinit.author file I plan to insert that already has the entries. How do I change the script to have it copied over?
The script uses a tarball to copy all the pertinent regular files over to the TiVo. This includes /etc/rc.d/rc.sysinit.author. You can, if you choose, untar the tarball to a convenient directory, replace ~/etc/rc.d/rc.sysinit.author, and then tar the directory structure back into a tarball. Take care to perform the tar operation from the ~/ directory. On my TiVo upgrade system, I simply use /tivo, which is where the script mounts the root of the TiVo drive. Mounting the TiVo drive there hides anything in the directory until the TiVo drive is umounted again. As an alternative, you could leave the tarball alone, and then copy your file over the one provided by the tarball. Make sure you do it *AFTER* the tarball is copied, though, or your file will get overwritten.


Will this script copy over tivoftpd and Alpha Wolf's All-in-one utilities
Any utilities you like can be included in the tarball, or you can copy them externally as you see fit. As it happens, tivoftpd is included in my sample tarballs.


and if so what do I name them and where do I place them on the boot cd?
Anything you want and anywhere you want. The script assumes everything to be transferred is in /hack.


Is there another script made somewhere that would better work in my situation?
There are other scripts / utilities. Whether they are more suitable to your purpose is something you will need to decide. Using a variation of the scripts I posted, I was able to hack a TiVo in a matter of 2 or 3 minutes or less. I found making changes to the platform easy and straightforward. Because the platform was an ordinary OS boot on a production PC, any changes I made would always be there for the next boot, and getting the system up and running only took a matter of a minute or two. I also found it invaluable to have access to the internet and a web browser handy during upgrades. I would simply highlight the hacks posted by other members of the forum, paste it into the hacks.fil file, and run the main script. Forty-five seconds later, the Tivo would be hacked.


Lastly, how do I save the script onto the CD and make it executable?
See above. If you don't have the tools to edit a .iso file, you will need to obtain them and learn to use them. Frankly, I consider it easier (and quicker) all the way around to simply set up some free room on a hard drive on a Windows or Linux machine, load a Linux Distro (I like Debian), and go from there.

To make a file executable, all you need to do is type


chmod a+x <filename>

Note this will not work if the file is on a CD. You will either need to have a .iso utility that understands linux files, or else you will need to copy over the files you need to change to a read-write target. IF the latter, it will have to be done every time a TiVo is hacked.


Bootpage -p /dev/hdc says my root = 4

My cdrom is hda and my tivo drive is hdc.
Yeah, see above. You would need to change line 5 from


for dspec in /dev/sd?;

to


for dspec in /dev/hd?;

(Actually, the ";" is not necessary in newer versions of bash.)

Soapm
10-17-2011, 12:32 AM
Thanks for the response... I have ultra iso that will let me instert files into the ISO without crippling its ability to boot.

I will need a few days to digest this...

Soapm
10-17-2011, 12:40 AM
By the way, I've been trying all day to manually copy over the kernel and I keep getting a "no file or directory exist error" or "dev/hdc3 isn't in the bin file???". I am using mfslive 1.3b since 1.4 give me some kind of ext4 upgrade error.

dd if=/cdrom/vmlinux-Gen06.px of=/dev/hdc3
dd if=/cdrom/vmlinux-Gen06.px of=/dev/hdc3 bs=1024 count=2048

I also can't mount /dev/hdc3 or mount /dev/hdc3 /mnt

but I can mfsinfo and pdisk hdc3 and it is there for sure. it just won't let me mount or write to it.

lrhorer
10-17-2011, 01:29 AM
By the way, I've been trying all day to manually copy over the kernel and I keep getting a "no file or directory exist error" or "dev/hdc3 isn't in the bin file???". I am using mfslive 1.3b since 1.4 give me some kind of ext4 upgrade error.]


dd if=/cdrom/vmlinux-Gen06.px of=/dev/hdc3
dd if=/cdrom/vmlinux-Gen06.px of=/dev/hdc3 bs=1024 count=2048
Type

ls -l /dev/hd*

and post the results. Also, does /cdrom/vmlinux-Gen06.px exist?


I also can't mount /dev/hdc3 or mount /dev/hdc3 /mnt
That won't ever work (assuming /dev/hdc3 is your boot partition). The boot partition does not contain a file system.

What is the output of

`bootpage -b /dev/hdc`

and

`pdisk -l /dev/hdc`


but I can mfsinfo and pdisk hdc3 and it is there for sure. it just won't let me mount or write to it.
You won't ever be able to mount the partition or write to it using userspace tools. Dd operates at the bit level, so it can read or write anything recognized as a valid Linux file, including a device file.

Soapm
10-17-2011, 09:35 PM
Type ls -l /dev/hd* and post the results.

I will post when I think you want since this gives me several screens of information. If you want more let me know but I am a 2 finger typer but appreciative of the help.

hda 1, 10-16, then 2-9
hdb through hdh the same as above.


Also, does /cdrom/vmlinux-Gen06.px exist?

Yes, I copied it along with other files I plan to insert to the root of the mfslive boot cd



That won't ever work (assuming /dev/hdc3 is your boot partition). The boot partition does not contain a file system.

Then I confirmed it doesn't work :)


What is the output of `bootpage -b /dev/hdc`

3


`pdisk -l /dev/hdc`

1 apple partition map
2 Image bootstrap 1
3 image kernel 1
4 ext2 root 1
5 image bootstrap 2
6 image kernel 2
7 ext2 root 2
8 swap linux swap
9 ext2 var
10 mfs mfs application region
11 mfs mfs media region
12 mfs mfs application region 2
13 mfs mfs media region 2
14 apple free extra
15 mfs mfs media region 3


You won't ever be able to mount the partition or write to it using userspace tools. Dd operates at the bit level, so it can read or write anything recognized as a valid Linux file, including a device file.

So if I understand DD should work even if CP doesn't??? So I will have to DD everything over if I can figure out the right command.

Thanks...

Soapm
10-17-2011, 10:39 PM
I think I got Jamies kernel in. I first copied to the /var of the ram drive them I dd it into partition 3. I got 1600 in and out so I think I did it.

Now to copy your tar ball into the root of HDC, mount hdc and untar the ball... progress feels good...

lrhorer
10-17-2011, 11:51 PM
I will post when I think you want since this gives me several screens of information. If you want more let me know but I am a 2 finger typer but appreciative of the help.

hda 1, 10-16, then 2-9
hdb through hdh the same as above.
Hmm. 'Looks like a pre-udev implementation with fixed device files. I'll need the full output to be sure, but that will probably break the script. If so, you either have to work around the issue by skipping /dev/hda, or arrange for your TiVo drive to be /dev/hda. (That's another advantage to using an ordinary boot, BTW, rather than a live CD. You can cut-and-paste and post the results online. You can also cut and paste from the web to the PC.


Yes, I copied it along with other files I plan to insert to the root of the mfslive boot cd
OK.


3
OK, so /dev/hdc3 is your boot (kernel) partition.


1 apple partition map
2 Image bootstrap 1
3 image kernel 1
4 ext2 root 1
5 image bootstrap 2
6 image kernel 2
7 ext2 root 2
8 swap linux swap
9 ext2 var
10 mfs mfs application region
11 mfs mfs media region
12 mfs mfs application region 2
13 mfs mfs media region 2
14 apple free extra
15 mfs mfs media region 3
Well, I really wanted to see the partition sizes and locations, but we'll table it, for now.


So if I understand DD should work even if CP doesn't???
That may not be the best way to look at it. Dd will copy raw binary data from one location to another. It should not be used to try to copy files to a file system.


So I will have to DD everything over if I can figure out the right command.
Again, that's not quite the right way to look at it. If you want to copy or move a bit-for-bit image (or part of one) from one place to another, then dd is a good candidate. For example, you can copy an entire drive bit-by-bit to another drive, or copy an entire partition from one drive to the other. In the case of Jamie's kernel, you are copying an exact image of the file (but not any of the file system attributes) to the /dev/hdc3 partition.

For everything but the kernel and the MFS regions (and maybe the swap), you are going to want to copy files to their appropriate locations on the file systems after mounting the partitions using ordinary file management tools like cp or mv.

Soapm
10-17-2011, 11:59 PM
I think I moved backwards now, I went to post the partition sizes and now pdisk is reporting "no valid block 1 on /dev/hdc"

I'm thinking I must have messed up the partition table trying to get the drive to mount. The rest seems fairly strait forward and easy if I can get the drive to mount. I think the problem has to do with the partition table created by jmfs since it's only recognized by jfms, premier and TivoHD tivo's...

That's it for tonight, frustrated and going to bed before I break something...

lrhorer
10-18-2011, 12:02 AM
I think I got Jamies kernel in. I first copied to the /var of the ram drive them I dd it into partition 3. I got 1600 in and out so I think I did it.
As long as your source and target were correct, and you got no errors, it should be good.


Now to copy your tar ball into the root of HDC, mount hdc and untar the ball... progress feels good...
You may not be able to do that. The stock TiVo root partition is none too big. It may not be able to hold the tarball and the extra files. There's no reason to copy the tarball to the TiVo root, though. As long as the file is available somewhere, just untar it from its present location. (Don't forget to mount both ~/ and ~/var, BTW.) So if your CD is /cdrom, you mount /dev/hdc4 to /tivo, and the tarball is in /cdrom, then the commands would look like:


cd /tivo
tar -xvf /cdrom/tivohacks64.tar

lrhorer
10-18-2011, 12:11 AM
I think I moved backwards now, I went to post the partition sizes and now pdisk is reporting "no valid block 1 on /dev/hdc"

I'm thinking I must have messed up the partition table trying to get the drive to mount.
Simply running `mount` won't do that. Did you try to run tivopart or run the script (which runs tivopart)? I'm not sure what effect that would have on a TiVo-aware kernel.


I think the problem has to do with the partition table created by jmfs since it's only recognized by jfms, premier and TivoHD tivo's...
I don't think so, although anything is possible, I suppose. The fact the system recognizes the partitions in the first place suggests not, plus partitions 1 - 9 shouldn't be any different.

Soapm
10-18-2011, 12:56 AM
Yes, I typed in the tivopart command but I think it said it wasn't recognized. The drive doesn't work at all so I will have to begin with jfms again but no big deal, we live and learn.

lrhorer
10-18-2011, 12:59 AM
Yes, I typed in the tivopart command but I think it said it wasn't recognized. The drive doesn't work at all so I will have to begin with jfms again but no big deal, we live and learn.
The live CD you are using has a kernel that recognizes Apple partitions without the need for tivopart.

Soapm
10-18-2011, 01:09 AM
The live CD you are using has a kernel that recognizes Apple partitions without the need for tivopart.

Oh, that's why it's so confusing with so much old information left on the web with no designation for what it works for and who shouldn't do it. So you see a command and out of desperation you give it a shot with the hopes that it will be the missing link and success is on the other side. Instead I found the door that led to a cliff and I quickly opened her up and stepped on through...

The first step wasn't as painful as the sudden stop at the bottom...

Soapm
10-19-2011, 01:50 AM
I came home determined today and I believe I came to some solid conclusions...

TivoHD/Premier have a different partition table than the other Tivo's (duh). And, the tools used for other Tivo's don't work well with the HD/Premier partitions. Some tools kind of work but they fail when it comes to accessing the drive.

When I pdisk, fdisk, cat, dd the HD image created by jfms I get block 14 and drive doesn't exist or the partitions isn't valid errors. This is both with mfslive and PTV.

However, If I load the HD drive with WinMFS then all the above work just fine. The problem with this is I ended up with reboots every 20 minutes once the drive got over 300 gigs full (began using the 1.7T partition).

My conclusion, the reason I can't hack my drive is because the tools used to hack the drive don't appear to work on the jfms created image. I even tried puffdaddy tools from http://www.dealdatabase.com/forum/showthread.php?63369-Extending-MFS-Tools-For-the-TiVo-Premiere-%28Support-Thread%29&p=308364. No go on the jfms created image.

So I tried using knoppix thinking I would be more in a linux environment. It would see the jfms created drive but couldn't mount it. I ran tivopart within knoppix and no dice, still wouldn't recognize the drive. Of course if I load the image using WinMFS then I get the expected results.

If I can just figure out a way to dd in Jamies kernel and the author file I could at least begin working from the Tivo itself. The question then becomes will busybox or wolfs all in one work with this foreign set of partitions...

I am considering using the 1TB drive from my S2DT knowing that a WinMFS created image will work fine so I should be able to get her up and running. I just really had my heart set on having a 2TB TivoHD but I guess my skills will have to greatly improve before I can leap that fence...

My next attempt will be creating a drive using [URL="puffdaddy" http://www.dealdatabase.com/forum/showthread.php?63369-Extending-MFS-Tools-For-the-TiVo-Premiere-%28Support-Thread%29&p=308364[/url] tools to create the image and try jfms to expand it out. I don't know about all that deleting partitions and stuff but hopefully that was optional and not required. I figure using his tools would allow me to hack the drive then I can begin filling her up and see what happens.

lrhorer
10-19-2011, 03:28 AM
I came home determined today and I believe I came to some solid conclusions...

TivoHD/Premier have a different partition table than the other Tivo's (duh).
I can't speak from experience on the Premier. Maybe Jamie or Omikron can chime in a bit more on that platform, but it is definitely not true of the TiVoHD. I don't think it is true of the Premier.


And, the tools used for other Tivo's don't work well with the HD/Premier partitions.
Again, I can't speak to the Premier, but I guarantee that is not the case with the THD. That is not to say those platforms (or even the S3) cannot make use of a scheme that is not supported under the traditional tools. Indeed, we know for a fact this is not the case, since the S3 - unhacked - can support a 2T drive, which is not possible with traditional tools. A hacked S3 can make use of a 2T drive using traditional tools, as well.


Some tools kind of work but they fail when it comes to accessing the drive.
I guarantee you that a stock THD drive, or one expanded by WinMFS or MFS_Tools can be accessed by a PC running Linux. MFS_Live should work, and has been reported to do so, but I cannot confirm personally that it works on anything other than an S3 with a stock drive, because I have never used it on anything else.


When I pdisk, fdisk, cat, dd the HD image created by jfms I get block 14 and drive doesn't exist or the partitions isn't valid errors. This is both with mfslive and PTV.
I don't know the details of what jmfs does, but a guess would be it converts the 32 bit Apple partition map into a 64 bit map. This would certainly explain the issues you are seeing. I suggest you not start with a partition map modified by jmfs. Perform your hacks first and get them all working, then try jmfs. That should work. An even better choice may be WinMFS. With a hacked kernel, it can create partitions larger than 1T


However, If I load the HD drive with WinMFS then all the above work just fine.
WinMFS does not load the drive. It merely reads the partition map and copies over the structure of each partition. It doesn't have to be able to read the contents.


The problem with this is I ended up with reboots every 20 minutes once the drive got over 300 gigs full (began using the 1.7T partition).
That makes sense.


So I tried using knoppix thinking I would be more in a linux environment.
What kernel version? Is this another live CD?


If I can just figure out a way to dd in Jamies kernel and the author file I could at least begin working from the Tivo itself. The question then becomes will busybox or wolfs all in one work with this foreign set of partitions...
Again, I suggest you try might try hacking an ordinary TiVo drive and get that working, then apply the jmfs upgrade. Unless jmfs inserts its own kernel (very unlikely), then your hacks should still work. A better solution, I think, is to use Jamie's hack that allows partitions larger than 1.1T. Then you can just use WinMFS to expand the drive. Either way, hack first, then expand.


I am considering using the 1TB drive from my S2DT knowing that a WinMFS created image will work fine so I should be able to get her up and running. I just really had my heart set on having a 2TB TivoHD but I guess my skills will have to greatly improve before I can leap that fence...
Not so much, really. I do suggest, however, that before you go too much further you consider whether you want to implement mike_s' scripted upgrades methods. Not only does his method allow for in-situ upgrades, but it also allows an easy recovery if /var gets wiped, which can happen from time to time. It also allows for a larger / and /var, making space for more applications and for backup files. Before attempting to implement his partition changes, I would say it is just about mandatory to use a regular Linux boot. I highly recommend it in any case, but trying to hand copy and update a partition map without dual windows (one showing the existing map and the other creating the map) would be an exercise in total frustration. It's not that creating a partition using pdisk is difficult, but errors are extremely easy, and without the ability to cut-and-paste... well, I certainly would not like to try transcribing all those long strings of numbers with no commas by hand. I made enough mistakes even with cut-and-paste.


My next attempt will be creating a drive using [URL="puffdaddy" http://www.dealdatabase.com/forum/showthread.php?63369-Extending-MFS-Tools-For-the-TiVo-Premiere-%28Support-Thread%29&p=308364[/url] tools to create the image and try jfms to expand it out. I don't know about all that deleting partitions and stuff but hopefully that was optional and not required. I figure using his tools would allow me to hack the drive then I can begin filling her up and see what happens.
OK, you are asking my advice, so I will give it again. I think you are headed in the wrong direction. I suggest you create a small Linux boot. I like Debian, but Ubuntu will work, and so should any other Linux distro with a 2.6.26 kernel or newer. Take a stock TiVo image and either work from it or else create a new partition map by hand using pdisk. Doing so, you can create a partition map that looks something like this:


HD_LivingRoom:/# pdisk -l /dev/hda

stat: mode = 060660, type=Block
size = 0, blocks = 0
HDIO_GETGEO: heads=255, sectors=63, cylinders=51329, start=0, total=824600385
Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1 ( 31.5K)
2: Ext2 Hack 1 524288 @ 64 ( 256.0M)
3: Image Kernel 1 8192 @ 524352 ( 4.0M)
4: Ext2 Root 1 524288 @ 532544 ( 256.0M)
5: Ext2 Hack 2 524288 @ 1056832 ( 256.0M)
6: Image Kernel 2 8192 @ 1581120 ( 4.0M)
7: Ext2 Root 2 524288 @ 1589312 ( 256.0M)
8: Swap Linux Swap 262144 @ 2113600 ( 128.0M)
9: Ext2 /var 524288 @ 2375744 ( 256.0M)
10: MFS MFS application region 589824 @ 2900032 ( 288.0M)
11: MFS MFS media region 216747008 @ 3489856 ( 103.3G)
12: MFS Second MFS application region 589824 @ 220236864 ( 288.0M)
13: MFS Second MFS media region 268617728 @ 220826688 ( 128.0G)
14: MFS Third MFS applicatioon region 4096 @ 489444416 ( 2.0M)
15: MFS Third MFS media region 1465144320 @ 489448512 ( 698.6G)
16: Apple_Free Extra 975684336 @ 1954592832 ( 465.2G)

minus partitions 14 and 15, and of course with much more free. Note the increased sizes for partitions 2, 4, 5, 7, and 9. You can insert Jamie's kernel into both partitions 3 and 6 using dd. After creating the file systems on partitions 2, 4, 5, 7 , and 9 using mkfs, you can mount them and copy all the same data into partitions 4 and 7 to allow for easy recovery during the process using cp. If you decide to go this route - it really isn't difficult - we can guide you with help on the syntax. I might be available this weekend for phone support.

In either case, once you have all the hacks working, then you can try applying WinMFS or jmfs to expand. If you have a somewhat smaller drive - say 300G - you can get all the hacks onto it and then expand to a 2T drive using one of the expansion tools.

By the way, here is the partition map of my TiVoHD:


TiVo_HD:/# pdisk -l /dev/hda

stat: mode = 060660, type=Block
size = 0, blocks = 0
HDIO_GETGEO: heads=255, sectors=63, cylinders=56065, start=0, total=900684225
Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1 ( 31.5K)
2: Ext2 Hack 1 524288 @ 64 ( 256.0M)
3: Image Kernel 1 8192 @ 524352 ( 4.0M)
4: Ext2 Root 1 524288 @ 532544 ( 256.0M)
5: Ext2 Hack 2 524288 @ 1056832 ( 256.0M)
6: Image Kernel 2 8192 @ 1581120 ( 4.0M)
7: Ext2 Root 2 524288 @ 1589312 ( 256.0M)
8: Swap Linux swap 262144 @ 2113600 ( 128.0M)
9: Ext2 /var 524288 @ 2375744 ( 256.0M)
10: MFS MFS application region 589824 @ 2900032 ( 288.0M)
11: MFS MFS media region 137630712 @ 3489856 ( 65.6G)
12: MFS MFS application region 2 589824 @ 141120568 ( 288.0M)
13: MFS MFS media region 2 171919990 @ 141710392 ( 81.9G)
14: MFS MFS App by Winmfs 2048 @ 313630382 ( 1.0M)
15: MFS MFS Expanded by Winmfs 1639874560 @ 313632430 ( 781.9G)

Soapm
10-19-2011, 07:28 PM
I have a 6 GIG drive I found. Will this work for Debian or Ubuntu? I'll have to find a place to down load it and I'm sure there will be some learning after install...

Wow this is fun!!!

PS... Where are mikes scripts? Is that where I got the code in the first post? All these threads mesh as one big blur after awhile...

lrhorer
10-19-2011, 09:45 PM
I have a 6 GIG drive I found. Will this work for Debian or Ubuntu?
That's pretty thin, but if you load only the Gnome desktop and no extras, I think it would work.


I'll have to find a place to down load it
I'm not sure what you mean by that. Assuming you have a decent broadband connection, go to the Debian netinst web page (http://www.debian.org/distrib/netinst), and download whichever .iso file suits your taste. Burn the .iso to a CD, insert it into the system you will be using, and boot the system. (Make sure it is connected to the internet.) Answer the questions as they come up, and when it asks for what features / packages you want pre-installed, only leave the Desktop Environment checked. Depending on your broadband connection speed, it will take something between about 30 minutes and 2 hours to complete the install. There will be a handful of questions asked during the install, but you can answer each group and then walk away for a while, coming back from time to time to answer the next batch of questions. Most of the questions can be answered with the default. Ask here if something puzzles you. When done, the system should boot into Linux with no real errors. You should have a default web browser (probably epiphany). With that, you can download all the files from this website. I suggest you open a console window as root and type

apt-get install vim


and I'm sure there will be some learning after install...
Not much, really. Not for what you are trying to accomplish.


Wow this is fun!!!
I'm glad you think so. If you are having fun right now, then I expect you will have few problems with Linux.


PS... Where are mikes scripts? Is that where I got the code in the first post?
No, that is the first of two scripts I submitted in post #39 of the "Overview of Hacking an S3" thread. His thread is here (http://www.dealdatabase.com/forum/showthread.php?62603-Scripted-upgrades). Note I do not recommend you try to employ his methods from the outset. That would probably be too frustrating and confusing for you. I do, however, recommend you consider whether you want to at some point employ his methods. If you decide it is a good possibility, then you can create the partitions so you can do it at a later time.

Soapm
10-20-2011, 02:14 AM
I got Ubuntu loaded but it freezes all the time. I've had to reload it about 5 times now and no matter what I do from opening the browser to attaching the Tivo drive and it freezes. After it freezes I no loger get the bar on the right and the mouse doesn't work so I reload it.

I went to load Debian but looks like it has to be compiled. I don't know anything about compiling software and I need this to work for all of 15 minutes. Just long enough to load the kernel and files onto the Tivo drive and that's it.

lrhorer
10-20-2011, 03:06 AM
I got Ubuntu loaded but it freezes all the time. I've had to reload it about 5 times now and no matter what I do from opening the browser to attaching the Tivo drive and it freezes. After it freezes I no loger get the bar on the right and the mouse doesn't work so I reload it.
That drive may be too small. I think Ubuntu includes a lot of bells and whistles by default.


I went to load Debian but looks like it has to be compiled. I don't know anything about compiling software and I need this to work for all of 15 minutes. Just long enough to load the kernel and files onto the Tivo drive and that's it.
No, I don't know where you get that idea. All you have to do is select the correct platform to download (x86 for Intel or AMD for AMD), burn the .iso. and load the software. If any of the packages require a compile, it is done automatically and transparently to the user. Nothing is required of the user other than selecting the default options for just about everything but the root password and the user name and password for an admin user, plus selecting the default package groups to install. You downloaded the netinst for "Squeeze" (the current stable version), right? I haev a stripped down Debian system at my sister's house, and it takes 4.1G, but it started out somewhat larger.

BTW, one does not compile the whole OS in anycase. Compilig a package from source is pretty trivial, but unnecessary for a basic install in any case. Unless one has very special and specific needs, compiling the kernel is pretty much a thing of the distant past, in any case. With only a very few special exceptions, the default kernel compilation is fine for booting and almost everyting else can be loaded as a module. I haven't compiled a kernel in years,a nd it has been well over a year since I compiled any package from source, except for software I've written myself.

Soapm
10-20-2011, 10:31 AM
BTW, one does not compile the whole OS in anycase. Compilig a package from source is pretty trivial, but unnecessary for a basic install in any case. Unless one has very special and specific needs, compiling the kernel is pretty much a thing of the distant past, in any case. With only a very few special exceptions, the default kernel compilation is fine for booting and almost everyting else can be loaded as a module. I haven't compiled a kernel in years,a nd it has been well over a year since I compiled any package from source, except for software I've written myself.

Sorry, I thought you had to compile it because I couldn't think of anything else you would do with 52 image files. http://cdimage.debian.org/debian-cd/6.0.3/i386/iso-cd/ Kind of intimidating to a novice at first glance.

I later stumbled across this page http://www.debian.org/CD/netinst/ which made more sense out of what I was seeing. I loaded it and so far it doesn't mount or recognize the drive either. I am now starting to suspect the image someone shared which restores via WinMFS. I am now getting invalid partition and block 14 errors even when freshly restored via WinMFS. I'm going to go begging for a different TivoHD image just to see if it makes a difference. From what I am reading and your very helpful responses there is no reason for all the trouble I am having getting this image to mount.

Of course, the problem could always be between the chair and the keyboard...

Soapm
10-20-2011, 02:36 PM
You have to be kidding. This is frustrating as hell. I loaded debian but I can hardly see the screen because the picture is all jittery. I go to NVidia and downloaded the driver and have spent 3 hours now trying to install it. You have to be kidding me. All I see on the net is I need to use yast. No one seems to ever explain what yast is, where do I get yast, is it already on the system, WTF!!!

I cant believe people who use Linnux go through this just to install a driver. Installing this driver is the first thing I've attempted since install since I can't really see the screen.

Can some please help???

Soapm
10-20-2011, 04:08 PM
Wow I can't believe this experience I am having.

I think I found YaST but can't install it because it says it's not trusted (important to have but not trusted. go figure).
so to fix that I found I had to run sudo
that won't run because I'm not listed as a member
tried to add myself as a member but I can't figure out how to save the file.

And all I want is to load a video driver because the screen is flickering so that I can hardly see it. Can someone please tell me there is a much easier way??? PLEASEEE someone point me to the light... This can't be the correct process just to load a video driver...

lrhorer
10-20-2011, 04:31 PM
Sorry, I thought you had to compile it because I couldn't think of anything else you would do with 52 image files. http://cdimage.debian.org/debian-cd/6.0.3/i386/iso-cd/ Kind of intimidating to a novice at first glance.
No, that is the total distribution, including some 30,000+ free applications available to every user of the distro. Of course, most people don;t use anywhere nearly that many applications. I'm only using 29,999. ;)
The distro in all its glory fits on 52 CDs or (IIRC) 8 DVDs. Most people don't worry with the entire distribution unless the PC won't have reliable broadband access. All of the applications in the distro (plus many more that are non-free or in individual downloads) are available using apt-get or one of the apt frontends like Synaptic.


I later stumbled across this page http://www.debian.org/CD/netinst/ which made more sense out of what I was seeing.
That's the link I provided just above.


I loaded it and so far it doesn't mount or recognize the drive either.
I presume you mean after running `tivopart r /dev/sdX`? I also presume you are not tring to mount the drive, correct? A raw drive can be mounted, but not a partitioned one. If the drive is partitioned, then you have to mount its partitions. In this case, one or more of /dev/sdX2, 4, 5, 7, or 9.


I am now starting to suspect the image someone shared which restores via WinMFS. I am now getting invalid partition and block 14 errors even when freshly restored via WinMFS.
You are getting this error when you try to mount one of the partitions, right?


I'm going to go begging for a different TivoHD image just to see if it makes a difference. From what I am reading and your very helpful responses there is no reason for all the trouble I am having getting this image to mount.
I have to go right now, but maybe I can help you via phone this evening.


Of course, the problem could always be between the chair and the keyboard...
That's always a possibility, but I suspect there may be something else going on here.

lrhorer
10-20-2011, 04:32 PM
Can some please help???
Yeah, but give me a few hours.

Soapm
10-20-2011, 04:45 PM
Thanks, I need to go blow off some steam because I'm one frustrated dude at this point.

This debian is incredibly tough to do anything on. I just want to load a video driver and I've been at it since 8 this morning. I couldn't run the tivopart for two reasons, 1. I can hardly see the screen and 2. I have no idea where to put it. And with this Sudo crap having everything locked down like a vault, I'm not sure I could run it even if I did know where it went. There should be a place I can turn off all this security just so I can get something done. I took today off work just to get this done and after an entire day I am still trying to see the screen...

thanks again...

Soapm
10-20-2011, 04:46 PM
Thanks, I need to go blow off some steam because I'm one frustrated dude at this point.

This debian is incredibly tough to do anything on. I just want to load a video driver and I've been at it since 8 this morning. I couldn't run the tivopart for two reasons, 1. I can hardly see the screen and 2. I have no idea where to put it. And with this Sudo crap having everything locked down like a vault, I'm not sure I could run it even if I did know where it went. There should be a place I can turn off all this security just so I can get something done. I took today off work just to get this done and after an entire day I am still trying to see the screen...

thanks again...

lrhorer
10-20-2011, 06:54 PM
Thanks, I need to go blow off some steam because I'm one frustrated dude at this point.
I understand that. Take a breath. Don't worry about where you want to go. Just concentrate on the next step in the path.


This debian is incredibly tough to do anything on.
Not really. It's much easier to get things done than in Windows. One just has to know a few basic tricks. 'Not many


I just want to load a video driver
'May not be necessary, but even if so, it's really not difficult.


and I've been at it since 8 this morning.
That's a long time. If you'll give me a few minutes, I'll walk you through it.


I couldn't run the tivopart for two reasons, 1. I can hardly see the screen
Annoying. We can either work around it or fix it.


I have no idea where to put it
It doesn't really matter. It can either be placed in the path, put anywhere you like and append the path variable to include the path where the binary is placed, put wherever you want and then create a link to the binary from a directory that is in the path, or simply supply the fully qualified file name.


And with this Sudo crap having everything locked down like a vault, I'm not sure I could run it even if I did know where it went.
Under Debian, you don't have to worry with sudo. Ubuntu does not allow logging in as root or su to root. Debian allows both.


There should be a place I can turn off all this security just so I can get something done.
There is, or just bring up a root console.


I took today off work just to get this done and after an entire day I am still trying to see the screen...
Yeah, you probably should have coordinated that. It is expected that you might run into small issues that require some more seasoned advice. Do you have a chat account, or a DMZ zone / port forwarding in your router?

Soapm
10-20-2011, 09:26 PM
While trying to get the video driver running I did something that turned off the driver and has me in what looks like the 16 bit 600x800 mode. As long as it's not flickering I can deal with it.

This is what I get when I run Tivopart


root@Charity:/home/chuck/Downloads/bin# /home/chuck/Downloads/bin/tivopart.x86 r /dev/sda
(null): Bad data in block 14 from '/dev/sda'
fatal: invalid drive: /dev/sda

This data block 14 is what I get no matter what I use. It just won't let me read the partitions. I was thinking of loading winmfs on this linux machine and reimaging the drive but after spending the day just trying to load a video driver I can't imagine what it would take to try and load actual software.

lrhorer
10-21-2011, 03:51 AM
Is everything working for you?

Soapm
10-21-2011, 02:13 PM
Is everything working for you?

Absolutely... I can't thank you enough for all your help. I saw how easy this can be if you know what you're doing which shined the light on how little I really know.

But now I have a linux machine to practice on!!!

Thanks again!!!

lrhorer
10-21-2011, 06:06 PM
Absolutely... I can't thank you enough for all your help.
Good. Let me know if you want to implement mike_s topology and scripting methods. As I say, it's a bit tedious, but not really difficult.


I saw how easy this can be if you know what you're doing which shined the light on how little I really know.
Like I say, it's not so much that as knowing a few tricks and getting used to the different aproach. Of course, the Linux OS itself is phenomenally sophisticated, but a basic deployment is not that difficult. Of course you ran into several very unusual problems, and that didn't help.


But now I have a linux machine to practice on!!!
Indeed you do. Call me this weekend if you want to fix the video issue. You don't have to, though, even if you want to play around with Linux a lot. Most of my machines (all my servers) are headless. I access them from other machines like we did last night.

Also, if you want to try out video transfers to / from your TiVo, I definitely recommend using that little Linux box as the server. Again, it doesn't need to have a keyboard, mouse, or monitor. Just load the server softwarre (kmttg, pyTivo, vidmgr, Galleon, etc), sit the box in a corner, and let it hum away. Loading the software is easy, but I definitely recommend you consult someone more familiar with Debian before setting the aps up as servers. It's not really difficult, butit most definitey requires someone fairly good at writing bash scripts.

Soapm
10-21-2011, 06:37 PM
I actually got the video working. That wget was like learning to stick the oars in the water instead of at the water...

I also moved all the hacks out of the var directory then symlinked them back. So far that's working.

I'm really waiting for the drive to fill so I can make sure that reboot every 20 minute problem is gone but I do appreciate the offer. I won't hesitate to holler as I need help....

lrhorer
10-21-2011, 11:54 PM
I actually got the video working. That wget was like learning to stick the oars in the water instead of at the water...
'Makes a difference. Of course with your video working, you can also bring up a browser and click on links just like you are used to doing. If you have enough space, and you want to run a firefox clone, you can load iceweasel.

`apt-get install iceweasel`

Out of curiosity, how much space is left on that system? Can't be much.

`df -h`


I also moved all the hacks out of the var directory then symlinked them back. So far that's working.
OK. Remember, there are some differences between symlinks and hard links.


I'm really waiting for the drive to fill so I can make sure that reboot every 20 minute problem is gone but I do appreciate the offer.
That won't take too long.

Soapm
10-22-2011, 01:08 AM
Out of curiosity, how much space is left on that system? Can't be much..

That's part of a problem, I took a 500GB drive out of my computer upstairs and formatted the drive after you said I might be running out of space. I maxed out the other drives by moving its content to them. I am begging moma to let me buy another drive but I might be sticking this one back in. I have a 120GB in an old XBOX out in the garage so I may use that for my Linux OR I am thinking about making my regular making a dual boot but that would mean reformatting all the additional drives to FAT if I want to see them from both OS.

Decisions, decisions...

lrhorer
10-22-2011, 01:03 PM
That's part of a problem, I took a 500GB drive out of my computer upstairs and formatted the drive after you said I might be running out of space. I maxed out the other drives by moving its content to them. I am begging moma to let me buy another drive but I might be sticking this one back in. I have a 120GB in an old XBOX out in the garage so I may use that for my Linux OR I am thinking about making my regular making a dual boot but that would mean reformatting all the additional drives to FAT if I want to see them from both OS.
No it doesn't. Linux recognizes pretty much every file system in existence. It most certainly recognizes NTFS. All that is required is maybe 20G of free space - and that is being generous - for boot + root + swap. I do recommend a separate Windows OS and data sections, but then I recommend that in any case. It makes upgrades much less painful and is liable to result in fewer problems, whether one is dual booting or not.

Actually, I consider the best practice to be utilizing a small boot drive ( maybe 100 - 500G ) and a large data drive or array. Newegg has 160G drives for $40 with free shipping. You can probably pick one up on Craigslist for even less. For that matter, if you want to go with a PATA drive instead of SATA, I have a 160G PATA drive I can let you have for $20 + shipping.

Soapm
10-22-2011, 06:00 PM
No it doesn't. Linux recognizes pretty much every file system in existence. It most certainly recognizes NTFS. All that is required is maybe 20G of free space - and that is being generous - for boot + root + swap. I do recommend a separate Windows OS and data sections, but then I recommend that in any case. It makes upgrades much less painful and is liable to result in fewer problems, whether one is dual booting or not.

Actually, I consider the best practice to be utilizing a small boot drive ( maybe 100 - 500G ) and a large data drive or array. Newegg has 160G drives for $40 with free shipping. You can probably pick one up on Craigslist for even less. For that matter, if you want to go with a PATA drive instead of SATA, I have a 160G PATA drive I can let you have for $20 + shipping.

Didn't know Linux reads NTFS. I keep hearing about having a DOS disk when working with Linux so I assumed it was because Linux didn't read NTFS. You know about assuming...

I am seriously considering that dual boot since you say I won't have to reformat all my drives. My current boot drive is 120GB which is partitioned like 30/90. I can move the stuff in the 90 to my 500GB drive when I stick it back in so I think I'll be set but thanks for the offer...

lrhorer
10-22-2011, 07:26 PM
Didn't know Linux reads NTFS. I keep hearing about having a DOS disk when working with Linux so I assumed it was because Linux didn't read NTFS.
No, that probably refers to the partition type, assuming the drive is partitioned. Linux does not require a drive to be partitioned. Windows does, and the default partition type for XP and below is a DOS partition. I'm not sure what the default is for Vista or W7. Windows XP and above also supports GPT partitions, which do not have the same limitations as DOS partitions. Linux supports a wide array of partition types, including (as you have seen) Apple, GPT, and BSD disklabels.


I am seriously considering that dual boot since you say I won't have to reformat all my drives. My current boot drive is 120GB which is partitioned like 30/90. I can move the stuff in the 90 to my 500GB drive when I stick it back in
Yep. Just allocate maybe 40 - 60G for the Windows boot partition, leave about 20G free space, and make sure everything is working for your Windows boot. If the drive is set up with a DOS partition (which only supports 4 primary partitions), then be sure only the Windows partition is a primary partition and make the other partition(s) logical space(s) in an extended partition, again leaving 20G free space on the drive. If you have an extended partition already, then be sure it has at least about 1G free for a linmux swap space. Once all that is in order, take your netinst CD and boot the PC, once again installing Debian. I recommend creating a small boot partition (~100M) for GRUB, a 1G swap partition (in an extended partition), and the rest an ext3 partition for Linux itself. Both the Boot and Linux partitions can be Primary, and the Boot partition should be marked Bootable. When you reboot, GRUB will present you with the option to boot either Windows or Linux. If it only shows Linux, don't panic. I have occasionally seen the GRUB configurator miss the fact there are other OS systems on the drive. Running it again (under Linux) will fix the issue. You can also set up the default OS to boot if the system times out.

If this (or some other) Linux system becomes a pyTivo server, then I recommend the file system containing the videos be formatted as XFS. It will provide for better performance than NTFS. OTOH, Windows can't read XFS file systems, so it won't be readable by the Windows boot from a dual boot system. Linux most certainly can, howver, share the contents of an XFS drive with any Windows system on the network using SAMBA.


so I think I'll be set but thanks for the offer...
No problem.