judge0 posted on Dec 27 2005 at 02:52 PM said:
Files used by GPH supplied software: /usr/gp2x/bookmark.dat
/var/log/*
/var/lock/*
/var/spool/*
/var/tmp/*
and so on...
While I think it's commendable that you are trying to increase the NANDs lifespan, I can't help but wonder what additional problems are going to be created.
Being unable to run 'dmesg', for instance, because it's output file is locked, may make troubleshooting system problems a little difficult.
I think that the problems most users are likely to encounter is some apps that write to the NAND (atari800, Scumm etc.) will no longer function correctly. However, on the whole, they shouldn't be writing there! OK - bookmark.dat may be a problem. As for dmesg, anyone running that probably is capable of knowing how to use mount
Anyway to change the profile to remount only with noatime, not read-only simple remove the ",ro" from the first mount command -> "mount -o remount,noatime /".
A nice thing about mounting read-only is it makes me think twice before overwriting my libc again
A more eloquent solution may lie in placing a second copy of kernel on SD card, along with appropriate Directory structure, and modifying U-Boot to load that instead of NAND based kernel.
Would be nice, since the SD is more easily replaced. Still should use noatime though. Unfortunately I don't think you can get into the U-Boot menu on retail units. I could flash the dev U-Boot, but don't want to risk that until I get a JTAG set up.
A second option would be to see what HH brings, possibly avoiding NAND use altogether.
The options 'noatime' & 'notail' shouldn't create problems, but to make the NAND 'ro' may be a little much (as well as it only applies to the portion of the NAND released to the kernel by U-Boot)
A few other things to be aware of - the NAND is loaded as 'rw' not in 'fstab'/'mtab' but in U-Boots proprietary mechanism, well before the kernel is ever loaded.
The changes you are proposing may not function as you expect them to.
I have been experimenting with trying to get the boot time down, and trying to get a proper USB driver loaded through the kernel. Any script changes that would affect a 'normal' Linux kernel are pretty useless unless matched in changes to U-Boot configuration as well.
Good luck and keep up the good work
The remount definitely works, since it runs the mount command. i.e. it does not just modify fstab/mtab. It is done too late though really as you say:-(
If you know how to get into U-boot so I can tell the kernel to mount read-only initially please let me know. Looking forward to your fast booting kernel VERY much
. I miss the almost instant on of GP32. I guess we'll have that with the HH menus shortly though for the non-Linux stuff.
Thanks.
Mark
edit: Doesn't dmesg use an in memory buffer? If I strace it I don't see it reading anything.