# Drive reverts back to read/write?



## Entcee (Dec 18, 2004)

Background:
I have a Philips DirecTivo modded with PTVnet and I have also run rbautch's script.

I have mounted my hard drive (both through hackman and through telnet) to read only but the next day when I check it, it has reverted back to read only. This has happened 3 or 4 days in a row.

Is this normal? If not, what could be causing it?


----------



## Gunnyman (Jul 10, 2003)

Tivo SHOULD be reverting to read only. Are you saying yours reverts to read /write after a reboot?


----------



## arctanstevo (Mar 28, 2003)

What part? Isn't /var always rw?


----------



## Entcee (Dec 18, 2004)

Yes, my drive reverts to read/write. Not after reboot, just after some time. Right now I set it to read only but this time tomorrow it will be read/write. (no reboot.)

Not sure what part, I am checking it in hackman.


----------



## Entcee (Dec 18, 2004)

I am not sure if this is related but here is my kernel log for today:

Mar 8 02:40:58 (none) kernel: !!!!WARNING: Needed 2 tries to set video STC to 0x02993b23 
Mar 8 02:40:58 (none) kernel: Before = 0x077dd15a, After = 0x077dd188 
Mar 8 02:40:58 (none) kernel: 
Mar 8 03:25:35 (none) kernel: !!!!WARNING: Needed 2 tries to set video STC to 0x046ee9e0 
Mar 8 03:25:35 (none) kernel: Before = 0x046eea2b, After = 0x046eea59 
Mar 8 03:25:35 (none) kernel: 
Mar 8 04:00:18 (none) kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended 
Mar 8 04:16:39 (none) last message repeated 2 times
Mar 8 09:15:13 (none) last message repeated 2 times
Mar 8 09:15:18 (none) last message repeated 2 times
Mar 9 00:32:49 (none) kernel: !!!!WARNING: Needed 2 tries to set video STC to 0x03e97df1 
Mar 9 00:32:49 (none) kernel: Before = 0x03e97e53, After = 0x03e97e81 
Mar 9 00:32:49 (none) kernel: 
Mar 9 00:32:53 (none) kernel: !!!!WARNING: Needed 2 tries to set video STC to 0x043dffdc 
Mar 9 00:32:53 (none) kernel: Before = 0x043dd426, After = 0x043dd454 
Mar 9 00:32:53 (none) kernel: 
Mar 9 01:31:44 (none) kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended 
Mar 9 01:48:01 (none) last message repeated 2 times
Mar 9 01:49:18 (none) last message repeated 2 times
Mar 9 01:50:41 (none) last message repeated 2 times


----------



## tortio (Jan 31, 2002)

Mine started doing the same thing.... right after I enabled the hackman toggles.

tivo-TiVo#:/var/tmp >mount
/dev/hda7 on / type ext2 (rw)
/dev/hda9 on /var type ext2 (rw)
/proc on /proc type proc (rw)
tivo-TiVo#:/var/tmp >

The hackman toggles may have nothing to with it, but I didn't notice the change until after I enabled a couple of options.

In fact, when I first saw this, I did "ro" on /, and sure enough, after the scheduled reboot, it's now back at rw.

I see plenty of exec's in hackman.ictl that change the state of the file systems, some of them are available the hackman twp page. If I get some time, I'll try to look at it more and see if I can make sense of it.

On a related note, reading some posts on deals site, where they have a database, it appears that the RW vs. RO camp is divided. I see lots of posts saying it is dangerous to leave the mounts in RW, but haven't seen a clear reason as to why? If it's simply to avoid a fat-fingered mistake, then I think I might be okay leaving it RW. On the other hand, if it's to avoid an update from dtv, then I'd definately want it RO.

Thanks!


----------



## Entcee (Dec 18, 2004)

With some testing I found that the drive goes to read/write when TWP restarts.

Maybe hackman is doing it? Here is the first few lines of my TWP log

TivoWebPlus Project - v1.2.1
The program comes with ABSOLUTELY NO WARRANTY.
This program is licensed under the GPL.
See the 'copyright' and 'README' files for copyright and credit information.
Loading modules...
backup
bufferhack
channelprefs
favicon
hackman
--hackman Version 4.2.0--
*-Root directory mounted read-write*
-Thursday, March 09, 2006, 07:50 AM, local time

If I figure it out, I will post what I found here.


----------



## Entcee (Dec 18, 2004)

Sure enough, when I removed hackman from TWP the drive stays ro.


----------



## PortlandPaw (Jan 11, 2004)

