Ya I know the previous versions of the Beaglebone Black has only 2GB of eMMC memory out of which the OS takes up 1.5GB. I have done a lot of internet search and read a whole lot of blogs. Finally I got a solution from the official BBB wiki page at eLinux. But still you may face some difficulties in doing it. Since this blog is for the noobs. I will write the steps in a noob friendly way, because I know what mistakes you can make since I have also made the same.
What you Need
Downloading and booting Debian Image
Believe me the new Debian distribution of BBB is a lot better than the other two variants available. It comes pre-installed with a lot of useful software packages like Apache, OpenCV, TightVNC etc. So I will be using the Debian Image for this demo.
- Download the latest Debian image from this page.
- Warning: Do not download the "eMMC flasher" version. Because due to some reason I don't understand, you cannot use both the eMMC and the micro-SD card as your filesystem at a time.
- Write the image and install the OS using the instruction on this page.
- Since we will be booting from the SD card directly it wont take much time to boot up your board. Once booted you will find a new removable drive in your Computer.
- Now login using Putty like I showed in my previous post.
Checking Linux Filesystem
Now lets see how much space is left on your Debian file system.
- Type the following commands
- You will get a table showing your total root filesystem size, used and available memory.
- The first entry that is the "rootfs" denotes your root filesystem. At the bottom of the table you will also get your memory card as a device showing around 7.2GB of size.
- Since I have already done the procedure my rootfs is showing 5.2G of free space but previously it was only 60M
- Note the file name that denotes your memory card. In my case it was
Repartitioning the Memory Card
The Debian image provided in the support page is only for 2GB memory card. So the remaining space remains unused. We will use the fdisk tool in Linux to format the file system.
- Type the following commands
- You will get a window like this
- This is the fdisk tool interface. Now enter the following commands in this sequence
- You may get screens like this
- Now reboot your BBB by typing
- Now the excess memory in your memory card has been formatted and repartitioned to linux file system format. But in order to use it you need to resize the "rootfs" partition. In order to do so we will use the command
- Now check your file system by again typing
- You may see a screen like this. Notice that the available disk space is now 5.3GB .
- Now you can install your favorite software packages and play with the BBB.
Some tips to remember
- NEVER remove the memory card from the BBB(unless you are reinstalling the OS) otherwise your device will boot from the eMMC and you may loose all your data.
- If you want to reuse your memory card with your windows PC or in any other device you may need to format the memory card.
- After writing the linux image on your SD-card it will show only 96MB of total size. Don't be afraid. Your memory card is safe. The remaining memory has been formatted to linux file system which is not detected by windows.
- In order to get back the entire memory you may use the SDFormatter.
- Believe me this software was a life saver for me.
Spread the knowledge
I hope this post has been helpful to you. Kindly comment and share so that I can keep posting such tutorials and you may quickly find my blogs from google search. Thanks a lot!