Tutorial 5: Five Minute Fun with your Monku R1: SD Card Partition Resizing
-
Author: Brian A. Ree
Sections
0: Tools Needed
- A Monku Retro 1,2,3 / ODROID-C1+,2,XU4: link C1+ link C2 link XU4
(It's expected these devices are configured with Ubuntu and MATE. Click here
for R1 and R2 devices, and here for R3 devices.)
- A 8Gb or Greater Micro SD Card x1 $4.99: link
- SD card to USB Converter x1 $9.99: link
1: Introduction and Tutorial Goals
This tutorial will show you how to adjust the partitions on an SD card made from an image of an SD card
of a smaller size. For instance you have a fresh new 32GB SD card ready for your
Monku1000 / 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 show you how to
build here (R1, R2),
and here (R3)
.
Fire up your ODROID device, 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.
sudo apt-get install gparted -y
Next, 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 you
have the correct drive selected or you could potentially lose data if you select the wrong drive. Notice how the
partition information that comes up in gparted shows that there are 14GB 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 in just a bit. ALERT: Write down the file system used if you're new to this you'll have to restore this file system later on.
2: 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 Mac 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 on 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, i.e. the single partition is as large as it can be.
Recall the file system you noted when we first viewed the SD card. Once this is done click the Add button and then click the
Apply All Operations button. A green check button near the top of the application window and gparted will apply the
partition changes you have outlined.
When the partition is ready close gparted, disconnect and re-connect your SD card, so that it will mount again,
and restore the original files you backuped 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.
In our case a Monku1000, pop the micro SD 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 on
a Mac or Windows machine to make sure that it plays nice with those operating systems. Also depicted below, we can
see that OSX recognizes the SD card as having a 31GB capacity. ALERT: You won't get to the full capacity
listed on an SD card due to file system internals etc. but you can now access the remaining 14GB of space we
previously could not! Awesome!!
Well, we hope this tutorial provided you with at least some understanding of how you can adjust the sizes of
partitions on SD cards.