UPDATED (June 2021): 17-distro multi-boot image for Pinephone (incl. 3GiB variant)
#13
(09-09-2020, 11:50 PM)ikidd Wrote: I've dd or etchered this a few times now, and I can't get gparted or kde partition manager to resize the btrfs partition.  There's always bad tree blocks during the partition check prior to resizing that error it.  I've done a scrub on the mounted partition and it says it fixes errors, but still fails.

Any ideas how to expand this so the operating systems on the image don't die within a few minutes from disk space issues?
Let me try (you can of course do this from a PC using a SD card reader, just change the device from /dev/mmcblk0 to something else):

# resize partition, dry run

echo ", +" | sfdisk -n -N 2 /dev/mmcblk0

Quote:Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x12345678

Old situation:

Device        Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  262143  253952  124M 83 Linux
/dev/mmcblk0p2      262144 15359999 15097856  7.2G 83 Linux

/dev/mmcblk0p2:
New situation:
Disklabel type: dos
Disk identifier: 0x12345678

Device        Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  262143  253952  124M 83 Linux
/dev/mmcblk0p2      262144 62333951 62071808 29.6G 83 Linux
The partition table is unchanged (--no-act).


# verify changes look sane, and do a real resize

echo ", +" | sfdisk -N 2 /dev/mmcblk0

# resize filesystem

mount /dev/mmcblk0p2 /mnt
btrfs filesystem resize max /mnt
df -h

# /dev/mmcblk0p2  30G  6.6G  24G  23% /mnt

umount /mnt

# and that's all Smile

# btrfs check seems to succeeed without issues on the resized filesystem

btrfs check /dev/mmcblk0p2
Quote:Opening filesystem to check...
Checking filesystem on /dev/mmcblk0p2
UUID: 0cb50b0b-77a3-45bd-a605-857472b88281
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 6970880000 bytes used, no error found
total csum bytes: 6340868
total tree bytes: 471728128
total fs tree bytes: 443301888
total extent tree bytes: 20905984
btree space waste bytes: 63863678
file data blocks allocated: 6499180544
referenced 14152331264

Here's a better formatted guide: https://xnux.eu/log/#010
  Reply


Messages In This Thread
RE: 9-distro multi-boot image for Pinephone 1.2 (incl. 3GiB variant) - by megous - 09-10-2020, 03:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  eSIM on PinePhone just_a_q 8 4,671 11-05-2024, 11:10 AM
Last Post: zetabeta
  How boot Alpine Linux realroot 4 659 11-02-2024, 01:00 PM
Last Post: linmob
  Want to buy second hand PinePhone 3G version rudi.timmermans 0 170 11-01-2024, 09:58 AM
Last Post: rudi.timmermans
  Can use PlayStation on Pinephone? willharper 6 5,659 10-30-2024, 08:07 AM
Last Post: biketool
  Ordered PinePhone till today have no info or confirmation about order hennadiyt 1 352 10-05-2024, 02:20 PM
Last Post: KC9UDX
  Tow boot MTXP 5 1,593 08-22-2024, 03:11 AM
Last Post: Pavlos1
  US Mobile, via T-Mobile, won't support Pinephone Pro - SOLVED, SIMPLY jovval 11 5,759 07-28-2024, 03:42 PM
Last Post: dchang0
  How can I record video on a Pinephone? kk22 18 7,154 07-22-2024, 05:18 PM
Last Post: baptx
  Pinephone not booting, always vibrating alexander12 8 6,867 07-19-2024, 07:50 PM
Last Post: Blackheart
  PinePhone Pro P. Siera 2 821 07-17-2024, 12:41 AM
Last Post: P. Siera

Forum Jump:


Users browsing this thread: 38 Guest(s)