element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Blog Extending Micro SD Card space for Beaglebone Black use - Windows users
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bkravi.sigmaiot
  • Date Created: 17 Jul 2017 9:23 AM Date Created
  • Views 11419 views
  • Likes 2 likes
  • Comments 4 comments
  • beaglebone memory expansion
  • sdcard
  • BeagleBone Black
Related
Recommended

Extending Micro SD Card space for Beaglebone Black use - Windows users

bkravi.sigmaiot
bkravi.sigmaiot
17 Jul 2017

Since Beaglebone Black(BBB) internal memory is limited to 4GB and further more, 3.5 GB is already allocated to system and other process. Hence for us to install new modules/programs very less space is left. So it is good idea to use 8/16 GB SD card instead. We can boot from SD card and use the left over space in card to install other modules and programs.

 

To enable this feature, we must format, partition, resize the SD card. Please follow below steps to achieve this:

1) Format the 8 GB card using SD Formatter tool

2) Download the latest Beaglebone image from: http://beagleboard.org/latest-images

3) This image will be a zip file that MUST BE unzipped using 7-Zip tool.

    Get it here: http://www.7-zip.org/download.html

4) Once image file is unzipped, burn this image to the formatted SD card using Win32DiskImager utility.

    Get it here: https://win32-disk-imager.en.uptodown.com/windows

5) Plug the SD card to BBB, keep pressing the boot button and then power on. Remove the hold from boot button when you see all the USR LEDs are lit. This step will allow BBB to boot up from SD card than the eMMC flash

6) Once boot is over, you can verify that the root file system is the SD card now by using below command (first switch to root user using su - root):

root@beaglebone:~# df -h /

Filesystem      Size Used Avail Use% Mounted on

  /dev/mmcblk0p1  3.3G 2.8G  296M  91% /

 

You can see /dev/mmcblk0p1 (i.e. SD card) is mounted on root i.e. ‘\’ . But the space is shown as ~4GB only while our SD card is 8GB. To get the full space, we now need to do the partitioning and resizing. Follow below steps to do this (first switch to root user using su - root):

root@beaglebone:~# sudo fdisk /dev/mmcblk0

 

This will start the fdisk utility. Below are the steps for this utility. Please note the bold magneta text that we need to input when prompted by the utility.

 

Welcome to fdisk (util-linux 2.25.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

     Command (m for help): p        // to print the status

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0xca52207f

 

Device         Boot Start     End Sectors  Size Id Type

/dev/mmcblk0p1 *     8192 6963199 6955008  3.3G 83 Linux

 

     Command (m for help): d        //to delete the partition

Selected partition 1

Partition 1 has been deleted.

 

     Command (m for help): n        // to create new the partition

Partition type

   p primary (0 primary, 0 extended, 4 free)

   e extended (container for logical partitions)

    

     Select (default p): p        // ‘p’ for the primary partition

Partition number (1-4, default 1):

 

First sector (2048-15523839, default 2048): 8192        // the ‘Start’ sector. See the result ot ‘p’ at the very begining

Last sector, +sectors or +size{K,M,G,T,P} (8192-15523839, default 15523839):

 

Created a new partition 1 of type 'Linux' and of size 7.4 GiB.

 

     Command (m for help): p        // to print the status

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0xca52207f

 

Device         Boot Start      End Sectors  Size Id Type

/dev/mmcblk0p1       8192 15523839 15515648  7.4G 83 Linux

 

     Command (m for help): w        // to save and quit the fdisk utility

The partition table has been altered.

Calling ioctl() to re-read partition table.

Re-reading the partition table failed.: Device or resource busy

 

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

 

NOTE: You might receive the above error message in red. For this, you need to run below commands:

sudo partprobe

 

Now the partition has been created and only thing remaining is to resize it. Use below command for this:

sudo resize2fs /dev/mmcblk0p1

 

And you will see the output like below:

 

resize2fs 1.43 (17-May-2016)

Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required

old_desc_blocks = 1, new_desc_blocks = 1

The filesystem on /dev/mmcblk0p1 is now 1939456 (4k) blocks long.

 

Now recheck below command:

df -h|grep '/dev/mmcblk0\|Avail'

 

image

  • Sign in to reply
  • timurgepard
    timurgepard over 5 years ago

    Be careful, 8192 is not size but starting point in SD card where Linux files starts.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 5 years ago in reply to Sean_Miller

    Best way to handle now... Thanks Sean_Miller

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Sean_Miller
    Sean_Miller over 5 years ago

    I bumped into this new way of doing this for new BeagleBone users:

     

    sudo /opt/scripts/tools/grow_partition.sh

    sudo reboot now

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • robs7
    robs7 over 8 years ago

    Hi,

    I recently downloaded the last image Debian 8.7 2017-03-19 and did all the steps you mentioned and that also are here: BeagleBoard.org - updates, afterwards the BBB turn itself down and I need to extract the SD, otherwise if I connect the BBB to the power with the SD mounted it will flash again.

    However, I power up the BBB and then place the SD and get the following output:

     

    root@beaglebone:~# df -h

    Filesystem           Size  Used Avail    Use% Mounted on

    udev                    10M     0     10M     0%      /dev

    tmpfs                   98M  2.9M   95M    3%      /run

    /dev/mmcblk1p1  3.5G  2.9G  430M  88%    /

    tmpfs                   245M  4.0K  245M   1%    /dev/shm

    tmpfs                   5.0M  4.0K   5.0M    1%    /run/lock

    tmpfs                   245M   0      245M   0%    /sys/fs/cgroup

    tmpfs                   49M     0      49M     0%    /run/user/1000

     

    I'm assuming I just had to to the same changing mmcblk0 to mmcblk1 but I would like you to tell me if I'm right. Also, will this allow the BBB to power-on with the SD mounted and use it as available storage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube