Page 1 of 2 12 LastLast
Results 1 to 15 of 22

Thread: Installing Debian on a Series2 DirecTivo

  1. #1
    Join Date
    Jan 2002
    Posts
    1,777

    Installing Debian on a Series2 DirecTivo

    DISCLAIMER:

    Note: These instructions have not been tested start to finish. Bugs may
    exist. No warranty, no support, and don't PM me with questions unless
    you've discovered something really, really cool. GL

    INTRODUCTION:

    Debian GNU/Linux has a simple, robust package management system called
    "apt" (automated package tool). It greatly speeds and simplifies the
    process of acquiring binary packages to enhance one's development /
    exploration environment. For instance, if a developer needs a copy of
    "gcc" in a pinch, he can simply type "apt-get install gcc" and let the
    package manager do the dirty work of satisfying dependencies and
    downloading/unpacking/installing packages.

    If you do not understand how this feature could improve your life, you are
    reading the wrong thread and should not post anything here.

    REQUIREMENTS:

    dpkg-extract (included)
    required-pkgs.txt (included)
    sources.list (included)
    hacks (included)
    dpkg installed on your PC
    "tar" installed on the Tivo (from /devbin-s2 on the Jonnydeath CD)
    "tivoftpd" installed on the Tivo (also from the Jonnydeath CD)
    All of the Debian MIPS packages from required-pkgs.txt (grab it from a
    Debian mirror under /debian/pool)

    INSTRUCTIONS:

    1) Download the files you don't have. Pick a version of Debian to
    install. Personally I prefer "testing" but you can also pick from
    "stable" or "unstable."

    2) Rig up the BASH_ENV hack on the tivo. Find a way to get a bunch of
    free space on the tivo drive. What I did was mfsrestore (but NOT
    expand) a 40GB image onto an 80GB drive.

    3) Once the BASH_ENV hack is working, make an ext2 fs where the bash
    hack put the romfs. In my case this was hda14 but YMMV.

    4) Copy the included hacks file to the root of the new partition.

    5) Boot the tivo and ensure that you get a shell. The system should
    stop booting at this point and be waiting for your input. If not,
    figure out why.

    6) Copy the original tivo root to a subdirectory in your new partition.
    The new partition should be under /mnt so don't include /mnt in the copy
    (duh). For example: mkdir -p /mnt/tivoroot/mnt ; cp -a /tvbin /dev
    [...] /mnt/tivoroot/.

    7) Create a big temp directory somewhere on your PC. Create a MIPS
    Debian root under that directory. Use dpkg-extract to extract all of
    the required (essential) MIPS Debian packages to the new root. Copy
    sources.list into /etc/apt in the new MIPS root.

    8) Tar up the debian root and extract it to /mnt/ on the tivo. Make
    sure you know where to find a version of chroot that will run with the
    libs in /lib on the original tivo root.

    9) On the tivo, chroot to /mnt and start setting up the Essential
    packages. dpkg --configure -a should do the job.

    10) Refine the system. Change /hacks to auto-chroot into /mnt on
    startup if you wish. Add more packages if you wish. Find a way to get
    /proc mounted in the right place(s). Copy the tivo modules to
    /lib/modules/ ... / on the debian partition and set up scripts (or use
    the rcscripts) to start networking.

    11) To start the tivo software from within the debian chroot, chroot
    /tivoroot /etc/rc.d/rc.sysinit .

    12) apt-get update ; apt-get upgrade

    NOTES:

    Be very careful if you choose to use pdisk to create a legitimate partition
    for your ext2 filesystem - MAKE BACKUPS of the first several (32? 64?)
    blocks of your drive. The version of pdisk I used corrupted the Tivo
    signature and kept the unit from booting.

    Is there a way to get mfsrestore to leave a specified amount of space free
    on the drive for your Debian partition, during the expansion phase? I have
    not looked too hard but I didn't notice a way either.

    You should do the dpkg-extract operation as a normal user on your PC. If
    you do it as root, you run the risk of potentially corrupting your PC's
    package database and maybe even having to reinstall the OS. Don't forget
    to chown -R root the entire Debian tree at some point, to avoid weird
    ownership issues.

    This hack, of course, allows you to replace tnlited and tivoftpd with sshd
    (which affords real access control).

    I recommend against setting a valid default route, because the tivo will
    attempt to phone home over the internet. Instead, set the http_proxy
    environment variable to something sensible (a local junkbuster proxy
    maybe?) prior to running apt-get.

    An old version of this file is in the zip. Ignore it.

    Thanks to mbm for providing inspiration and moral support.

    REFERENCES:

    BASH_ENV hack: http://www.tivocommunity.com/tivo-vb...threadid=90268

    Possible PROM no-sigcheck hack: http://www.tivocommunity.com/tivo-vb...4&pagenumber=2

  2. #2
    Join Date
    Aug 2001
    Location
    canada
    Posts
    38
    What No Install Wizard ?

  3. #3
    Join Date
    May 2002
    Location
    Lost in the DataStream
    Posts
    2
    I was kinda hoping for RH, but good job none the less.

    Can we run mame on it yet?
    Last edited by Shao; 12-31-2002 at 08:15 AM.

  4. #4
    Join Date
    Nov 2002
    Posts
    38

    Re: Installing Debian on a Series2 DirecTivo

    Cost of Series 2 Tivo: $199
    Time ripping it apart: 46 hours
    Time installing debian: 18 hours
    Thanking mbm: Priceless
    Last edited by Weez; 12-31-2002 at 08:20 AM.

  5. #5
    Join Date
    Jul 2001
    Posts
    48
    -
    Last edited by embeem; 07-10-2003 at 10:30 PM.

  6. #6
    Join Date
    Jan 2003
    Posts
    19
    ^Bump^

    LMAO

    How did I miss this thread, it's "Priceless"

    :P

  7. #7
    Join Date
    Jan 2002
    Posts
    1,777
    Now that the thread has resurfaced, I may as well post a few updates after a year of running in this configuration:

    First, patch your kernel to avoid intermittent errors when working on your TiVo.

    Second, I've attached an updated version of these tools. I threw together a script called create_root.sh which tries to automate the first part of the process: fetching and expanding the packages into a "root" archive which can be transferred to the TiVo. Read notes.txt for a few brief caveats I encountered during the "dpkg --configure -a" stage. The new tools will build a setup for MIPS/PPC, stable or unstable. The only configuration that has worked for me on a TiVo is MIPS/stable. MIPS/unstable is no longer compatible with the older 2.4.4 and 2.4.18 kernels, and I think the S1 PPC kernels are too old to run either branch.

  8. #8
    Join Date
    Feb 2003
    Posts
    42
    So before I do anything else I need to cross compile a patched kernel? Are the general instruction above still the suggested route to get debian running?

    This is going to be fun! Ugh
    Everything Zen;
    Everything Zen;
    I Don't Think So!

  9. #9
    Join Date
    Feb 2004
    Posts
    16
    Quote Originally Posted by alldeadhomiez
    Now that the thread has resurfaced, I may as well post a few updates after a year of running in this configuration:
    I like Debian but what are the advantages of running it rather than some other kernel on my HDVR2s?
    Does is support LBA48?
    Will it make transferring recording request easier?
    It will make TIVO more of a network server rather than a dedicated A/V unit.

  10. #10
    Join Date
    Feb 2003
    Posts
    42
    The biggest reason I want debian on my tivo is so that I can run a samba server on a rather secure platform (that is debian linux on non x86 hardware). The reason not to run a stock kernel is that it does not use FPU registers correctly. I am not a programmer of significant abilites so I will trust alldeadhomiez who by all indications is.

    It should be rather easy to make the kernel lba 48 with the patches that seem to be on this forum.

    Debian would allow a ton of options that normal linux would not... A ton.
    Last edited by fearlessrogue; 03-09-2004 at 09:05 PM.
    Everything Zen;
    Everything Zen;
    I Don't Think So!

  11. #11
    Join Date
    Feb 2003
    Posts
    42

    Possible alternative?

    I have been thinking a bunch and was wondering if it would it be possible to:

    1. Restore with the option for a massive swap (say 60 gig).
    2. By hand repartition so that all but the last 127 MB is unpartitioned, and have the last 127 be swap.
    3. Perform monte as per normal.
    4. Copy off to a seperate drive the partition that gets monted too.
    ***** I have been able to get a functional tivo after setp 5******
    5. Repartition so that the unpartitioned space of that whatever partition was monted too would be many gigs.
    6. Extract the debian root that would be built for the older method of getting debian to the new partition.
    7. Copy back in the tivo files to the monted partition.
    8. Setup up debian.

    For that matter it would probally be best to do the dpkg extraction via a knoppix disk so that you do not risk a install...
    Last edited by fearlessrogue; 05-21-2004 at 01:44 AM.
    Everything Zen;
    Everything Zen;
    I Don't Think So!

  12. #12
    Join Date
    Jan 2002
    Posts
    1,777
    Quote Originally Posted by fearlessrogue
    For that matter it would probally be best to do the dpkg extraction via a knoppix disk so that you do not risk a install...
    Just run dpkg-extract as a non-root user.

    If you boot Knoppix you will still need a big, writable filesystem to store a 200MB Debian root. Although maybe you'll have a big enough ramdisk.

    I am attaching the reimaging scripts I use to illustrate one possible way to repartition the drive to accomodate Debian. You will need to provide a bunch of support files (you'll see). This runs with a stock kernel and no reboots.

  13. #13
    Join Date
    Feb 2003
    Posts
    42
    Quote Originally Posted by alldeadhomiez
    Just run dpkg-extract as a non-root user.

    If you boot Knoppix you will still need a big, writable filesystem to store a 200MB Debian root. Although maybe you'll have a big enough ramdisk.

    I am attaching the reimaging scripts I use to illustrate one possible way to repartition the drive to accomodate Debian. You will need to provide a bunch of support files (you'll see). This runs with a stock kernel and no reboots.
    Thanks a ton for all the work you have done.

    Is there any reason that the approoach that I suggested above would not work?

    Forgive me but what is the usage of the script? Am I correct in the assumption that it is to be used while booted into a Sleeper iso like enviroment (I have no clue what that is based on, forgive the ignorant).
    Last edited by fearlessrogue; 03-12-2004 at 01:36 AM.
    Everything Zen;
    Everything Zen;
    I Don't Think So!

  14. #14
    Join Date
    Jan 2004
    Posts
    41
    I have been trying to get GKrellM server installed on my HDVR2

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

    Could one of you with Debian (and apt) working, install a copy of "gkrellmd" and provide me with the gkrellmd application ? Greatly appreciated!


    Edit: DUH! Im going to check out the repositories and see if I can help myself

    Edit:

    tivo:/var/hack/gkrellm$ ./gkrellmd
    ./gkrellmd: /lib/libc.so.6: version `GLIBC_2.3' not found (required by ./gkrellmd)
    ./gkrellmd: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /usr/lib/libglib-2.0.so.0)

    ---

    Looks like the gkrellmd from Debian is compiled with too new a glibc. Ugh, Replacing /lib/libc.so.6 with the version off the debian site killed the box

    Edit: I compiled my own version of gkrellmd against glib1.2 and got the glib1.2 stuff from the Debian repository. Making progress. Sorry to have this post in the Debian thread. I would delete it if I could, but it only lets me edit. So may as well show my progress...

    Edit: YES!!!! I got it to work. I will post instructions on my thread.
    Last edited by sublime; 03-12-2004 at 04:05 AM.

  15. #15
    Join Date
    Jan 2002
    Posts
    1,777
    Quote Originally Posted by fearlessrogue
    Thanks a ton for all the work you have done.

    Is there any reason that the approoach that I suggested above would not work?
    I posted that script because it pretty much implements the steps that you posted. The only major difference is that the script assumes that the TiVo root filesystem has already been archived, so it doesn't need to be manually extracted from the backup image during installation.

    The image this script is used to install was designed to install 3.1.1b, and then optionally perform an immediate in-place upgrade via slices on the first boot. Thus, it was not important to allow the user flexibility with regard to the MFS image and the TiVo root filesystem tarball. Your needs may vary.

    Forgive me but what is the usage of the script? Am I correct in the assumption that it is to be used while booted into a Sleeper iso like enviroment (I have no clue what that is based on, forgive the ignorant).
    It is usable from a standard Linux installation or from an "ISO" environment. As I said though, it is only an illustration of the concept as none of the support files were included.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •