All times are UTC-06:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
 Post subject: SD card portability.
PostPosted: Tue May 01, 2012 7:09 pm 
Offline

Joined: Mon May 02, 2011 11:50 pm
Posts: 40
Location: MT
I have an SD card formated Ext4 that I use to migrate code developed on my SmartTop to my SmartBook. Because the user ids don't match between the two machines, I have to change the user and group on folders and files to access them after moving the card to the SmartBook. However the same does not work when the card is moved back to the SmartTop, it claims the card is Read-Only now.

What is going wrong? How do I keep the SD card Read-Write?

I'm getting tired of having to reformat this card.

_________________
--

Science, n. Investigation of natural phenomena.
Engineering, n. Domestication of natural phenomena.
Technology, n. Domesticated natural phenomena.

--

\"It is essential for automatic computation that, instead of containing every single instruction necessary to carry out the program, the coded program include methods for generating instructions which are needed to carry out the program. ... One measure of the extent to which an automatic digital computer is used effectively is given by the ratio of the number of instructions formed in the machine to that of the instructions inserted into the machine initially.\" Mathematical Machines Volume I Digital Computers ©1961 Francis J. Murray

If so, then why is this ratio zero on most modern computer software?


Top
   
 Post subject:
PostPosted: Fri May 11, 2012 5:26 am 
Offline

Joined: Thu May 10, 2012 7:45 am
Posts: 1
I think the reason is in the renaming. But frankly speaing, I don't know how to help you :(
____________________
we develop, you enjoy


Last edited by huryepwl on Fri Jun 14, 2013 4:51 am, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Tue May 15, 2012 12:47 am 
Offline

Joined: Mon May 02, 2011 11:50 pm
Posts: 40
Location: MT
I've tried playing with the Unix protections (rwx) on groups and others and can make the disk itself Read-Write now on both machines. However I don't want to mess with protections on the individual files, so they aren't accessible on the SmartTop.

For now, since I only need to move text files from the SmartBook back to the SmartTop (for archiving) I'm going to try a FAT formatted SD card, which has no usr, grp, or protections. But to get the code files from the SmartTop to the SmartBook without losing the protections needed to execute it I need the Ext4 format.

I wish there was a less difficult way to do this.

There isn't support for ACLs, is there?

_________________
--

Science, n. Investigation of natural phenomena.
Engineering, n. Domestication of natural phenomena.
Technology, n. Domesticated natural phenomena.

--

\"It is essential for automatic computation that, instead of containing every single instruction necessary to carry out the program, the coded program include methods for generating instructions which are needed to carry out the program. ... One measure of the extent to which an automatic digital computer is used effectively is given by the ratio of the number of instructions formed in the machine to that of the instructions inserted into the machine initially.\" Mathematical Machines Volume I Digital Computers ©1961 Francis J. Murray

If so, then why is this ratio zero on most modern computer software?


Top
   
 Post subject:
PostPosted: Tue May 15, 2012 3:10 am 
Offline

Joined: Tue Apr 17, 2012 3:15 am
Posts: 44
Location: Barcelona, Spain
I think your main two options are either chmod 777 on all the files, or reformatting it as vfat.

Given what you say about wanting to retain permissions, I'm wondering if you can reformat the drive as vfat, but create a tarball of the files you want to transfer and put that tarball on the SD instead of the individual files. I *think* that when you untar the files on the SmartBook, the permissions should be intact and the ownership should change to the user that extracted the files. If not, you can try playing with the --owner=NAME flag when you create the archive and/or the --preserve-permissions flag when you extract the files. Unfortunately, I don't have a means to test this myself at the moment, but I'd be curious to hear if it works.

_________________
http://www.brandoninvergo.com


Top
   
 Post subject:
PostPosted: Wed May 16, 2012 5:21 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
I think your main two options are either chmod 777 on all the files, or reformatting it as vfat.

