2010-04-26 09:29:07 How to handle few rw files using cramfs
Jayaprabhu Nadarajan (INDIA)
Message: 88903
Hi,
I am trying to use cramfs file system for my flash in BF527 board.
I have made 5 MTD partitions. In One Partition i have flashed kernel-only image(vmImage in mtd2) and in the other partition i have flashed cramfs (rootfs.cramfs in mtd3)
I am using the following boot command "init=/sbin/init root=/dev/mtdblock3 ro rootfstype=cramfs" and i am able to boot my flashed kernel successfully.
My application requires write permission for writing into some of the files like /etc/resolv.conf, /etc/config/smb.conf etc. How do i manage similar kind of files which requires both rw permission, using cramfs which is read only.
Regards,
Jp
QuoteReplyEditDelete
2010-04-26 11:37:46 Re: How to handle few rw files using cramfs
Mike Frysinger (UNITED STATES)
Message: 88908
so symlink the files to somewhere you can write, like a ramfs mount
QuoteReplyEditDelete
2010-04-27 01:22:54 Re: How to handle few rw files using cramfs
Jayaprabhu Nadarajan (INDIA)
Message: 88930
Thanks Mike.
How to identify the list of files that need to be in rw mode by User Application and by Kernel ?
Regards,
Jp
QuoteReplyEditDelete
2010-04-27 01:28:47 Re: How to handle few rw files using cramfs
Mike Frysinger (UNITED STATES)
Message: 88932
there really arent any files that need to be rw except /var which is why the default rc mounts that as ramfs
QuoteReplyEditDelete
2010-04-27 10:54:54 Re: How to handle few rw files using cramfs
Jayaprabhu Nadarajan (INDIA)
Message: 88964
Hi Mike,
Our application involves lot of configuration files inside etc folder to be modified at run time so i have made changes in rc file as follows
.........
mount -t ramfs var /var
mkdir /var/tmp /var/log /var/run /var/lock
cp -a etc/ var/
cd var/
mount -t ramfs etc/ etc/
cd
..........
I am not sure whether this is the right way to do (without symlinks). So please suggest.
Regards,
Jp
QuoteReplyEditDelete
2010-04-27 12:21:01 Re: How to handle few rw files using cramfs
Mike Frysinger (UNITED STATES)
Message: 88967
how you configure your /etc is up to you. there are no hard requirements in the dist in that regard.