This tutorial will show you how to adjust the partitions on an SD card made from an image of a smaller sized SD card. For example, you have a fresh new 32GB SD card ready for your Monku1000 / ODROID-GO ( https://www.hardkernel.com/shop/odroid-go/ ) and you have a backup image from your friend's device but it's only 16GB. After you write the image to the new SD card you notice you can only address around 16GB of space. What happened to your other 16GB? No worries, I'll show you how to resize partitions using your ODROID device. You'll need a Ubuntu based ODROID device like the one we showed you how to build for R1 or R2 (http://middlemind.net/tutorials/odroid_go/mr1_build.html), and R3 (http://middlemind.net/tutorials/odroid_go/mr3_build.html).
- An ODROID-C1+, -C2, or -XU4
- It's expected these devices are configured with Ubuntu MATE.
- 8GB or larger microSD card
- MicroSD to USB adapter
Fire up your ODROID device and let's get started. If you have gparted installed, it will be available from the menu system at System -> Administration -> GParted. If you don't have gparted installed, please run the following commands. Open the MATE terminal at this menu location Applications -> System Tools -> MATE Terminal. Then, enter:
$ sudo apt-get install gparted -yAfter installation, run gparted. Open this menu location System -> Administration -> GParted. An application like the one depicted below should appear. If you are prompted for a password, enter in the default root password, odroid, or, the password you are using.
Make sure to select the correct drive from the drop down list in the top right hand corner of the screen. ALERT: Double check that you have the correct drive selected or you could potentially lose data by selecting the wrong drive. Notice how the partition information that comes up in gparted shows that 14GB of space are unallocated! We want to be able to use that extra space but since we flashed this SD card from an image based on a 16GB SD card it ignored the remaining storage space! Take note of the file system used for the active partition on the SD card, we'll need to use this when we create a new larger partition. ALERT: Write down the file system used if you're new to this procedure because you'll have to restore this file system later on.
Resizing the Partition
There are different ways to accomplish resizing the partition. The one I'll outline here takes a bit longer but will ensure that you have an SD card that MacOS and Windows will also be able to read. First thing you'll need to do is right click on the desktop and create a new folder. Name it whatever you like we'll just be using it temporarily to hold the original SD card's files. Copy all the files and folders from the SD card into the folder you just created. You should see a file copy bar come up like the one depicted below.
Once the file backup is complete close and re-open gparted from this menu location, System -> Administration -> GParted. Make sure you select the proper drive from the drop down menu on the top right hand side of the application window. Right click on the active partitions listed and unmount them, then delete them. You should end up with no partitions and one entry that shows the full SD card size as unallocated. Next, right click and select the option to Add a New partition. Use the options outlined below. Essentially, you want to keep the file system of the original SD card, in this case fat32, and you want to make sure there are 0 Mibs unused after the partition--the single partition is as large as it can be. Recall the file system you noted when we first viewed the SD card. Now click the Add button and then click the Apply All Operations button. A green check button will appear near the top of the application window and gparted will apply the partition changes you have selected.
When the partition is ready, close gparted, disconnect and reconnect (mount) your SD card, and restore the original files you backed-up up to your ODROID device. When the files are finished being restored you can test the SD card by comparing it to the original or using it with the same device. Just pop the microSD card into your Monku1000 / ODROID-GO to see if it works. As depicted below our device powers up fine and recognizes our ROMs. Secondly, we need to check the card in a MacOS or Windows machine to make sure that it plays nice with those operating systems. Also depicted below, we can see that MacOS recognizes the SD card as having a 31GB capacity. ALERT: You won't see the full manufacturer-stated capacity listed on an SD card due to file system housekeeping and maintenance allocations. Now you can access that remaining 14GB of microSD card space. Awesome!
We hope this tutorial provided you with a thorough understanding of how you can adjust the sizes of partitions on SD cards. This article has been adapted from http://middlemind.net/tutorials/odroid_go/5mf_mr1_pr.html, where further ODROID tutorials are available.