Hi Onzen,

Any luck in the GPIO solution when trying to mount the root filesystem as 
read-only? I am also considering to put the whole of the rootfs as readonly 
but just like you I am also using the GPIO via the normal write(), read() 
operations.

I apologize that I digged up such an old post, but I would like to know if 
you have solved the problem since.


On Wednesday, December 5, 2012 5:08:46 PM UTC+8, özen özkaya wrote:
>
> This is really a very smart scenario Rico. I will also follow that :)
>
> Read only filesystem gives a solid solution across corruptions. But on the 
> other side I have faced a problem with writing GPIO's. Because all the root 
> filesystem is read only, I can not write GPIO states. This is a very bad 
> problem for functionality an today I am digging about how to change GPIO 
> state. If I find a solution, I will write it here.
>
> Thank you for all!
> Have a nice day
>
> Regards
> Özen
>
> 2012/12/5 Rico <[email protected] <javascript:>>
>
>> Hello Özen,
>>
>> thats exactly what I did :)
>> I^ve created another partition on the sd card and mount that rw to have 
>> non-volatile memory, that works very well. Beside of that, I have a tool on 
>> the read-only filesystem that tries to mount the rw partition and tries to 
>> start my application, which is on the rw partition. If this fails, I format 
>> the rw partition from within that tool and start a backup tool which is 
>> located on the ro partition as well. 
>>
>> On Tuesday, 4 December 2012 13:53:01 UTC+1, Özen Özkaya wrote:
>>
>>> Hi Rico,
>>>
>>> I am really really proud of you. Thank you!
>>> In the current case I have followed your instructions and get my rootfs 
>>> read-only. Thank you again and again.
>>>
>>> As you mentioned my home folder is also read only and I have no 
>>> non-volotile writable memory region left but I have a plan.
>>> In the current case I have two memory regions (boot and rootfs). I will 
>>> make three memory regions (boot,rootfs,data)
>>> The third memory region(data) will be mounted as rw. Hence I will get a 
>>> non-volatile writable region also. I think this will work.
>>>
>>> Thank you for all Rico! 
>>>
>>> Regards.
>>>
>>>
>>> 2012/12/4 Rico <[email protected]>
>>>
>>> Hi Özen
>>>>
>>>> 1) In the bootloader, you have to mount the partition that contains 
>>>> your filesystem ro, but that was already the case in my bootlader so I did 
>>>> not have to change that.
>>>> 2) In /lib/systemd/system/remount-rootfs.service I just commented out 
>>>> the the line that starts with "ExecStart" so the root filesystem does not 
>>>> get remounted as rw
>>>> 3) in fstab, you dont have to change the rootfs entry, but you have to 
>>>> make sure that fstab contains these two lines:
>>>>
>>>> tmpfs                /tmp                 tmpfs      
>>>> defaults              0  0
>>>> tmpfs                /var/run             tmpfs      
>>>> defaults              0  0
>>>>
>>>> By the way, that works for the console image of Angstrom, if you're 
>>>> using the image containing gnome, this might not working. 
>>>> Of course, your home folder is now read only too and you cannot store 
>>>> data in there. 
>>>>
>>>> On Tuesday, 4 December 2012 09:25:28 UTC+1, Özen Özkaya wrote:
>>>>
>>>>> Hi Dear Rico and Fred,
>>>>>
>>>>> Firstly, I am really thankful for your responses. This short ideas 
>>>>> gave me lots of insights.
>>>>> I am using the standard SD cards sent by cicuitco. They are Kingston 
>>>>> Class4 SD card.
>>>>>
>>>>> I am using standard Angstrom distribution's filesystem. Corruption 
>>>>> occures in rootfs side.
>>>>>
>>>>> In my application, there is a tcp/ip connection and an image 
>>>>> processing program (opencv).
>>>>> Yesterday I found that I am saving a captured image to my 
>>>>> /home/root/Desktop directory for each 5 seconds.
>>>>> Maybe it causes the over write and sdcard corruption. So I will save 
>>>>> the captured image to /dev/shm directory.
>>>>> By the way I will keep my file in ram. I will review my project in the 
>>>>> manner of memory usage and then I will make tests.
>>>>>
>>>>> On the other hand, for Angstrom systems I think we have to achieve a 
>>>>> more stable filesystem. I am planning to
>>>>> get read-only filesystem for both avoiding corruptions coming from 
>>>>> power issues and software issues.
>>>>>
>>>>> My error is like that:
>>>>> [   15.661254] mmcblk0: error -110 transferring data, sector 1802385, 
>>>>> nr 128, cmd response 0x900, card status 0x200b00
>>>>> [   19.912536] mmcblk0: error -110 transferring data, sector 1802496, 
>>>>> nr 17, cmd response 0x900, card status 0x0
>>>>> [   19.923004] end_request: I/O error, dev mmcblk0, sector 1802496
>>>>>
>>>>> With the light of Rico's response I understand that,
>>>>>
>>>>> -> I have to change the bootargs of uboot to root=/dev/mmcblk0p1 ro 
>>>>> instead of rw
>>>>> -> I have to find the service (rcX?) that remounts the filesystem to 
>>>>> r/w and I should remove that service
>>>>> -> I have to change my /etc/fstab to mount /tmp and /var/run to mount 
>>>>> them as tmpfs
>>>>>
>>>>> Do I have to modify /etc/fstab to mount the filesystem read only? I 
>>>>> know how to modify it but whenever I modify it to mount filesystem 
>>>>> read only, it does not mount. Maybe it is because of the bootargs and 
>>>>> the service that change the fs to rw. 
>>>>>
>>>>> Thank you for all, I will dig the problem.
>>>>>
>>>>> Regards,
>>>>> Özen
>>>>>
>>>>>
>>>>>
>>>>> 2012/12/3 fred basset <[email protected]>
>>>>>
>>>>>> Hi Özen,
>>>>>>
>>>>>> Can you elaborate a bit more on your SD card corruption issue?  What
>>>>>> brand of cards are you using and what filesystem?  Any ideas what
>>>>>> triggered the corruption (e.g. sudden power fail).  I am also
>>>>>> concerned about this problem.
>>>>>>
>>>>>> TY,
>>>>>> Fred
>>>>>>
>>>>>> On Mon, Dec 3, 2012 at 12:55 AM, Özen Özkaya <[email protected]> 
>>>>>> wrote:
>>>>>> > Hello Dear Members,
>>>>>> >
>>>>>> > I have SD card corruption problems in my beaglebone. As a solution, 
>>>>>> I want
>>>>>> > to set up read only filesystem.
>>>>>> > I have read lots of documents and tried many things like editing 
>>>>>> fstab but I
>>>>>> > could not get my current filesystem read only.
>>>>>> > Firstly, is it possible to mount filesystem of Angstrom read-only? 
>>>>>> If yes
>>>>>> > please can you just make suggestions about how to do it?
>>>>>> >
>>>>>> > I would be thankful if anyone makes suggestions about it. SD card 
>>>>>> corruption
>>>>>> > becomed a nightmare for me.
>>>>>> >
>>>>>> > With thanks and regards
>>>>>> >
>>>>>> > --
>>>>>> >
>>>>>> >
>>>>>>
>>>>>> --
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  -- 
>>>>  
>>>>  
>>>>
>>>
>>>
>>>
>>>
>>>   -- 
>>  
>>  
>>
>
>
>
> -- 
> Özen Özkaya
>
> R&D Vice Manager | Project Director
> Teknotel Electronics
> Address:  Mimar Sinan Cad. No:6
>                34746 Yenisahra / Istanbul
> Phone:     +90 216 472 83 13 ext: 34
> Fax:         +90 216 472 83 14
> E-mail:     [email protected] <javascript:>
> Web:        http://www.teknotel.com.tr
>  
>
> 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to