The mystery might have been more quickly solved by a quick read of the ReadMe (and I quote):
_Set Root Directory read-only on boot_ -- When this is checked the root directory is mounted as read-only when hackman is loaded and mounted as read/write when it is unchecked. Default is unchecked, for users who keep their hacks in directories other than /var/*. However, it may be better to set this as checked in order to avoid access errors,as noted above.

Then there's even more information about this topic:

*About Permissions*
Permissions determine whether a file or directory can be written to or just read and whether a file can be executed (run). TiVo's operating system is designed to be read-only, thus protecting the files from corruption. This is accomplished by mounting the root directory as read-only, preventing any writing to the directory. If the root directory were mounted as read/write with all the files and directories chmod'd to read-only, the directory would still be subject to revision, as root users still have write privileges, and all the processes that run on TiVo are root processes.

A separate volume, /var, is mounted with read/write privileges and for this reason, most TiVo hackers place their modifications in directories such as /var/hack. But a problem has arisen from this approach in that TiVo will occasionally rebuild the /var directory wiping out any added files. Although chances of this happening may be reduced (or even possibly eliminated) by maintaining a sufficiently large swap file, many users put their hacks in a root directory, such as /hack, just to be safe.

This works fine as long as none of the hacks need to write information back to the disk. As many of them do, this forces the user to mount the root directory as read/write. As noted above, this is in contradiction to TiVo's design and is possibly hazardous, though many people do so and their machines are perfectly happy.

Hackman provides a means to remount the root directory as read-only or read/write and also an option to automatically keep the system read-only or read/write on boot. It is left to the user to decide how best to manage permissions on the TiVo.

And, at the very beginning of the ReadMe, there's this note:
Also, leaving the root directory read/write can be dangerous and could lead to disastrous file corruption on your TiVo.

But, as has been noted, the jury is out on this last opinion. [sarcasm]Isn't it amazing what can be found in a ReadMe?[/sarcasm]


----------



## tortio (Jan 31, 2002)

PortlandPaw said:


> The mystery might have been more quickly solved by a quick read of the ReadMe (and I quote):
> _Set Root Directory read-only on boot_ -- When this is checked the root directory is mounted as read-only when hackman is loaded and mounted as read/write when it is unchecked. Default is unchecked, for users who keep their hacks in directories other than /var/*. However, it may be better to set this as checked in order to avoid access errors,as noted above.


Thanks for the note. Clearly I need to read and learn more on Hackman, but I do not have the option _Set Root Directory read-only on boot_ in my menu. I only have _Stop: Remount read-only (safe)_.

Now, I should point out that this is just off the zipper CD; I didn't install hackman myself so my assumption was that this would be considered a "default" install. Like I said, I do have some homework ahead of me.


----------



## Gunnyman (Jul 10, 2003)

you have to dig into hackman a bit click on the date doan toward the bottom of the hackman screen


----------



## Entcee (Dec 18, 2004)

Well I feel dumb....

At first I did not know it was hackman changing it to rw. Once I found out it was hackman, you are absolutley right, I should have re-read the readme.

Thanks for the info, I now have it stating up as ro.


----------



## tortio (Jan 31, 2002)

Entcee said:


> Well I feel dumb....
> 
> At first I did not know it was hackman changing it to rw. Once I found out it was hackman, you are absolutley right, I should have re-read the readme.
> 
> Thanks for the info, I now have it stating up as ro.


Well, I don't feel too dumb. If you've never hacked a tivo, there is simply SO MUCH to learn and read up. This is my first one and it's been a great experience learning about it and I am so thankful for this community for the help. And not to mention Gunnyman's omipresence help and rbautch's tips. There is just so much to learn. And, if you want to further expand on the features and all the other things out there, you can really lose sleep over it; it's a little overwhelming.

Going from a standard dtivo to a "zipper'ed" dtivo is like trading your ford escort in for a F1 car.


----------



## Gunnyman (Jul 10, 2003)

omniprescence huh?
Wow I think I need to take some time off.


----------



## tortio (Jan 31, 2002)

Well, I upgraded Hackman from 4.0.2 to 4.2.0 and I did read the ReadMe. Thanks for taking the extra effort and time to make it as safe and painless as possible. If you could see me tip my hat, you would see me tip my hat.

Thanks!


----------



## Entcee (Dec 18, 2004)

tortio said:


> There is just so much to learn. And, if you want to further expand on the features and all the other things out there, you can really lose sleep over it; it's a little overwhelming.
> 
> Going from a standard dtivo to a "zipper'ed" dtivo is like trading your ford escort in for a F1 car.


I have to agree. This is my first hacked TiVo (I purchased it with the PTVnet hack already done) and I have been working on it (further expanding it) for about a week staying up until 2:00am almost evey day (I have to be at work at 8:30am) reading and trying different things.

I think I am done with this one finally and time to start #2. This time I will hack it from the start (using the zipper.)


----------



## PortlandPaw (Jan 11, 2004)

tortio said:


> If you could see me tip my hat, you would see me tip my hat.
> 
> Thanks!


...and right back atcha!


----------

