Results 1 to 12 of 12

Thread: Replace initrd

  1. #1
    Join Date
    Dec 2004
    Posts
    831

    Replace initrd

    As soon as 9.4 posts to my TiVo HD, I intend to use the Linux port of Mr. Black51's replace_initrd to neuter the new kernel, and from now on I intend to neuter my own kernel rather than downloading a hacked one. I have some questions, however:

    What will happen if I accidentally run the routine on an already neutered kernel? Glancing at the code, it doesn't jump out at me that it would do anything but replace the already null initrd with another null initrd, but does anyone have any actual experience with this?

    If it does cause problems to run the program on an already-neutered kernel, then shy of writing and compiling another program to detect a null vs a non-null initrd, is there a simple method I can use to have my Linux script check to see if the kernel is already neutered?
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  2. #2
    Join Date
    Jun 2006
    Location
    Dougal County
    Posts
    1,007
    All replace_initrd does is check for the gzip signature and then dd in the initrd image of your choosing into that spot. If you run it again, it won't change anything unless you use a different initrd image. You can verify this by running it twice, and checking the kernel with md5sum before and after.

  3. #3
    Join Date
    May 2005
    Posts
    4

    Replace Initrd

    Hopefully I'm just missing something simple here.

    I've extracted the kernel from 9.4L on my prommed S3, and I am attempting to use replace_initrd to neuter it.

    I'm using a command that is similar to the command posted by Captain Video in the S3 Overview thread.

    /dos/replace_initrd.x86 /dos/tivo/vmlinux.px /dos/null-linuxrc.img.gz dos/original_kernel.bak

    I have tried both the busybox and the regular version of NIllaZilla's compile of replace_initrd.x86 using both the PTV Boot disk, and the MFSLive disk. In either case I always get the message returned that replace_initrd.x86 was Not Found.

    Any thoughts on what I could be doing wrong?

    Thanks,

    Bill

  4. #4
    Join Date
    Jun 2006
    Location
    Dougal County
    Posts
    1,007
    you need to be pointing each argument in the direction that the actual file is in. if you don't have a replace_initrd.x86 file in /dos then you'll get that message. provide more information such as how you are mounting your drives.

  5. #5
    Join Date
    May 2005
    Posts
    4
    I am mounting the FAT32 drive by:

    mount /dev/sdb1 /dos

    when I do a ls after cd /dos

    I see a replace_*.* (or however linux truncates files) so it sems like the file is in /dos.

    Thx

  6. #6
    Join Date
    Jun 2006
    Location
    Dougal County
    Posts
    1,007
    the mfslive boot cd will truncate the filenames. use the name that 'ls' displays. if it says 'replac~1' then use that. it's annoying.

    if you still have issues, you can put the kernel on a pc and do it there, like under cygwin.

  7. #7
    Join Date
    Feb 2002
    Posts
    6,413
    I just rehacked my S3 the other day after finally getting the 9.4 update. I still use the PTVUpgrade boot disk and connect my SATA drive to my IDE bus using an SATA to IDE adapter so the boot disk sees it as an IDE drive. I've never had any problems getting the S3 drive hacked using this method. Just make sure whatever files you're using are all in the root directory of your FAT32 drive and it should work fine, regardless of which method you use.
    Please don't PM me or any other members looking for personal assistance. You'll do better by posting (after you've exhausted the search feature, of course) and taking advantage of the collective expertise of the membership instead of a single individual that may or may not be able to help you. Thank you and enjoy your stay at DDB!

  8. #8
    Join Date
    Mar 2005
    Posts
    235
    Try mounting like this for long filename support (mfslive supports vfat):
    mount -t vfat /dev/sdb1 /dos

  9. #9
    Join Date
    May 2005
    Posts
    4
    Thanks all, it worked like a charm with the mfslive boot disk using the truncated file names.

  10. #10
    Join Date
    Dec 2004
    Posts
    831
    OK, whatever works. I just boot the PC to Debian "Etch" Linux, use tivopart -r to rescan the partitions on the TiVo drive, and then mount /dev/sdb6 (or /dev/sdb7) to /tivo and then mount /dev/sdb9 to /tivo/var. 'No filename truncation or any other artifiact. The root partition on the PC is a 500G riserfs partition, so no worries on file sizes, either.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  11. #11
    Join Date
    Dec 2004
    Posts
    831
    Quote Originally Posted by billzed View Post
    I've extracted the kernel from 9.4L on my prommed S3, and I am attempting to use replace_initrd to neuter it.
    I just use replace_initrd.x86 to automatically make a copy of the kernel on the PCs hard drive and then hack the kernel in place.
    Having trouble with TyTool? Try TyTool Documentation
    Need to hack an S3 / THD? Try S3 Hacking Script

  12. #12
    Join Date
    Jul 2004
    Posts
    13
    I know this thread is older than dirt but I just came across the same issue. The compiled version of the replace_initrd.x86 file did not work with my current Linux version. I had to recompile replace_initrd.c and then it worked fine. I'm pretty sure the author's issue had nothing to do with the path directories but rather an incompatible compiled version of the program. I found it pretty confusing because it just kept coming back with the program's name not found.
    Quote Originally Posted by billzed View Post
    Hopefully I'm just missing something simple here.

    I've extracted the kernel from 9.4L on my prommed S3, and I am attempting to use replace_initrd to neuter it.

    I'm using a command that is similar to the command posted by Captain Video in the S3 Overview thread.

    /dos/replace_initrd.x86 /dos/tivo/vmlinux.px /dos/null-linuxrc.img.gz dos/original_kernel.bak

    I have tried both the busybox and the regular version of NIllaZilla's compile of replace_initrd.x86 using both the PTV Boot disk, and the MFSLive disk. In either case I always get the message returned that replace_initrd.x86 was Not Found.

    Any thoughts on what I could be doing wrong?

    Thanks,

    Bill

Posting Permissions

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