Introduction: Increase Root Partition Size of Intel Edison With Release 2 Beta Linux Image

Hello everyone, today I'm gonna show you how to optimize the Edison Root Partition with the latest Linux image, aka Release 2 beta (Rel 2.1).

Traditionally, if you want to customize the Edison's root partition, you need to carefully modify the source code, and re-build the image from source, and flash it to Intel Edison with flashall.sh command. It will take you several hours to finish.

Fortunately, with the latest linux image, the "edison-image-ww05-15", Intel have already modified the rootfs partition in source code, so we don't need to build it again.
About the latest release (Release 2 beta - Rel 2.1), read edison-bsp_rn_332032-007.pdf on the following site:

https://downloadcenter.intel.com/download/24698/I....

Specifically, you will extend the rootfs partition from 512MB to 1.4GB with my flashing method! And then, you have lots of space to build more advance applications with the Edison, which required installing additional packages!

*** Update May 7
- My reboot ota update method seems to be missing something and NOT working, so I have added the alternative flashing method that sure to be working for everyone. ***

Let's get started!

Step 1: Useful Information About Building and Flashing Edison Kernel Image

There are some informative discussions in the Intel communities forum about how to manually adjust the rootfs partition, add more packages, and then build the custom image from source, aka "bitbake edison-image". It will sound intriguing to advanced developer who want to cook everything, but will take lots of time and patience to achieve, and cause you lots of problems along the road if you do something wrong.

About the Yocto Project :

https://software.intel.com/en-us/articles/open-sou...

If you want to know more about the partition problems and solutions, follow the links:

http://drejkim.com/blog/2014/11/22/building-an-edi...

https://communities.intel.com/thread/55612

Also, this guide will show you how to build a customizing image from source:

http://www.intel.com/support/edison/sb/CS-035278.h...

Step 2: Reading the Partition Information

*** Requirement ***

If you are totally new to Intel Edison, you should jump to getting started page, connect the hardware, install software kit , terminal and drivers, flash the Edison with latest image, and go back here.

Getting started:

https://software.intel.com/en-us/iot/library/ediso...

All documents and guides:

https://www-ssl.intel.com/content/www/us/en/suppor...

*** Ok, so we are all professional now, let do it! ***

- First, enter serial terminal (step 3 in getting started page), access root and enter password (if you have):

https://software.intel.com/en-us/articles/getting-...

- Next, list all the partition available by typing:

df -h

It will show you the list as the image above, check the line dev/root to know the size of partition. My case it's 463.9M, means the 512MB default.

If you have the same result, let's continue!

Step 3: Edit Flashall.sh Script - Repartition Without XFSTK

*** We need to edit flashall.sh script so that we can re-partition the Intel Edison without the Intel xFSTK Downloader tool. This tool allows users to update firmware over USB, used by flashall.sh --recovery command to re-partition, but requires Linux or Windows, and lots of additional packages, such as the new cmake package to fully functional. It's like an advanced tool, required lots of different tools to do the job in specific environments.

Luckily, I have found the solution here:

https://communities.intel.com/thread/56219

About Intel xFSTK:

http://xfstk.sourceforge.net

*** Let's do it!

- Download the lastest kernel image (edison-image-ww05-15.zip), extract it.

- Open the flashall.sh with TextEdit (I prefer TextWrangler)

- Scroll down to the bottom, looking for the lines:

echo "Flashing U-Boot Environment Backup"
flash-command --alt u-boot-env1 -D "${VARIANT_FILE}" -R

- Replace them with:

echo "Flashing U-Boot Environment Backup and rebooting to apply partition changes"
flash-command --alt u-boot-env1 -D "${VARIANT_FILE}" -R 
dfu-wait

- Save it.

Almost there! Let re-flash it!

Step 4: Re-flashing Edison With Modified Image Package

- Remove the old image in the Edison disk drive

cd /Volumes/Edison
rm -rf *
rm –rf \.*

- View files on the drive to confirm

ls

- I suggest you to FORMAT the Edison Drive to FAT32 (use disk util on Mac) before flashing, corrupted drive may cause trouble.

- Now, we have to flash the Edison via USB: connect the micro USB cables and follow Alternative Flashing Method in the bottom of this guide:

http://www.intel.com/support/edison/sb/CS-035262.h...

***Notes before flashing:

- Run the flashall script BEFORE plug usb cable into board, because it can only enter dfu mode during booting process.

- You can also access via serial terminal to the Edison and watch the flashing process (by screen /dev/cu.usbserial [TAB] 115200 -L ).

Ok, the hard part is over, let's check the result!


Step 5: Check the Result, And... You've Got 1.4GB!

- Enter root, and type:

df -h

If you have carefully followed the steps, now you sure to have 1.4GB to make something awesome!

Congratulation, you have just got a cape to be awesome. Thanks for following me to the end! If you encounter any problems concerned, or you have any cool ideas or advices, please let me know!

Have fun! Cheers!

Comments

author
okeribok (author)2015-05-03

Thank you so much for working this out and posting it! It now appears to be part of the "edison-image-ww05-15-2" image.

However, I followed your steps and still have only 463.9M /dev/root. I don't get it. Should I not actually use that flashall.sh somewhere?

I tried it, but wouldn't work without brew, so I got that. Now I get that there is no such keg in the cellar...

Halp?

author
okeribok (author)okeribok2015-05-03

Never mind. The steps to get there are now on the Intel page: http://www.intel.com/support/edison/sb/CS-035262.htm (way on the bottom, from "flashing alternate method". I needed to install brew and some other utils and then run the flashall script. Did your method work just by reboot ota?