terminal command for sd card size
#4
(03-03-2020, 08:27 AM)Danny Wrote: I'm looking for the same thing.

I have no computer, replaced it with a smartphone over a decade ago, even then it was Win95,98,XP followed by about six months of Ubuntu and thanks to Synaptic Package Manager, I only used the terminal maybe half a dozen times. A record I beat with the Pinephone simply by turning it off ($ sudo poweroff) as I can't find any other way.

I thought I found the solution with parted ($ sudo parted)  I think it came preinstalled, unless it was installed as a dependency by something else I installed. I'm assuming these operations need administrator privileges.
In parted I tried the print command which revealed partition 2 was what I probably wanted to resize.
Then I used the resizepart command and then entered 2.

It then prompted me for an end size, with the current size in brackets, something like [1120MB] I entered 14GB
Then I entered the print command again, which revealed the resized partition.

I tried again, but entered 200GB (it's a 256GB sdcard) which failed. Disk /dev/mmcblk2 evidently is the 16GB emmc storage.

I assume the command: select /dev/mmcblk? would get me on the right track, what is the microsdcard labelled as in postmarketos on a Pinephone?

IIRC the SDcard is /dev/mmcblk0 - try lsblk command which will show what you have.

In parted 100% as the end sector should fill the disk.

Overall trying to re-size the disk you (or more particularly I think pnphn) are running from is way beyond my skills as I think you need to have it unmounted during the resize, which is tricky if it is your root partition. Although, Linux being what it is, I think in fact it can be done with some extreme sleight of hand. Of course booting from SDcard and installing to eMMC and then re-sizing eMMC before you boot from it is fine.
  • 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


Messages In This Thread
terminal command for sd card size - by pnphn - 02-22-2020, 03:03 AM
RE: terminal command for sd card size - by Danny - 03-03-2020, 08:27 AM
RE: terminal command for sd card size - by dukla2000 - 03-03-2020, 10:59 AM
RE: terminal command for sd card size - by Danny - 03-04-2020, 05:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I get the permissions to write to the external SD card ...? Peter Gamma 9 1,711 10-20-2023, 12:32 PM
Last Post: Peter Gamma
  How to write the the external SD card with Abword? Peter Gamma 0 450 08-27-2023, 01:10 AM
Last Post: Peter Gamma
  How can I open an Abiword file from an external SD card with Abiword? Peter Gamma 5 2,031 08-25-2023, 02:05 AM
Last Post: Peter Gamma
  Help how to mount SD-Card chadwick 8 7,670 11-30-2021, 11:12 PM
Last Post: chadwick
  Terminal password difficulty Hobbes42 2 3,363 10-18-2020, 08:24 AM
Last Post: Hobbes42
  PP boots into factory test even if flashed sd card is inserted hapster 5 6,478 04-13-2020, 02:34 PM
Last Post: MartijnBraam
  terminal application disappeared from app drawer (pmos+phosh) nieral 5 7,238 03-31-2020, 01:58 PM
Last Post: Seferi
  Root FS partition size Zweitaktmotor 1 2,543 02-12-2020, 06:03 PM
Last Post: dukla2000

Forum Jump:


Users browsing this thread: 1 Guest(s)