View Full Version : chattr
09-13-2001, 01:25 AM
im rying to get chattr to work ON my tivo.. so i can change things and re chattr them without having to remove the drive... ive tried using the chattr that i used on dylans disk, but that didnt seem to work..
invalid command name "./chattr"
any ideas? or do i have to use a diff compiled version of chattr ??
09-13-2001, 02:22 AM
you need the chattr thats compiled for the powerpc. you can check the directories under http://tivo.samba.org/download/. when you find a copy of chattr, you need to transfer it to your tivo, do a chmod +x chattr, and then you can run it
09-13-2001, 12:12 PM
thats kinda the track of thinking i was on, but couldnt find one that was labeled"compiled for power pc", i downloaded the one from the http://tivo.samba.org/download/sorphin/ dir. it seems considerably larger than the others chattr's ive been working with..
heres what i did......
0. renamed chattr.txt to chattr.tcl
1. send chattr to tivo via zmodem
2. copy chattr to /bin /sbin
3. chmod 777 chattr (in all places)
4. cd to /bin (for extra assurance)
5. ./chattr.tcl +i test.txt
and it worked!!
but odly it doesnt work if i rename chattr.tcl to just chattr.... ?? :rolleyes: oh well that works well enough
thanks mr.black :D
It worked for me to rename to just chattr
Don't know why it didn't work for you.
I was reading Glitched's article about how to install the chattr command on to DirecTivo.
My overall assumption of this hack is that we need to load the chattr command to the tivo then from a bash promp we can change the attributes of the files we modify in order to preserve our changes. Is this correct? Can I chattr +i a file from the bash prompt?
I downloaded the file and followed steps 0 and 1.
Step 2 has me puzzled though. I am unable to copy the file to the /bin/sbin directory.
I am using this command
bash202# cp chattr.tcl /bin/sbin
It replies: No such file or directory
I don't think the chattr.tcl file is in the directory. How do I know where the file has been uploaded to. ( i used windows terminal and Zmodem to send it to host)? What is the linux equivalent of dir? ls doesn't work.
My next question is about step 3
What are we doing by typing chmod 777 chattr? What is the exact syntax to type?
I would be very greatful for some clarification. I am sure someone who knows what they are talking about, is going to post four sentences that will make the puzzle crystal clear !
10-17-2001, 12:22 AM
of course you can chattr +i files from the bash prompt on the tivo. you need to get the version of chattr that is compiled for the tivo (its at tivo.samba.net in one of the user dirs or something), put it on your tivo, and do a chmod 777 chattr and a chattr +i chattr
chattr.tcl doesnt exist unless you made it yourself. you should do a
chmod 777 /bin/sbin/chattr
the 777 means read/write/execute for everybody.
10-17-2001, 12:47 AM
its the strangest thing.... sitting here reading what i wrote, i really dont remember posting that little how-to, (hmm... must have just gotten home from the bar :D ) . anyhow, yes as mr. black has pointed out ;) youll ned the specific version of chattr compiled for the powerpc. I have found that chattr.tcl can be renamed to just chattr for simplicity, and is only required in /bin.
Thank you both for your help. I am however still stuck.
The key question I have is how do you upload the chattr file to the tivo.
I used Windows Hyperterminal to connect to the bash prompt. then i used zmodem file transfer to send the file to the tivo. I said it did that succesfully. However when i go to copy the file to the bin directory It tells me no such file or directory. When I uploaded the file to the tivo can I assume it put it in whatever directory the bash prompt is in?
Is the command to copy the file to the bin directory:
cp chattr.tcl /var/tmp ?? ( I did rename the file as chattr.tcl)
I did download the PowerPC version of the file from the link Glitched put in his original article.
10-18-2001, 07:24 PM
Ive never tried using hyper terminal (although it should work just fine.) I use tera term pro(which is free to download)... but as long as your doing zmodem upload it should be the same. you are correct in assuming it will send the file to whatever dir your bash prompt is in currently. By default all partitions are mounted read only, except /var, so if you want to send the file anywhere but /var you will need to remount the partition read/write by using the command "mount -o rw,remount /" if you dont have the LS command try "<period><space><tab><tab> " that will give you dir listing so you can see if the file is actully in there or not after the transfer. good luck!
PS. i almost forgot to remount your partition read only replace the "rw" to "ro" and reissue the command.
the way to get a directory listing is a life saver. Thanks again.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.