Ubports not resizing to drive
#1
When writing the image to both my sd card or the emmc on my pinephone, ubports will not resize the file system to use the whole storage device. Instead it creates a 3.7gb partition with the rest as unpartitioned space. This results in me having no space to install or download anything. I have been playing around with fdisk and I just cannot get it to resize the partition to use the entire drive. Does anyone have an idea how to fix this?
#2
(02-09-2020, 12:43 AM)Some_Dood Wrote: When writing the image to both my sd card or the emmc on my pinephone, ubports will not resize the file system to use the whole storage device. Instead it creates a 3.7gb partition with the rest as unpartitioned space. This results in me having no space to install or download anything. I have been playing around with fdisk and I just cannot get it to resize the partition to use the entire drive. Does anyone have an idea how to fix this?

So what I did to work around this:

  1. Write image to sdcard with dd
  2. Open sdcard in parted (In my case: parted /dev/sdd)
  3. Resize partition with resizepart, picked 100% as new end of partition
  4. Ran resize2fs /dev/sdd1 to get the correct size
Should probably be noted that I did this on my computer I'm not sure how well it would do on the pinephone itself, well if you have another boot medium it should work fine.
#3
(02-09-2020, 12:43 AM)Some_Dood Wrote: When writing the image to both my sd card or the emmc on my pinephone, ubports will not resize the file system to use the whole storage device. Instead it creates a 3.7gb partition with the rest as unpartitioned space. This results in me having no space to install or download anything. I have been playing around with fdisk and I just cannot get it to resize the partition to use the entire drive. Does anyone have an idea how to fix this?

I tried using GPARTED in Arch and it wouldn't boot after that. I ended up just creating a second partition, formatting it as ext4, then mounting it in /home/phablet/storage

More explanation: The first time I tried to expand the partition was within ubports after boot. I used FDISK to delete / re-add the partition with max space figuring I'd used resize2fs. It "should have worked". When it didn't work I re-flashed the SDCARD then looked at the partition with FDISK again. I noticed the start sector was listed as 1953 but fdisk starts with 2048 and wouldn't let me override it. I didn't do any research as to why. I then tried using GPARTED and only changed the 'free space after' but it still wouldn't boot. I didn't try parted but will certainly do so.

I'll have to try what blambi did. Just my $.02 worth.
#4
Just use Etcher, it does all the work for you, it senses the size and sets it up correctly.
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
#5
(02-09-2020, 12:43 AM)Some_Dood Wrote: When writing the image to both my sd card or the emmc on my pinephone, ubports will not resize the file system to use the whole storage device. Instead it creates a 3.7gb partition with the rest as unpartitioned space. This results in me having no space to install or download anything. I have been playing around with fdisk and I just cannot get it to resize the partition to use the entire drive. Does anyone have an idea how to fix this?

If you use a gnome desktop on the machine you wrote the sd image on then the Disks utility resized it for me, just fine.
#6
(02-09-2020, 12:13 PM)blambi Wrote: So what I did to work around this:

  1. Write image to sdcard with dd
  2. Open sdcard in parted (In my case: parted /dev/sdd)
  3. Resize partition with resizepart, picked 100% as new end of partition
  4. Ran resize2fs /dev/sdd1 to get the correct size
Should probably be noted that I did this on my computer I'm not sure how well it would do on the pinephone itself, well if you have another boot medium it should work fine.

I actually just did this on the pinephone itself while the partition was mounted as / of the running system.  It worked surprisingly well.  It printed something about "on-line resizing" and then did exactly what it was supposed to without a hitch.  Very nice.
#7
(02-16-2020, 01:07 AM)iconoclast Wrote:
(02-09-2020, 12:13 PM)blambi Wrote: So what I did to work around this:

  1. Write image to sdcard with dd
  2. Open sdcard in parted (In my case: parted /dev/sdd)
  3. Resize partition with resizepart, picked 100% as new end of partition
  4. Ran resize2fs /dev/sdd1 to get the correct size
Should probably be noted that I did this on my computer I'm not sure how well it would do on the pinephone itself, well if you have another boot medium it should work fine.

I actually just did this on the pinephone itself while the partition was mounted as / of the running system.  It worked surprisingly well.  It printed something about "on-line resizing" and then did exactly what it was supposed to without a hitch.  Very nice.
+1
I dd the image from my running sdcard to emmc and used parted ok.

I appreciate the reasons for saying Etcher but usually studiously avoid mentioning it as iirc there is no aarch64 version. So to me pretty useless on my daily driver and my PinePhone.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
#8
I used fdisk in expert mode as per: https://superuser.com/questions/687200/s...at-the-sam
And do not forget to mark the partition as bootable.

d to delete the partition

n to create the new partition with the default start sector (2048) and the end sector you want. Remember that this change is pending until you write the partition table, so it doesn't matter it's not 1953 yet. Next give the command x which is

x extra functionality (experts only)

b move beginning of data in a partition
Using b, you will be allowed to input 1953.

r to return to main menu.

At this moment p should show you 1953 as the start sector. If everything looks fine, write changes to disk with w.
#9
(02-16-2020, 01:07 AM)iconoclast Wrote: I actually just did this on the pinephone itself while the partition was mounted as / of the running system.  It worked surprisingly well.  It printed something about "on-line resizing" and then did exactly what it was supposed to without a hitch.  Very nice.

Oh neat, didn't want to suggest something I had not tried myself, but yes it should be fine according to what I read regarding ext4.
#10
(02-12-2020, 12:09 AM)bcnaz Wrote: Just use Etcher, it does all the work for you, it senses the size and sets it up correctly.

  Try using 'Disks'  to resize,     After flashing your SD card
     It does not appear to change any of the contents when you resize up.
        >   Quick & Easy
This seems to work 'For Me'
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone UBPorts Edition stuck on PINE64 logo screen Giovanni Iannotti 4 4,723 09-01-2021, 01:20 PM
Last Post: Giovanni Iannotti
  online accounts in UBports Uturn 2 4,087 03-30-2021, 09:12 AM
Last Post: Uturn
  UBPorts Not Working Pinoideae 7 9,346 03-13-2021, 01:51 PM
Last Post: KNERD
  How to enable Ethernet with UBPorts and convergence dock? piney-tim 1 2,959 11-27-2020, 07:40 PM
Last Post: piney-tim
  UBPorts Convergence MonCon 0 2,286 11-24-2020, 04:25 PM
Last Post: MonCon
  Looks like I found a mild reason why UBPorts for pinephone hasn't seen much progress. plainenough 13 17,063 11-21-2020, 06:30 PM
Last Post: Nooblife
  "No network" on new UBPorts community edition pinephone professorsnapper 6 7,681 10-19-2020, 10:27 PM
Last Post: htc_tattoo
  UBPorts doesn't boot even after booting into recovery defekto 2 4,388 09-30-2020, 12:16 PM
Last Post: defekto
  Dekko on UBPorts PinePhone usable? djvinniev77 13 14,961 09-17-2020, 03:45 PM
Last Post: yurievitch
  How to enable SSH on UBPorts Ubuntu Touch? eaglecup 12 19,573 09-15-2020, 03:42 PM
Last Post: voidmain

Forum Jump:


Users browsing this thread: 1 Guest(s)