NAND troubles


Ultra_Jon

Member
Joined
Dec 12, 2013
Messages
48
What follows is an embarrassing tale.

Earlier today, I was un-tar'ing a source archive for a game I wanted to port. It was something like 200 MB or so. So I started the command and let it cook for a while, with a command to emit an audible beep when it was done. After a few minutes, I hear a beep and open up my pandora to check the terminal. I'm greeted with a bunch of messages to the effect of "Cannot write thus-and-such file: Read only file system.

It turns out I was un-tar'ing into my home directory on the NAND rather than the SD card.

Whoops.

So, I figure, I'll just rm -r the directory I had accidentally created and be on my merry way. Not so simple. Now I'm greeted by "Cannot remove thus-and-such: Read only file system." I try doing a chmod a+w on everything down to the root to no effect, I check my mount table and find that ubifs0 on "/" is mounted readonly so I remount it read-write, "mount" says it worked but I still can't remove the files (or write to NAND at all), and at the tail end of my dmesg I'm getting a bunch of errors to the effect of (I'm paraphrasing) "UBI_fs: make_reservation: cannot allocate thus-and-such number of bytes in thus-and-such jhead, error -30".
Rebooting doesn't help either.

I've heard that UBI-fs can't handle filling up or something. My current thought at this point is to reflash my NAND, is this really my only option? Does UBIfs really suck this much, or is there another explanation?
 
In a number of situations the kernel will panic and remount a filesystem as read only.  I guess that means you hit a bug in SuperZaxxon, but so far we've only seen it when you tried to untar 200MB of data to NAND (which would never fit), so it's not super-important to fix I'd guess.

Have you tried rebooting?  I've never managed to remount root as r-w even on mature x86 systems when this happens, since before remounting it it gets unmounted, and that removes the binaries needed to mount the partition again - but in your case it didn't seem to fall over in a complete heap.

If you can't mount the partition as part of a normal boot, you'll need to boot from an SD card and see if you can mount it from there - there are instructions on the wiki.  But if you're going to that effort, you might be better off just reflashing from the get-go.
 
Have you tried rebooting?  

Rebooting doesn't help either. 

I've never managed to remount root as r-w even on mature x86 systems when this happens, since before remounting it it gets unmounted, and that removes the binaries needed to mount the partition again - but in your case it didn't seem to fall over in a complete heap.
I did a "mount -o remount,rw /" rather than a umount followed by mount.  That's why it didn't sweep the filesystem (including the mount programs contained therein) out from under me.

So in the end I ended up reflashing.  I'll make sure to be very careful about my working directory from now on.  Thanks for taking the time to respond!
 
Back
Top