6 Replies Latest reply on May 7, 2015 4:56 AM by catmaker

    increase size of rootfs on Ubilinux

    kmacpher67

      Without having to create a new img and just using the ubilinux standard install, I'm trying to increase the /dev/root rootfs partition space and file system size. Performed all of these commands as single user root using shutdown now

       

      When I run fdisk /dev/mmcblk0

      WARNING: GPT (GUID Partition Table) detected on '/dev/mmcblk0'! The util fdisk doesn't support GPT.

      Use GNU Parted.

       

      SO I run the command:  # parted /dev/mmcblk0

       

      resize 8 67.1MB  1999MB

       

      Error: Partition /dev/mmcblk0p8 is being used. You must unmount it before you

      modify it with Parted.

       

      umount everything I can think of:

       

      umount /dev/root

      umount /dev/mmcblk0p8

      umount /

       

      Is it possible to increase or resize the root file system to add another 100-200MB from the /home/ file system.

       

      My plan was to reduce the /home from 1.6G to 1.3. Just to make sure that I'm not running razor thin free space.

      /dev/mmcblk0p10  1.6G  2.4M  1.6G   1% /home

       

      I'm not a linux expert so please be fairly specific.

        • 1. Re: increase size of rootfs on Ubilinux
          kmacpher67

          Somebody else posted on another thread asking if I need to rm the /home partititions etc. yes, I do and have done that.

           

          The truth of the matter is that 60MB is survivable. I've got another 200MB in /var/cache that I could scavenge up, but then apt-get would be skunky. I just want to avoid problems and have this run without wicked root file system space running out.  IMHO and experience really bad stuff happens when rootfs runs out of space. I can run the mono code on another drive off the sdcard but that would still log and other stuff back to /var/log and god knows what.  At first I thought, I'd like a little head room in root because I don't want later problems, I ping one of my old buddies who's a linux sys-admin god, he's like yeah, no problem. But then, he's not used to working with non-bios no boot loader hellish yacto crazy embedded systems either.  So what seems like a 5 minute fix in gparted in Lunbuntu is now a few hours of aggravation.

           

          I even tried to boot a spare system in Lunbutu off a CD-rom and use gparted from there to connect to the microUSB drive, but that didn't go so well either.

           

          The crazy thing is that the default Yucko Linux install fdisk works fine for partitioning, but the UbiLinux guys decided on Gparted partitions.  I just want to run my .NET programs on a Intel Edison and this has turn into a Bataan death march through linux sys-admin hell. Almost makes you appreciate all the crap from msft.  (NOTE: I never tried modifying the rootfs on the old Yucko default linux install, but I did modify some of the fs stuff, maybe this problem exists on that one too, but most of the linux samples discuss doing this live hot using fdisk.)

           

          I got tired of having to rescue the lost partitions after deleting them, but I've done that too. Same error.

          rm 10

          rm 9

          then after i get the error I'd have to re-add them back. I used rescue cause I wasn't comfortable with creating a new mkfs or what ever command it is, or mkpart or mkpartfs.

          rescue 1678MB  2215MB

          rescue 2215MB  3909MB

          name 9 update

          name 10 home


          The error is the same either way, if the space isn't available cause the other partitions are in the way, it would be a different error message like "can't have overlapping partitions" or something. That's what I'm betting, in any case, I tried it with them deleted and same error.

          • 2. Re: increase size of rootfs on Ubilinux
            kmacpher67

            So the answer might be it can't be done. In the mean time, pivot and back to original task.

             

            move this directory in var over: . 260M    /var/cache to /home.

             

            mv /var/cache /home

            cd /var

            ln -sf /home/cache cache

             

            easy way:  now it's happy.

             

            root@ubilinux:/var# df -h

            Filesystem       Size  Used Avail Use% Mounted on

            rootfs           1.4G  991M  325M  76% /

            /dev/root        1.4G  991M  325M  76% /

            ..

            /dev/mmcblk0p10  1.6G  262M  1.3G  17% /home

             

            Yup, they are all over there in /home.

             

            root@ubilinux:/var# du -sh /var/cache/*

            256M    /var/cache/apt

            2.3M    /var/cache/debconf

            36K     /var/cache/dictionaries-common

            28K     /var/cache/fontconfig

            32K     /var/cache/ldconfig

            1.4M    /var/cache/man

            • 3. Re: increase size of rootfs on Ubilinux
              John_Quin

              Thanks for the work around.

              I'm was having this trouble too.

              Let's hope there is a way to choose what size the partitions are in future.

              • 4. Re: increase size of rootfs on Ubilinux
                kmacpher67

                oh yeah, it's called screw with the impossible non-trivial yocto crap. ugh.

                I'm getting desperate for space again, as I'm pushing the more stuff to the local /sdcard

                I tried to install   apt-get install  gtk+2.0

                and it was another After this operation, 724 MB of additional disk space will be used.

                ouch. So now I'm contemplating using the extra plugged in sdcard.

                All this to get EMGU/OPENCV running on the Edison.

                • 5. Re: increase size of rootfs on Ubilinux
                  mmi

                  "oh yeah, it's called screw with the impossible non-trivial yocto crap. ugh."

                  • 6. Re: increase size of rootfs on Ubilinux
                    catmaker

                    Hi, first posting here.

                     

                    "move this directory in var over: . 260M    /var/cache to /home."

                     

                    I also find /usr/share takes up a lot of space in ubilinux -- about 375M -- I am following your technique of moving this directory to /home.

                    Let me test for any instability, and I will write here again after weekend.

                     

                    Thanks.