{"id":1473,"date":"2019-10-04T13:00:00","date_gmt":"2019-10-04T11:00:00","guid":{"rendered":""},"modified":"2020-05-12T21:01:48","modified_gmt":"2020-05-12T19:01:48","slug":"symlinks-on-fat32-devices","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=1473","title":{"rendered":"symlinks on fat32 devices"},"content":{"rendered":"<p>You can use <b>posixovl<\/b>:<\/p>\n<ul>\n<li>install posixovl (i.g. via synaptic);<\/li>\n<li>rename \/sbin\/mount-posixovl -&gt; mount-posixovl.orig;<\/li>\n<li>create a new mount-posixovl in sbin:<\/li>\n<\/ul>\n<p><\/p>\n<pre>#!\/bin\/bash\n# wrapper for mount.posixovl to conform with common mount syntax\n# with this wrapper posixovl can be used in fstab\n\n# location of the original mount.posixovl\norigposixovl=\"\/sbin\/mount.posixovl.orig\"\n\n# gather inputs\nwhile [ $# -gt 0 ]; do\n        if [[ \"$1\" == -* ]]; then\n                # var is an input switch\n                # we can only use the -o or -F switches\n                if [[ \"$1\" == *F* ]]; then\n                        optsF=\"-F\"\n                else\n                        optsF=\"\"\n                fi\n                if [[ \"$1\" == *o* ]]; then\n                        shift\n                        optsfuse=\"-- -o $1\"\n                else\n                        optsfuse=\"\"\n                fi\n                shift\n        else\n                # var is a main argument\n                sourcedir=\"$1\"\n                shift\n                if [[ \"$1\" != -* ]]; then\n                        targetdir=\"$1\"\n                        shift\n                else\n                        targetdir=\"$sourcedir\"\n                fi\n        fi\ndone\n\n# verify inputs\nif [ \"$sourcedir\" == \"\" ]; then\n        echo \"no source specified\"\n        exit 1\nfi\nif [ \"$targetdir\" == \"\" ]; then\n        echo \"no target specified\"\n        exit 1\nfi\n\n# build mount.posixovl command\n\"$origposixovl\" $optsF -S \"$sourcedir\" \"$targetdir\" $optsfuse\n<\/pre>\n<p><\/p>\n<ul>\n<li>add to \/etc\/fstab something like this (depending on the name of your device):<\/li>\n<\/ul>\n<p><\/p>\n<p>LABEL=Basic\u0000402 \/media\/duns\/basic2 vfat  user,rw,noauto,uid=1000,gid=1000,iocharset=iso8859-1,shortname=mixed,showexec,utf8 1 2<br \/>\n\/media\/duns\/basic2 \/mnt\/e-reader posixovl    noauto    0   0\n<\/p>\n<p><\/p>\n<ul>\n<li>create a script, like this: <\/li>\n<\/ul>\n<p><\/p>\n<pre>#!\/bin\/bash\nwmctrl -c mount.posixovl.orig\nmount \/media\/duns\/basic2\nmount.posixovl -F \/media\/duns\/basic2 \/mnt\/e-reader\nkrusader --left \/mnt\/e-reader\/ebooks --right \/mnt\/zippati\/eBooks\n<\/pre>\n<p>\ndone!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use posixovl: install posixovl (i.g. via synaptic); rename \/sbin\/mount-posixovl -&gt; mount-posixovl.orig; create a new mount-posixovl in sbin: #!\/bin\/bash # wrapper for mount.posixovl to conform with common mount syntax # with this wrapper posixovl can be used in fstab # location of the original mount.posixovl origposixovl=&#8221;\/sbin\/mount.posixovl.orig&#8221; # gather inputs while [ $# -gt 0 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=1473\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;symlinks on fat32 devices&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[573],"tags":[137,138,62],"class_list":["post-1473","post","type-post","status-publish","format-standard","hentry","category-sistema-operativo","tag-devices-fat32","tag-posixovl","tag-symlinks"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1473"}],"version-history":[{"count":2,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1473\/revisions"}],"predecessor-version":[{"id":1971,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1473\/revisions\/1971"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}