13 Replies Latest reply on May 6, 2016 12:26 PM by Intel Corporation

    Resize partition Linux eglibc

    BrechtW

      I'm using eglibc and tried the suggested method stated by Resize SD card linux

       

      EDIT: On Linux

       

      If you have access to another Linux computer, you can use the following steps to resize the filesystem:

       

      Assuming that SD card is mounted under /media/sdcard:

      1. Run a file system check (fsck) first:

      fsck.ext3 -f /media/sdcard/image-full-clanton.ext3
      
      

       

      The problem is I can't find the .ext3 file.

       

      I tried to find it, without good luck.

       

      root@galileo:/# find $directory -type f -name "*.ext3"

      ./sbin/mkfs.ext3

      ./sbin/fsck.ext3

      root@galileo:/# cd /sbin/

      root@galileo:/sbin# ls

       

      How do I resize my partition so I can install scipy?

        • 1. Re: Resize partition Linux eglibc
          FGT

          Hi

           

          • 2. Re: Resize partition Linux eglibc
            AshwinG

            I am currently trying to resize the root partition of my sd card from 1.4 to 2.4 GB not using those steps , but using gparted in another linux system .  Is it the same and would it work without any glitches ?

            • 3. Re: Resize partition Linux eglibc
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi BrechtW,

              Have you checked this thread before? Rishabh had the exact same issue, he tried to run the same tutorial and found an issue with fsck.ext3.
              https://communities.intel.com/thread/99228.
              Joe-iot seemed to provide a solution to the issue, he first suggested to use GParted to resize the partition and after that he suggested to use DD to install it to the SD card.

              Regards,
              Pablo

              1 of 1 people found this helpful
              • 4. Re: Resize partition Linux eglibc
                BrechtW

                Thank you!

                 

                I'm no Linux user so what does this mean? Do I need tot change the path/parameters? Does this work on an existing image on a SD-card?

                 

                #on your laptop  
                sudo dcfldd if=~/Documents/intelGalileo/iot-devkit-201510010757-mmcblkp0-galileo.direct of=/dev/disk4  bs=8M statusinterval=4  
                
                

                 

                What do I need to do in GParted?

                • 5. Re: Resize partition Linux eglibc
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi BrechtW,

                   

                  You will be “installing” the file from your computer to the SD card. In his case, the SD card is located at dev/disk4, bs=8M and statusinterval=4 should remain the same. So in general, ‘if’ will be used to read the file to copy (the image in this case) and ‘of’ refers to the destination.
                  Once you have done that you need to launch GParted in your Linux system, select your SD card within the program and resize the root partition.
                  If you don’t want to go through the steps above, you can also use the uClibc image for which the original resize process should work just fine.

                  AshwinG, there shouldn’t be any issue with your process.

                   

                  Regards,
                  Pablo

                  1 of 1 people found this helpful
                  • 6. Re: Resize partition Linux eglibc
                    BrechtW

                    I need the eglibc because I need the mraa library.

                     

                    Where can I download the file iot-devkit-201510010757-mmcblkp0-galileo.direct ? Will I lose all my current files?

                    • 7. Re: Resize partition Linux eglibc
                      FGT

                      BrechtW wrote:

                       

                      I need the eglibc because I need the mraa library.

                       

                      Where can I download the file iot-devkit-201510010757-mmcblkp0-galileo.direct ?

                      https://software.intel.com/en-us/iot/hardware/galileo/downloads

                       

                      Fernando.

                      • 8. Re: Resize partition Linux eglibc
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hi BrechtW,

                        I believe your files will remain even if you resize your card. I would suggest you to check some GParted threads just to make sure, I’ve been doing this myself and people were able to keep their files.
                        Please let us know when you try it. It would be interesting to see how the process went.

                        Regards,
                        Pablo

                        • 9. Re: Resize partition Linux eglibc
                          jinzai

                          Yes, resizing the partition is only the first step -- you must also use the Galileo itself to resize the root filesystem to use the larger partition size. I found the procedure like many have -- by trying everything! I am going to document it and probably even serve it up from my Galileo.

                           

                          I made the card in Windows using Win32DiskImager, resized the partitions using MiniTool PartitionWizard Free (I created an additional partition for use as a sort of DMZ that is not part of the root.) and booted Galileo with that. Then, I used resize2fs /dev/mmcblk0p2 to resize the rootfs. On a 32GB card, I ended up with a 22GB root filesystem size. One thing that I want to share is -- Galileo will take a long time to boot the first time with that card before you resize the root filesystem. The resize also takes a very long time -- watch the SD light -- but don't let it hypnotize you. If you are using SSH or a terminal -- then you can use that to resize the file system. I am not sure if you can do that on another system.

                           

                          Use df -h to see that your root filesystem size is still 969MB, then you can replicate this image...minus the first two tries to use resize2fs, that is...haha. ;-)

                           

                          Galileo 22GB rootfs.png

                          1 of 1 people found this helpful
                          • 10. Re: Resize partition Linux eglibc
                            jinzai

                            Read my reply I just posted. Resizing the partition does not resize the filesystem that resides in that partition. resize2fs /dev/mmcblk0p2 is what does that and it is on the Galileo. It sounds to me like that is all you need to do for yours to work now.

                            • 11. Re: Resize partition Linux eglibc
                              jinzai

                              DD won't resize the filesystem, however.

                              • 12. Re: Resize partition Linux eglibc
                                jinzai

                                You shouldn't have to go to that extreme. You should be fine if you run (from some sort of terminal connected to your Galileo) resize2fs /dev/mmcblk0p2 on the normal image (But with a resized partition) you are currently using. The file you are seeking -- is actually the output of the Build process. The downloaded image files have a .DIRECT extension -- the Build images use the .ext3 extension. Unless you have the build systems working on your desktop, you won't have any files with an .ext3 extension.

                                 

                                Galileo DIRECT File Explorer.png

                                1 of 1 people found this helpful
                                • 13. Re: Resize partition Linux eglibc
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hi BrechtW,

                                  Have you been able to test the suggestions from jinzai? Let us know about the outcome.

                                  Regards,
                                  Charlie