8 Replies Latest reply on Aug 18, 2014 7:17 AM by AllynH

    Expanding SD card partition

    AllynH

      Hi all,

       

      I have been trying to install some Python modules, when I ran into a module which required gcc to be installed.

      I followed the instructions on AlexT's blog (http://alextgalileo.altervista.org/blog/installing-development-tools-onto-official-linux-image/) to install the build essentials package group:

      opkg install packagegroup-core-buildessential

       

      However, I have now hit on another issue - I've run out of disk space...

      I am using an 16GB SD card but the Yocto distribution seems to have partitioned only 300MB towards the filesystem.

      When trying to install the build essentials package, it has fully consumed the 300MB and left me stuck for disk space...

       

      Any ideas how to expand this partition? I don't have access to a Linux machine, so I can't use resize2fs.

       

      Thanks in advance.

        • 1. Re: Expanding SD card partition
          JPMontero_Intel

          Hi AllynH

           

          Have you already tried doing a backup of the files you have on SD card in your computer, reformat the SD in windows and then copy your files again in the card?

           

          Regards,
          JPMontero_Intel

          • 2. Re: Expanding SD card partition
            Rushang.Karia

            Hi,

             

            Have you tried disk management in Windows, It can allow to resize partitions. It is present in Contol Panel -> administrative tools -> disk management.

            Right Click on your sd card partition and check if the option extend volume is in bold.

             

            If that does not work out, JPMontero's response should help you.

            • 3. Re: Expanding SD card partition
              AllynH

              Hi JPMontero_Intel,

               

              I have reformatted the SD card and re-installed the LINUX_IMAGE_FOR_SD_Intel_Galileo_v1.0.2 image.

              However I can no longer boot from the SD card...

              When I power on the Galileo without the SD card, I can run sketches.

              When I power on the Galileo with the SD card, the Galileo seems to hang and I can not run any sketches.

               

              I do not have a serial cable, do you have any ideas?

              • 4. Re: Expanding SD card partition
                JPMontero_Intel

                Hi AllynH


                Which firmware version does your board currently have? Also how is your SD partitioned now? You can also try with another SD card. Check this message it might be helpful to you https://communities.intel.com/message/244823#244823

                Regards,
                JPMontero_Intel

                • 5. Re: Expanding SD card partition
                  AllynH

                  OK - I'm back in action.

                  Here's what I had to do:

                  • Delete and re-download the Arduino IDE.
                  • Update the board firmware to 1.0.2.
                  • Install Linux image 1.0.2.

                   

                  There seems to have been some changes made to the Arduino IDE, however both versions are called: "arduino-1.5.3".

                  When I updated the IDE, this allowed me to update the board firmware to 1.0.2.

                  The Linux image I'm using is also 1.0.2.

                  The board firmware and Linux images must match, or you will see the issues described above.

                   

                  Galileo is now booting from SD card and sketches are working...

                  • 6. Re: Expanding SD card partition
                    AllynH

                    Hi JPMontero,

                     

                    I have reformatted the SD card in Fat32, however I am still seeing an issue.

                    The rootfs seems to be only 300MB, this seems to be where all of the items downloaded from the opkg management system are going.

                    So when downloading the dev tools, this fills up and I am left with no workaround.

                     

                    When I do a "df -h" in Linux, here's what I see:

                    Disk partition.PNG

                     

                    However when I view the SD card in GParted, I only see 1 partition:

                    GParted.jpg

                    • 7. Re: Expanding SD card partition
                      Rushang.Karia

                      This is because the image-full-galileo.ext3 on your SD card is 302MB. This is the root partition.

                       

                      Now there are two options that can be done.

                       

                      1. Try changing IMAGE_ROOTFS_SIZE in the image-full-galileo.bb file before you bitbake.

                       

                      2. Mount your SD-card, Next mount the ext3 rootfs on the loop device.

                         Create a new ext3 with the specified size on your harddisk and copy all the files.

                         Now copy this new ext3 to the SD-card replacing the old rootfs.

                       

                      Let me know if you need more detailed instructions,.

                      • 8. Re: Expanding SD card partition
                        AllynH

                        Hi Rushang.Karia,

                         

                        1. I used the prebuilt Linux image - I didn't perform a bit bake.

                         

                        2. Yes, can you go into a bit more detail please?

                        I've mounted a HDD on a Linux system before but it was a long time ago so I'd appreciate a few more details.

                         

                        Thanks for the reply!