Micro SD image ran out of space

While developing an embedded system, my uSD card image with debian became 3.5ish GB and I wasn’t able to download further libraries.

What should I do about this? I don’t know how to move the image with all the added files to a larger uSD…

I have a 16 GB uSD that already has a stock image on it, if possible can I erase then reuse that? how?

I have a laptop with ubuntu/windows dual boot, and it has an sd card slot…

root@beaglebone:/var/lib/cloud9/grow-io# npm install --global gulp-cli
npm ERR! Error: Attempt to unlock gulp-cli, which hasn’t been locked
npm ERR! at unlock (/usr/share/npm/lib/utils/locker.js:44:11)
npm ERR! at cb (/usr/share/npm/lib/cache/add-local.js:30:5)
npm ERR! at /usr/share/npm/lib/cache/add-local.js:47:20
npm ERR! at /usr/share/npm/lib/utils/locker.js:30:7
npm ERR! at /usr/lib/nodejs/lockfile.js:161:38
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.8.13-bone70
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “–global” “gulp-cli”
npm ERR! cwd /var/lib/cloud9/grow-io
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.4.21
npm ERR! nospc ENOSPC, open ‘npm-debug.log’
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.

npm ERR! System Linux 3.8.13-bone70
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “–global” “gulp-cli”
npm ERR! cwd /var/lib/cloud9/grow-io
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.4.21
npm ERR! path npm-debug.log
npm ERR! code ENOSPC
npm ERR! errno 54
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/lib/cloud9/grow-io/npm-debug.log
npm ERR! not ok code 0

Inline image 3

here’s my space

Is there really anything on the smaller sdcard that you absolutely have to have ? I assume you’ve just downloaded stuff off the internet that can just be re-downloaded onto the larger card. I can’t imagine you’ve created that much data on your own.

use windisk imager to copy your old sd card.
use windisk imager to write that image to the new sd card
use robert nelsons script to expand the new sd card to its full size
its located in /opt/scripts

I agree, only about 750MB is my project/dependencies, but I'm not sure how to fund all the junk. I really don't understand where it all came from. I even tried 'aptitude clean'.

Wulf man, I'll give your suggestion a shot. At least it'll buy more time til I figure out which directory had been sneaking in all the Twinkies.

Just to be clear, windisk imager can rewrite over a 16GB uSD card that already has an other image on it?

Just to be clear, windisk imager can rewrite over a 16GB uSD card that already has an other image on it?

If the image that’s on it is unimportant, just format the disk first. Then write the new image to it.

I personally do all this manually using dd, and fdisk in Linux. As I prefer to use Linux tools, for Linux “stuff”. But it can get a bit confusing if you’re not experienced with the tools.

dd to write zero’s to the first 10M of the disk. Wipes out the MBR, and partition table. Easily.

then dd the new image to the sdcard

Save older small sdcard, mount on your Linux x86 machine, as well as install openssh-server on this machine if not already installed.

On the x86 machine place files that you want to keep in a regular users home directory.

When the BBB is running the new image, install sshf, mount the x86’s regular user home directory, and copy files over that you require.

Another option:

From your x86 Linux machine run an NFS share, which is then always mounted to a directory inside the BBB’s regular users home directory. Keep all projects, and file here. That way, when it’s time to move to a different sdcard, or the sdcard gets old and dies. You still have the data safe on your NFS server. Not to mention this will help keep the BBB from filling up in the first place, and writing data to an NFS share all the time, is much better than writing to an sdcard. All the time.

Interesting, after googling NFS I’m hooked. But I’ve been saving my project via a remote git repository. What I’m really trying to preserve is all the tweaks like wifi settings, cron jobs, services… and those are all distributed around the fs, and I don’t remember all what I’ve done.

I’m still gonna try that nfs thing though, that sounds genius.

Interesting, after googling NFS I’m hooked. But I’ve been saving my project via a remote git repository. What I’m really trying to preserve is all the tweaks like wifi settings, cron jobs, services… and those are all distributed around the fs, and I don’t remember all what I’ve done.

I’m still gonna try that nfs thing though, that sounds genius.

You can either save those file over on the NFS server, or you can document 100% everything you do. Personally, I do the latter. But, I also create production, and development images for myself. The production images I save, are exactly as I downloaded them, pus all the tweaks I made to them prior to setting it up as a development image.

Do also keep in mind that if you do any compiling of native code( C / C++ sources, etc ) on a NFS share. In this case it’ll be noticeably slower than from sdcard. However, there is a cure for that too. Don’t compile on the NFS share, or the sdcard. Create a tmpfs ramdisk, mount that in your home directory, and do all your compiling there :wink: Of course, you can not compile HUGE projects, but you should be able to get away with creating a 256M ram disk( I do ).

What size is the card you are using currently?
If it is 4 GB, then the above conversations apply.
If it is larger than 4 GB, then all you have to do is expand the file system on your current card, to access the extra space.
— Graham

it was 4GB total, I will save transfer it to 16GB card then expand partition.

sorry how do I “use windisk imager to copy your old sd card.”

what do I need to select in order to make read become un-greyed out?

give it a file name to save it to

got it, that worked. for anyone who reads this, you must click the blue folder button, browse to a place you want to intermediately store the image file, then create a new YOURIMAGENAME.img with that dialog. This will give windisk a place to read the sd card to, then after it reads the imag to that file, you can insert a blank(fat32 formatted) sd card and click ‘write’ to copy image to new card/

Here’s another tip that may help others. For some reason that I don’t know, my uSD cards have “shrunk” in capacity after burning images for my 'bone - they show as a fraction of their rated storage. This is easy to fix with a free download called SD Formatter from the SD Association (recommended by Sandisk). HERE are the instructions, and it’s worked fine for me each time I’ve needed it. I use Robert’s method to expand the file system on all my Beaglebone’s uSD cards - there’s a 64 in there now.

It’s 4GB. Above advice worked. I won’t use that small of card ever again