You are viewing an older revision! See the latest version

Mounting with sync

Table of Contents

  1. OS X

This page describes how to configure Linux or OS X to mount the mbed Microcontroller with the 'sync' option, this ensures files copied to the board are written immediately and without having to 'Eject' the drive.

Note: It is not necessary on all systems, but we haven't made up a list yet. Use this if you found you needed to "eject" before the file was properly transfered

OS X

Open a Terminal window and edit (or create) the file /etc/fstab with a text editor such as pico for example with the command:

sudo pico /etc/fstab

<</code>

Add an entry to the end of the existing fstab file for the mbed device,

<<code>>
LABEL=MBED none msdos rw,sync
<</code>>


Do not change any other entries in /etc/fstab.

Save the updated /etc/fstab then reconnect the mbed board so that the drive is mounted with the new configuration.

Note that you must update the text following LABEL= in fstab if you change the volume label of your mbed board.

== Linux ==

There are several possible ways to achieve this on Linux but the most reliable seems to be to simply add a static entry in fstab. For distributions that use tools like pmount or gnome-mount to automatically mount removable devices you may be able to configure these to get a similar result.

Open a Terminal window (shell) and run mount to get a list of the currently mounted file systems, you should see a entry for the mbed board like this:

<<code>>
/dev/sdb on /media/MBED type vfat (rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077)
<</code>

edit /etc/fstab with a text editor such as pico for example with the command:

<<code>>
sudo pico /etc/fstab
<</code>>

Add an entry to the end of the existing fstab file for the mbed device, changing /dev/sdb if necessary.

<<code>>
/dev/sdb /media/MBED vfat rw,user,sync 0 0
<</code>

Do not change any other entries in /etc/fstab.

Save the updated /etc/fstab then create the mount point with:

<<code>>
sudo mkdir /media/MBED

Reconnect the mbed board so that the drive is mounted with the new configuration.

If you have several removable devices you may find that the mbed board is not always /dev/sdb. If so, you can replace /dev/sdb with a symbolic link from /dev/disk/by-id which uniquely identifies one mbed board using its serial number or create a udev rule to create a persistant name like /dev/mbed1.


All wikipages