Given what you say about wanting to retain permissions, I'm wondering if you can reformat the drive as vfat, but create a tarball of the files you want to transfer and put that tarball on the SD instead of the individual files. I *think* that when you untar the files on the SmartBook, the permissions should be intact and the ownership should change to the user that extracted the files. If not, you can try playing with the --owner=NAME flag when you create the archive and/or the --preserve-permissions flag when you extract the files. Unfortunately, I don't have a means to test this myself at the moment, but I'd be curious to hear if it works.
If you've changed the permissions to read it on one system, it might just not work on the other. All you really can do is use chmod 0777 to force it read/write for all, as above. I usually do all my backups with rsync (with --numeric-ids) or tar (with --numeric-owner) and use the root account on the other system to pull the files, and change the permissions.

A real solution would be run an LDAP server (Active Directory, even) or NIS if you're a little bit insane, and set up both systems to use a common userid mapping. That's a little overkill for a tiny Efika though, unfortunately.

One silly question, if the card suddenly became read-only it could be indicative of two things; a corrupted filesystem (you didn't umount it before physically ejecting..) or perhaps just that little switch on the side got toggled. SD cards (but not MicroSD) have a write-protect slider on the side which is frustratingly easy to hit.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Wed May 16, 2012 7:06 pm 
Offline

Joined: Mon May 02, 2011 11:50 pm
Posts: 40
Location: MT
tar might be easiest on a FAT formatted SD, just not really a unix person.

_________________
--

Science, n. Investigation of natural phenomena.
Engineering, n. Domestication of natural phenomena.
Technology, n. Domesticated natural phenomena.

--

\"It is essential for automatic computation that, instead of containing every single instruction necessary to carry out the program, the coded program include methods for generating instructions which are needed to carry out the program. ... One measure of the extent to which an automatic digital computer is used effectively is given by the ratio of the number of instructions formed in the machine to that of the instructions inserted into the machine initially.\" Mathematical Machines Volume I Digital Computers ©1961 Francis J. Murray

If so, then why is this ratio zero on most modern computer software?


Top
   
 Post subject:
PostPosted: Mon May 21, 2012 11:30 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
tar might be easiest on a FAT formatted SD, just not really a unix person.
https://lwn.net/Articles/497106/

Looks like this will help fix the problem, in the future.. :)

Shame it's taken so long for this to be actually realized by someone with the talent to fix it.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Tue May 22, 2012 3:12 am 
Offline

Joined: Tue Apr 17, 2012 3:15 am
Posts: 44
Location: Barcelona, Spain
Quote:
Quote:
tar might be easiest on a FAT formatted SD, just not really a unix person.
https://lwn.net/Articles/497106/

Looks like this will help fix the problem, in the future.. :)

Shame it's taken so long for this to be actually realized by someone with the talent to fix it.
The article is paywalled :(

What I did, in the end, with my SD card, since I didn't feel like putting a lot of effort into getting it to mount as a non-root user, is to make sort of a "home folder" for my user on the card:
Code:
$ mkdir /media/sdcard/brandon
$ chown brandon /media/sdcard/brandon
In that light, why not do something similar with groups: make a group with the same ID on both machines, make your users on both machines belong to that group, and then create a folder on the SD card belonging to that group so that all members of the group have read-write access. That way, you're not messing with permissions on the whole disk.

_________________
http://www.brandoninvergo.com


Top
   
 Post subject:
PostPosted: Wed May 23, 2012 8:52 pm 
Offline

Joined: Mon May 02, 2011 11:50 pm
Posts: 40
Location: MT
Quote:
Quote:
tar might be easiest on a FAT formatted SD, just not really a unix person.
https://lwn.net/Articles/497106/

Looks like this will help fix the problem, in the future.. :)

Shame it's taken so long for this to be actually realized by someone with the talent to fix it.
I was hoping for a way to do it as is, not with kludgey patches to the OS that I probably can't get a copy of anyway,

_________________
--

Science, n. Investigation of natural phenomena.
Engineering, n. Domestication of natural phenomena.
Technology, n. Domesticated natural phenomena.

--

\"It is essential for automatic computation that, instead of containing every single instruction necessary to carry out the program, the coded program include methods for generating instructions which are needed to carry out the program. ... One measure of the extent to which an automatic digital computer is used effectively is given by the ratio of the number of instructions formed in the machine to that of the instructions inserted into the machine initially.\" Mathematical Machines Volume I Digital Computers ©1961 Francis J. Murray

If so, then why is this ratio zero on most modern computer software?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group