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

Partition 44 does not start on physical sector boundary

Scheduled Pinned Locked Moved Support
meizu pro 5
16 Posts 7 Posters 2.5k Views 4 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.
    • T Offline
      toddvarg
      last edited by 25 Aug 2018, 17:45

      I have changed the partition 42 and 43 to 300 m and 714, but in the end I got an error on partition 44, that I didn't touch.

      0_1535219106368_Skærmbillede fra 2018-08-25 19-43-49.png

      1 Reply Last reply Reply Quote 0
      • F Offline
        flohack
        last edited by 25 Aug 2018, 20:34

        Without telling us what you want to do its hard to find the right person that might have an answer...

        My languages: 🇦🇹 🇩🇪 🇬🇧 🇺🇸

        1 Reply Last reply Reply Quote 0
        • M Offline
          Marathon2422
          last edited by 25 Aug 2018, 21:27

          /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 790000 69105 270M Microsoft basic data
          /dev/block/sda43 790016 1031167 241152 942M Microsoft basic data
          /dev/block/sda44 1031168 7633914 6602747 25.2G Microsoft basic data

          this is what my Pro5 32g ,looks like ,if that helps

          1 Reply Last reply Reply Quote 0
          • T Offline
            toddvarg
            last edited by 25 Aug 2018, 21:29

            I solved the issue by changing the size of sda42 from 300M to 324M and sda43 from 724M to 700M. I'm trying to install ubuntu 16.04 dev on meizu 5, and to do that, as far as I have read, I have to change the size of sda43 to at least 700M

            M 1 Reply Last reply 25 Aug 2018, 21:33 Reply Quote 0
            • M Offline
              Marathon2422 @toddvarg
              last edited by 25 Aug 2018, 21:33

              @toddvarg
              mine was UBUNTU originaly, i did mine to help with the "cache "
              i guess you will flash ubuntu -touch ,then flash UBports: have fun

              1 Reply Last reply Reply Quote 0
              • N Offline
                neopar
                last edited by 25 Aug 2018, 21:37

                This error messages says that partition is not aligned. Basically the adress must be divisible by the block size.

                1 Reply Last reply Reply Quote 0
                • T Offline
                  toddvarg
                  last edited by 25 Aug 2018, 21:49

                  I have an up and running ubuntu phone with 15.04, but would like to install 16.04 to try anbox. I tried to install 16.04 with ubport, but didn't succeed. It gave me this error and I both have the latest installer and the right size cache

                  0_1535233698369_Skærmbillede fra 2018-08-25 23-47-07.png

                  1 Reply Last reply Reply Quote 1
                  • T Offline
                    toddvarg
                    last edited by 25 Aug 2018, 22:22

                    I solved the flashing of 16.04 with this solution given by @Stefano Re: problems flashing UBports on Meizu PRO 5 (Android international edition), where he gives the link to a restore file https://drive.google.com/file/d/1e91EPP0RfP3T8xFsNH26f4ORNeJbz__A/view?usp=sharing for 16.04. Thanks @Stefano for the file.

                    1 Reply Last reply Reply Quote 1
                    • D Offline
                      doniks
                      last edited by doniks 27 Aug 2018, 08:19

                      @toddvarg Happy to hear you managed to install it.

                      I am intrigued by the story that seemingly you took a partition editor to your device and actually changed the layout. And the device survived 🙂

                      Would you mind sharing as much detail as you can about what exactly you did and how you did it exactly?

                      Paste full commands you executed and full outputs. Which device? Which recovery? Which partition editor? What was the original layout? What is the final layout? In the first post you said 714, but the picture shows 724.

                      A 1 Reply Last reply 27 Aug 2018, 08:43 Reply Quote 0
                      • A Offline
                        advocatux @doniks
                        last edited by 27 Aug 2018, 08:43

                        @doniks talking about creative solutions https://github.com/ubports/ubports-installer/issues/420#issuecomment-416075663 🙂

                        D 1 Reply Last reply 27 Aug 2018, 10:04 Reply Quote 0
                        • D Offline
                          doniks @advocatux
                          last edited by 27 Aug 2018, 10:04

                          @advocatux said :

                          talking about creative solutions

                          Not bad, not bad. But still, changing the actual layout is more ballsy 🙂

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            toddvarg
                            last edited by toddvarg 31 Aug 2018, 01:34

                            I wish I could say I was clever enough to fix this by my self, but I had some or a lot of help. I read this tread https://forums.ubports.com/topic/927/how-to-increase-cache-partition-or-any-partition-on-ubuntu-touch-phone-question/2 and I read a more easier explanation given by @Stefano

                            The only thing I added was how to find the right size by using a Equation instead of guessing. Where the X is the new end in sda42
                            0_1535678808922_ligning.png

                            Sadly, my journey with the pro 5 came to a halt, because my 26 year old daughter needed a phone and she wanted to have it with android. But I have gotten hold of a aquaris 4.5, and maybe I will try the same trick with this one, and see how it works out.

                            l--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------l

                            explanation by @Stefano
                            *****@Stefano 21 May 2018, 09:53
                            yeah, that's an advanced procedure, don't know if you're familiar with fdisk and gparted , but if you read that post carefully first, it will shed some light on you.
                            You need to reboot to TWRP recovery and adb shell from your PC.
                            You need to decrease the size of partition 42 ( sda 42 )(custom)

                            /dev/block/sda42 720896 797700 76805 300M Linux filesystem
                            /dev/block/sda43 851968 983039 131072 512M Microsoft basic data
                            /dev/block/sda44 983040 7633914 6650875 25.4G Microsoft basic data

                            and increase the size of partition 43(sda43) (cache)

                            I decreased the 42 to 300M and increased 43 to 700 (-ish) and 16.04 installed without any issue then

                            In your case the partitions start and end block will be different as you have 64Gb version of PRO5, but that's not an issue.

                            Just follow the instrucions ;

                            reboot to TWRP,
                            In terminal on your PC write;

                            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

                            type: fdisk
                            type: fdisk /dev/block/sda

                            type: m
                            Now you should be in the menu of FDISK utility,

                            have a look at the commands.

                            type: p

                            the output should be your phone partition table, copy it and save it to Libre Office writer or whatever you want( gedit...etc)

                            Now you can see your partitions 42 and 43 which are of your interest.
                            You need to decrease the size of 42 and increase 43.
                            About 725M for partition of 43 would suffice, but you can give it more if you'd like.
                            Remember what you add to 43 you need to take from 42.

                            Here is my table for comparison only:

                            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 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

                            NOW, delete the 42 partition by typing: d
                            it should ask you the number of partition
                            Command (m for help): d
                            Partition number (1-3,21-33,41-44, default 44): 42

                            Partition 42 has been deleted.

                            Now you need to create a new 42 partition with smaller size
                            type: n
                            it will ask you for a partition number and you'll type 42
                            now it's asking for a first sector and you'll need to calculate the size as your 64Gb phone has a different partition table as mine 32Gb.

                            the first sector should stay the same, just press enter on keyboard,
                            the end sector you'll need to try to guess it. I've used end sector of 790000 instead of 810000, thus gaining some space for partition 43, but you'll need to try it on you own.
                            NO WORRIES, unless you save it, it won't be set, you can try it again and again, just by pressing q and enter
                            Then again typing: fdisk /dev/block/sda
                            and you'll be in the fdisk menu again, without any changes to the partition table, you can verify this by typing: p
                            I know it's a good game to try to guess the partition size, I've gone through that as well.

                            Anyway, when you finally manage to set the right end sector of partition 42, you'll need to change the partition type as at the moment is LINUX FILE SYSTEM and we nee a MICROSOFT BASIC DATA ( or type 6 )
                            In order to do that, type command : t
                            It will ask you for a partition No, you type: 42
                            Now it will ask for a type of the partition 42
                            type in: l
                            It will list all known file types, as you can see we need the No. 6 or MICROSOFT basic data
                            type: 6
                            Changed type of partition 'Linux filesystem' to 'Microsoft basic data'.

                            Now go back and verify that by typing: p

                            it should list again the partition table with changed 42 partition size and file type.

                            You'll need to verify this by typing: v

                            See something like this?
                            Command (m for help): v
                            No errors detected.
                            Header version: 1.0
                            Using 20 out of 128 partitions.
                            A total of 11386 free sectors is available in 3 segments (the largest is 38 MiB).
                            So it's verified.

                            Now type: x
                            It will take you to expert menu/mode.
                            You'll need to change the name of the partition 42 to ''custom''
                            To do that, type: m

                            This should appear on you Terminal:

                            Expert command (m for help): m

                            Help (expert commands):

                            GPT
                            i change disk GUID
                            n change partition name
                            u change partition UUID
                            M enter protective/hybrid MBR

                            A toggle the legacy BIOS bootable flag
                            B toggle the no block IO protocol flag
                            R toggle the required partition flag
                            S toggle the GUID specific bits

                            Generic
                            p print the partition table
                            v verify the partition table
                            d print the raw data of the first sector from the device
                            D print the raw data of the disklabel from the device
                            f fix partitions order
                            m print this menu

                            Save & Exit
                            q quit without saving changes
                            r return to main menu

                            O.K ,type: n
                            type:42

                            Give it a new name as prompted.
                            Type: custom

                            Now type: r
                            it takes you back to main menu of FDISK utility.

                            Type: w
                            it writes the changes and saves them.
                            Now you should be back in adb shell as root@localhost #
                            Good,
                            you'll need to format the newly created partition of 42, by typing:
                            mke2fs -t ext4 -m 0 /dev/block/sda42

                            This should look the output like:

                            root@localhost:/# mke2fs -t ext4 -m 0 /dev/block/sda42
                            mke2fs 1.42.12 (29-Aug-2014)
                            /dev/block/sda42 contains a ext4 file system
                            created on Fri Jan 26 19:09:44 2018
                            Proceed anyway? (y,n) y
                            Discarding device blocks: done
                            Creating filesystem with 76805 4k blocks and 76896 inodes
                            Filesystem UUID: f7f0db2f-b0e9-4bf7-bf94-ae843a409094
                            Superblock backups stored on blocks:
                            32768

                            Allocating group tables: done
                            Writing inode tables: done
                            Creating journal (4096 blocks): done
                            Writing superblocks and filesystem accounting information: done

                            Now to verify if the partition 42 has been decreased in size, reboot the phone to TWRP recovery and again do this steps:

                            adb shell

                            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 go back to fdisk utility by typing: fdisk /dev/block/sda

                            and verify the changes in partition 42 by typing: p

                            You should see the partition 42( sda42) decreased in size
                            If true, congratulation, now to increase the partition 43 (sda43) which is our main interest off course.

                            Go back and do the same steps for partition 43 ,delete it, create it, increase the size, change the name to ''cache'', save it, then format it, verify , just like with the partition 42.

                            I guess you'll be busy today 🙂 Have fun.

                            Pro 5*****

                            D 1 Reply Last reply 31 Aug 2018, 07:02 Reply Quote 2
                            • D Offline
                              doniks @toddvarg
                              last edited by 31 Aug 2018, 07:02

                              @toddvarg Thanks for sharing. Much appreciated! That makes the answers to most of my questions: pro 5, twrp and fdisk 🙂

                              Does someone know why different partition sizes caused a "physical sector boundaries" error while others didn't? Especially, since it seems you did take proper care to not have them overlap.

                              Also, I'm wondering why there are gaps in the allocated space (e.g., from sector 1408 until 2047)? What is in there? Magic Android stuff?

                              Relatedly, how does the device end up with a gap in partition numbers (e.g., no partitions sda4 through sda20)? Maybe the manufacturer first created those 17 partitions and later deleted them from the partition table?!

                              1 Reply Last reply Reply Quote 1
                              • arubislanderA Offline
                                arubislander
                                last edited by 1 Sept 2018, 07:29

                                @doniks said in Partition 44 does not start on physical sector boundary:

                                Does someone know why different partition sizes caused a "physical sector boundaries" error while others didn't? Especially, since it seems you did take proper care to not have them overlap.

                                Yes, the starting sector of the partitions has to be evenly divisible by 256. If you take that into consideration, together with @toddvarg's equation, all the guesswork is eliminated.

                                🇦🇼 🇳🇱 🇺🇸 🇪🇸
                                Happily running Ubuntu Touch
                                Google Pixel 3a (20.04 DEV)
                                JingPad (24.04 preview)
                                Meizu Pro 5 (16.04 DEV)

                                D 1 Reply Last reply 1 Sept 2018, 15:43 Reply Quote 1
                                • D Offline
                                  doniks @arubislander
                                  last edited by 1 Sept 2018, 15:43

                                  @arubislander said in Partition 44 does not start on physical sector boundary:

                                  @doniks said in Partition 44 does not start on physical sector boundary:

                                  Does someone know why different partition sizes caused a "physical sector boundaries" error while others didn't? Especially, since it seems you did take proper care to not have them overlap.

                                  Yes, the starting sector of the partitions has to be evenly divisible by 256.

                                  Interesting. Why? Is it a limit of fdisk tool or would anything in linux/android go wrong? sda3 doesn't start at a multiple of 256.

                                  arubislanderA 1 Reply Last reply 4 Sept 2018, 05:50 Reply Quote 0
                                  • arubislanderA Offline
                                    arubislander @doniks
                                    last edited by arubislander 9 Apr 2018, 07:02 4 Sept 2018, 05:50

                                    @doniks excellent point, well spotted. I suppose the correct number is 64 then, not 256 as previously stated by me.
                                    Why this is so? Might have something to do with block size. But I haven't done proper research to know for sure.

                                    EDIT: Turns out the fdisk man page talks about tracks and sectors. 1 track consisting of 63 sectors by default. Partitions are not allowed to span tracks, i.e. the number if tracks in a partition must be an integer value.

                                    🇦🇼 🇳🇱 🇺🇸 🇪🇸
                                    Happily running Ubuntu Touch
                                    Google Pixel 3a (20.04 DEV)
                                    JingPad (24.04 preview)
                                    Meizu Pro 5 (16.04 DEV)

                                    1 Reply Last reply Reply Quote 1
                                    7 out of 16
                                    • First post
                                      7/16
                                      Last post