while using udoo without keyboard monitor and mouse, if turn off power, Can it possible file on Ubuntu or SDCard lost or fail to access? How can i protect file?
If you need to be able to turn power off at any time without the risk of filesystem corruption, I'd suggest mounting the SD card read-only, using a ramdisk (tmpfs) for logs and other transient data, and periodically synchronizing the two, either on demand or via crontab, etc. This should have the added benefit of greatly extending SD card lifetime, considering limited write-cycle endurance of NAND flash media. Here is a page going into some of the necessary details: (for debian, but Ubuntu is Debian-derived and should be very similar) https://wiki.debian.org/ReadonlyRoot I usually mount the extra tmpfs at /rw ("read-write"), with home directories, various config files and such moved into that and symlinked to their usual locations (e.g. mkdir -p /rw/etc; mv /etc/resolv.conf /rw/etc; ln -s /rw/etc/resolv.conf /etc/resolv.conf) and a flash backing directory at /ro ("read-only"... a directory off of root is fine, it doesn't need ot be a separate fs) to hold snapshots of the ramdisk contents. Use something like 'rsync' for taking snapshots to aoid unneccesary ovewrrites of files that haven't changed. After making sure /rw is in /etc/fstab as a tmpfs, add this to the do_start sectoin of /etc/init.d/mountall.sh to automatically populate the ramdisk during boot from its latest snapshot: tar -C /ro -cf - . | tar -C /rw -xf - > /dev/null 2>&1 If you go this route, you do have to be careful about accumulating too much data in the ramdisk and potentially filling it and/or exhausting available RAM. If logfiles are expected to be extremely voluminous (but plain-text), layering a transparent-compression fs on top of the tmpfs may be worthwhile. I use small scripts named 'remountrw', 'remountro' to change the SD card root filesystem between read-write (for syncing tmpfs, software updates etc.) and its normal read-only state. A red LED wired to GPIO 150 (Arduino pin 14 / TX3) gets switched on to warn when the rootfs (SD card) is mounted read-write: Code: #!/bin/sh # remountrw script (go to read-write mode): if mount -o remount,rw,noatime /; then echo out >/sys/class/gpio/gpio150/direction echo 1 >/sys/class/gpio/gpio150/value fi Code: #!/bin/sh # remountro script: (back to read-only state) sync sleep 1 if mount -o remount,ro /; then echo out >/sys/class/gpio/gpio150/direction echo 0 >/sys/class/gpio/gpio150/value fi