• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to increase cache partition ( or any partition ) on Ubuntu Touch phone? Question.

Scheduled Pinned Locked Moved Support
21 Posts 3 Posters 7.5k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Marathon2422 @Stefano
      last edited by 24 Jan 2018, 18:07

      @stefano did you flash ubuntu touch first and then flash 15.04…or 16.04. as flashing U T first sorts out the partition

      S 2 Replies Last reply 24 Jan 2018, 18:12 Reply Quote 0
      • S Offline
        Stefano @Marathon2422
        last edited by 24 Jan 2018, 18:12

        @marathon2422 I have tried to flash 16.04 version 14 and it fails at recovery. The version 1 I installed without any problem, but this version 14 and also later ones doesn't. Same message in recovery, contact support.
        15.04 install without any issue.

        1 Reply Last reply Reply Quote 0
        • S Offline
          Stefano @Marathon2422
          last edited by 24 Jan 2018, 18:13

          @marathon2422 what did you mean the flashing UT sorts out partition?

          1 Reply Last reply Reply Quote 0
          • M Offline
            mihael
            last edited by mihael 2 Aug 2019, 21:55 25 Jan 2018, 10:29

            The way I did it (taking space from the 'custom' partition and adding it to the 'cache' partition):

            • it is not possible to do it from inside ubuntu so you need to install twrp and reboot that
            • now the fdisk inside twrp is too weak and cannot help us so mount the ubuntu system now which contains the fdisk we need:
            mount /dev/block/sda41 /system
            mount -t proc proc /system/proc
            mount -t sysfs sys /system/sys
            mount -o bind /dev /system/dev
            chroot /system /bin/bash
            
            • now we have an fdisk that can do this:
            • fdisk: delete the 'custom' partition (partition 42 for my meizu pro 5)
            • fdisk: create the 'custom' partition with a smaller size (I calculated: 512 - (700 - 512) = 512 - 188 = 324MB so that 188 would be available to add to the current size of the 'cache' partition)
            • parted: give name 'custom' to the newly created partition name 42 custom
            • format that partition: mke2fs -t ext4 -m 0 /dev/block/sda42 - now, from what I understand from my notes, that didn't work so I had to reboot in twrp and then it worked
            • check if you want with df -h that you have a smaller 'custom' partition
            • check if you want that you can boot your phone and everything is ok
            • now repeat the above instructions for booting the twrp recovery and then mounting the ubuntu system
            • now repeat the above instructions do delete and recreate the 'cache' partition with a bigger size and then format it:
            • fdisk: delete 43 (that is the number of my cache partition on my meizu pro 5)
            • fdisk: recreate 43 - with the max size - I decreased the 'custom' partition so that the new 'cache' would be 700MB
            • parted: name 43 cache
            • reboot in twrp and format it: mke2fs -t ext4 -m 0 /dev/block/sda43
            • df -h or sudo parted -l - there you go!
            S 2 Replies Last reply 25 Jan 2018, 19:10 Reply Quote 1
            • S Offline
              Stefano @mihael
              last edited by 25 Jan 2018, 19:10

              @mihael I'll give it a try. Thanks.

              1 Reply Last reply Reply Quote 0
              • S Offline
                Stefano @mihael
                last edited by 25 Jan 2018, 20:27

                @mihael I think I managed to do that. How would I verify how big my cache is now?

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mihael
                  last edited by 25 Jan 2018, 20:30

                  Oh, with df -h

                  S 2 Replies Last reply 25 Jan 2018, 20:31 Reply Quote 0
                  • S Offline
                    Stefano @mihael
                    last edited by 25 Jan 2018, 20:31

                    @mihael with adb shell or ?

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Stefano @mihael
                      last edited by 25 Jan 2018, 20:33

                      @mihael /dev/disk/by-partlabel/cache 496M 4.2M 482M 1% /android/cache what that means ??? Cos I changed it to 700 and saved it that way.

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mihael
                        last edited by 25 Jan 2018, 20:35

                        From terminal even...

                        I don't know... Mine shows

                        /dev/disk/by-partlabel/cache     679M  768K  664M   1% /android/cache
                        
                        S 1 Reply Last reply 25 Jan 2018, 20:43 Reply Quote 0
                        • S Offline
                          Stefano @mihael
                          last edited by Stefano 25 Jan 2018, 20:43

                          @mihael for some reason it did not change/save even after I saved id with w and rebooted and formated the cache ???
                          Device Start End Sectors Size Type
                          /dev/block/sda1 1024 1279 256 1M Microsoft basic data
                          /dev/block/sda2 1280 1343 64 256K Microsoft basic data
                          /dev/block/sda3 1344 1407 64 256K Microsoft basic data
                          /dev/block/sda21 2048 3071 1024 4M Microsoft basic data
                          /dev/block/sda22 3072 5119 2048 8M Microsoft basic data
                          /dev/block/sda23 5120 5631 512 2M Microsoft basic data
                          /dev/block/sda24 5632 6655 1024 4M Microsoft basic data
                          /dev/block/sda25 6656 7679 1024 4M Microsoft basic data
                          /dev/block/sda26 7680 13823 6144 24M Microsoft basic data
                          /dev/block/sda27 13824 22015 8192 32M Microsoft basic data
                          /dev/block/sda28 22016 30207 8192 32M Microsoft basic data
                          /dev/block/sda29 30208 35327 5120 20M Microsoft basic data
                          /dev/block/sda30 35328 40447 5120 20M Microsoft basic data
                          /dev/block/sda31 40448 45567 5120 20M Microsoft basic data
                          /dev/block/sda32 45568 50687 5120 20M Microsoft basic data
                          /dev/block/sda33 50688 55807 5120 20M Microsoft basic data
                          /dev/block/sda41 65536 720895 655360 2.5G Microsoft basic data
                          /dev/block/sda42 720896 851967 131072 512M Microsoft basic data
                          /dev/block/sda43 851968 983039 131072 512M Microsoft basic data
                          /dev/block/sda44 983040 7633914 6650875 25.4G Microsoft basic data

                          But when I saved it the table was this:

                          dev/block/sda21 2048 3071 1024 4M Microsoft basic data
                          /dev/block/sda22 3072 5119 2048 8M Microsoft basic data
                          /dev/block/sda23 5120 5631 512 2M Microsoft basic data
                          /dev/block/sda24 5632 6655 1024 4M Microsoft basic data
                          /dev/block/sda25 6656 7679 1024 4M Microsoft basic data
                          /dev/block/sda26 7680 13823 6144 24M Microsoft basic data
                          /dev/block/sda27 13824 22015 8192 32M Microsoft basic data
                          /dev/block/sda28 22016 30207 8192 32M Microsoft basic data
                          /dev/block/sda29 30208 35327 5120 20M Microsoft basic data
                          /dev/block/sda30 35328 40447 5120 20M Microsoft basic data
                          /dev/block/sda31 40448 45567 5120 20M Microsoft basic data
                          /dev/block/sda32 45568 50687 5120 20M Microsoft basic data
                          /dev/block/sda33 50688 55807 5120 20M Microsoft basic data
                          /dev/block/sda41 65536 720895 655360 2.5G Microsoft basic data
                          /dev/block/sda42 720896 797700 76805 300M Microsoft basic data
                          /dev/block/sda43 797952 983039 185088 723M Microsoft basic data
                          /dev/block/sda44 983040 7633914 6650875 25.4G Microsoft basic data

                          SO WHAT NOW, WHY IT DID NOT SAVE???

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            mihael
                            last edited by 25 Jan 2018, 21:26

                            I'm sorry, I really don't know... Maybe it's some linux issue that someone with more experience could shed light upon...

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              mihael
                              last edited by 25 Jan 2018, 22:16

                              What does df -h from twrp console show?

                              S 2 Replies Last reply 26 Jan 2018, 07:28 Reply Quote 0
                              • S Offline
                                Stefano @mihael
                                last edited by Stefano 26 Jan 2018, 07:28

                                @mihael Did you do it on the phone TWRP terminal or via adb? I mean the whole repartitioning. Cos I have used adb shell for it.

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  Stefano @mihael
                                  last edited by 26 Jan 2018, 07:29

                                  @mihael /dev/disk/by-partlabel/cache 496M 4.2M 482M 1% /android/cache

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    mihael
                                    last edited by 26 Jan 2018, 08:12

                                    @Stefano I believe I did it through ssh...

                                    S 1 Reply Last reply 26 Jan 2018, 08:39 Reply Quote 0
                                    • S Offline
                                      Stefano @mihael
                                      last edited by 26 Jan 2018, 08:39

                                      @mihael I give it a try again later, maybe I'll figure it out. (will try with TWRP terminal as well)

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        mihael
                                        last edited by 26 Jan 2018, 08:48

                                        Let me know...

                                        S 1 Reply Last reply 26 Jan 2018, 19:56 Reply Quote 0
                                        • S Offline
                                          Stefano @mihael
                                          last edited by 26 Jan 2018, 19:56

                                          @mihael I managed to do it. The problem was that I did not format the newly created partitions properly and did not change the names of them as I did not seen such an option in fdisk , but, there is an expert menu under ,x, and there is option to rename. After I renamed it, I format it and now it shows partition 43 = 723m, so I think that should suffice. Will try now to flash 16.04 now, we'll see what happens now! Thank you a lot for your help.

                                          Edit. It flashed 16.04 without failing in recovery πŸ™‚ πŸ™‚ πŸ™‚

                                          1 Reply Last reply Reply Quote 0
                                          • M Offline
                                            mihael
                                            last edited by 26 Jan 2018, 20:42

                                            @Stefano Wonderful!!! Thank you too for all your posts!

                                            1 Reply Last reply Reply Quote 1
                                            11 out of 21
                                            • First post
                                              11/21
                                              Last post