Best way to expand usable space?

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Best way to expand usable space?

Post by akamediasystem »

I've been having a great time with the Beaglebone Black in a bunch of different projects, but I often run up against the 2GB limit of the eMMC drive. Once I get my first "drive is full" error, generally things start acting strange until I make some significant deletions.

I'm very new to Debian (and linux in general), so I'm not sure if this is possible, but is there a way to tell the OS to treat a (much larger) SD card as the "main" directory?

If anyone had a set of best practices for setting up SD cards in general, I'd love to hear them...

Thanks!

AKA

User avatar
adafruit2
 
Posts: 22144
Joined: Fri Mar 11, 2005 7:36 pm

Re: Best way to expand usable space?

Post by adafruit2 »

This is a great question for the BB google group(in case they have any tricks) - only thing we suggst is you may be best off making a fresh install on a 4 or 8G card and 'ignoring' the 2G MMC

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Best way to expand usable space?

Post by tdicola »

Yep check the BeagleBone Black google group for the latest info, but one quick suggestion would be to switch to the Debian operating system if you haven't already. This will wipe out all your data on the device, so make sure to back stuff up first. Then install the Debian eMMC flasher image from here so it overwrites the internal memory with the latest Debian image. If you haven't installed a new operating system yet, check out this guide for a little more information--in particular note that you need to hold down the boot button when the Beaglebone Black is powered up or it might not load from the microSD card.

Once booted the eMMC flasher image will immediately go to work automatically flashing the internal memory of the device with the Debian image, so you just need to wait about 15-20 minutes for it to finish. It will light up all the blue LEDs on the BeagleBone Black when its finished. Once the device is flashed you can power it down, remove the SD card, and power it back up to make sure it boots into the OS.

Now finally you can flash a new Debian image onto the SD card, this time grab the Debian image without the eMMC flasher (the first one listed) and load it on your card. If you put the card in the device and boot up, the BeagleBone Black should load off the SD card automatically without having to press the boot button. The reason you flashed the internal memory with the latest Debian image in the previous step is so it does this automatic SD card boot behavior--if you didn't run the latest Debian you would always have to press the boot button when the device is powered up for it to boot from the card, which is quite annoying.

One last thing once you're booted off the SD card is to expand the filesystem of the image to fill the SD card. There's a script included in the Debian install to do this, check out the snippet of commands here that mentions auto resize partition.

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: Best way to expand usable space?

Post by akamediasystem »

Hey, thanks so much for the detailed response! I never fully understood the difference between run-from-eMMC Debian and the SD card version.

I'll try the steps you outlined and report back if I still encounter trouble.

Best,

AKA

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: Best way to expand usable space?

Post by akamediasystem »

Hello again, I did the steps as suggested but am still running out of space soon after doing "apt-get update". I am puzzled as to what I could be doing wrong.

I installed the "flasher" OS by holding down the user-boot button until all four LEDs came on, then waiting about 35 minutes.

After that, using a different (8GB) SD card, I used Pi Filler to put the non-flasher OS on that card. I then put it in a powered-down BBB and powered it up (ie, I didn't press the boot button at all but instead let it power itself on).

Then, I'm able to ssh into the device and run the /opt/scripts/tools grow_partition.sh script. Then I reboot. Soon afterwards, in the course of installing **not very much** stuff (literally, the Adafruit GPIO, SSD1306, and BBIO libraries, plus their dependencies, plus running apt-get update), I see things fail because there's no space left on the disk. What am I doing wrong? Does everyone move their /home directory onto the SD card manually, and nobody ever mentions that step?

I'm also realizing I'm not even sure how I would know if I was ssh'ing into the OS that lives on the eMMC versus the OS that lives on the SD card?

Thanks for any help you might be able to give, this one is a puzzle to me!

AKA

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Best way to expand usable space?

Post by tdicola »

It sounds like you might be booting into the internal flash memory OS instead of the SD card for some reason. One way to check, remove the SD card and let it boot up to the OS, then create a file in the home directory (like run 'touch this_is_the_internal_memory.txt' without quotes). Shut down and put the SD card in, then boot up again and look to see if any files exist in the home directory. If you see the file you created, then for some reason you've booted into the internal OS. Try reflashing the SD card if so, perhaps something was corrupted and its not being detected properly.

User avatar
skypuppy
 
Posts: 44
Joined: Wed May 28, 2014 6:00 pm

Re: Best way to expand usable space?

Post by skypuppy »

I've forgotten the details at the moment but you can force boot from the SD card with a couple of simple steps. IIRC, one of those steps involves modifying uenv.txt on the SD card. Try a search...

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: Best way to expand usable space?

Post by akamediasystem »

Thanks for the reply! You're right that you can adjust some boot settings by modifying the uEnv.txt file, and that could definitely cause problems like the ones described in this thread.

I forgot to update here, but I was able to resolve my problem by re-flashing my SD card, so my issue seems to have been related to that.

I also now am sure to do as the previous commenter suggested, and add an empty file that says "this_is_EMMC" in the internal OS's file dir...

Thanks again,

AKA

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”