[SOLVED] Copying to SD from Linux

For problems with Gamebuino itself, NOT your project

[SOLVED] Copying to SD from Linux

Postby annyfm » Mon Jul 28, 2014 4:58 pm

Hay guys,

I've worked on my Copter game primarily on my desktop Mac to date, but I just made a small update on my Linux laptop because my neck is buggered today and I can use that more easily lying down.

I can flash via the Arduino program no problem, but when I take out the microSD card and plug it into the laptop with the adapter, I get an error when I try to mount it - I've forgotten what it was exactly (should have written it down!) but I believe it was to the effect of "Not Authorized"...

I've checked the filesystem and it appears to be FAT, though I'm not sure of 16 or 32. Either way, I can't read from/write to it with the laptop. I was thinking of reformatting it as ExFAT or something that Linux can use anyway, but I'm not sure it's a good idea as I don't know the Gamebuino's own filesystem requirement.

So to get to the point: what filesystems does Gamebuino support? If I can't pick one that Linux likes, then I'll just figure out how to make that play nice rather than screwing around with the SD card...

Cheers
Last edited by annyfm on Tue Jul 29, 2014 7:38 am, edited 3 times in total.
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: Copying to SD from Linux

Postby 94k » Mon Jul 28, 2014 5:29 pm

I'm using the SD card with the provided adapter on Linux without any problems, what does
Code: Select all
dmesg | tail

say when you plug it in? Where exactly did you get that error? And what does mount say?
I'm pretty sure Linux supports FAT (both, 16 and 32) out of the box, so your problem might not be filesystem related.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Copying to SD from Linux

Postby rodot » Mon Jul 28, 2014 5:34 pm

The Gamebuino bootloader only supports FAT16 (aka FAT).
I used the micro SD reader on Ubuntu and it worked fine. Sorry I can't really help you :(
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Copying to SD from Linux

Postby annyfm » Mon Jul 28, 2014 6:45 pm

Code: Select all
sudo dmesg | tail

Code: Select all
anny@anny-asus:~$ sudo dmesg | tail
...
[  788.883853] sdb: detected capacity change from 125960192 to 0
[  793.460253] sd 5:0:0:0: [sdb] 246016 512-byte logical blocks: (125 MB/120 MiB)
[  793.461244] sd 5:0:0:0: [sdb] No Caching mode page found
[  793.461250] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[  793.462869] sd 5:0:0:0: [sdb] No Caching mode page found
[  793.462876] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[  793.464028]  sdb: sdb1


I've removed a few lines relating to wlan, the rest appear when I connect the microSD.

94k looks like you're right, I use a fairly niche distro called CrunchBang, and this is apparently not a new problem (possibly triggered by a recent apt-get update... I'll try some other USB devices as well.) I can still write to the card fine on my Mac, so I'll continue to do that for now while I find a fix.
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: Copying to SD from Linux

Postby 94k » Mon Jul 28, 2014 7:38 pm

That output liiks perfectly fine, you might want to try something along the lines
Code: Select all
mount /dev/sdb1 /media/usb

and see what it says, but if you're working on your Mac anyway you might be fine too.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Copying to SD from Linux

Postby annyfm » Mon Jul 28, 2014 9:34 pm

Yeah I had a closer look into it and I can't see anything obviously wrong with the disk mounting as such, at least as far as hardware goes - in fact it shows in my (Thunar-based) file browser and in the terminal, I just hit "Not Authorized" when I try to list contents. So I did some more research and whaddaya know, turns out I wasn't far off the mark with my suspicion of apt-get dist-upgrade - looks like there's a problem with new policy software or some shit. I've come to realise it's probably responsible for a host of other problems that have recently affected my OS, not just USB mounting...

Too late to bother with it right now (particularly with this neck) so I'll have another look tomorrow... it seems like it's certainly not a Gamebuino specific issue though, so I'll update the topic title to mark it redundant. Thanks for your suggestions!
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: [NOT Gamebuino related] Copying to SD from Linux

Postby 94k » Mon Jul 28, 2014 9:48 pm

It's probably a permissions issue. You could try
Code: Select all
sudo chmod a+rwx -R /media/usb

(or wherever your SD card is mounted). This allows everyone to do everything in the directory, so use with care.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: [NOT Gamebuino related] Copying to SD from Linux

Postby annyfm » Mon Jul 28, 2014 10:00 pm

I doubt the SD card itself is any kind of issue - as I said, the recent problems affect a lot of other components of the OS, including tab-based function autocomplete in the terminal.

I'm honestly beginning to think i should just raze the graphical OS altogether and go full command-line :P which is how I work with the multitude of web servers I maintain in my job (and for music performance which is pretty much all emacs)...

I gotta go to bed, so I'll have another look in the morning (if I'm still too broken to go to work) and try your advice if nothing else works and I feel like watching my world burn.

PS props on the lights out game, works well and might keep me entertained for a while on my flight later this week!
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: [NOT Gamebuino related] Copying to SD from Linux

Postby annyfm » Tue Jul 29, 2014 7:37 am

I seem to have fixed the issues with disk mounting after following this post on the CrunchBang forum, and can now access the contents of my SD card (and write to it, woo)

Some other problems in my OS at large remain, but they're not nearly as troublesome.

Thanks again for your suggestions, I'll mark this issue solved!
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK


Return to Installation & Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests