pmboostrap to emmc
#1
In order to install PostmarketOS on EMMC, Pinephone page on postmarketos' wiki instruct to run the following :


Code:
pmbootstrap install --sdcard=/dev/mmcblk(...)


I currently run postmarketOS from SD card (not the demo image, but current release), and still have stock test image on EMMC. The partitions looks as follow :

Code:
sudo ls /dev/mmcblk*
/dev/mmcblk0    /dev/mmcblk0p2    /dev/mmcblk2boot0  /dev/mmcblk2p1
/dev/mmcblk0p1    /dev/mmcblk2    /dev/mmcblk2boot1  /dev/mmcblk2p2

when I try to run :


Code:
pmbootstrap install --sdcard=/dev/mmcblk


I get the following error :


Code:
.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
(006470) [10:30:29] NOTE: (1/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (2/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (3/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (4/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (5/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (6/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (7/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (8/20) failed to find the install partition. Retrying...
(006470) [10:30:29] NOTE: (9/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (10/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (11/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (12/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (13/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (14/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (15/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (16/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (17/20) failed to find the install partition. Retrying...
(006470) [10:30:30] NOTE: (18/20) failed to find the install partition. Retrying...
(006470) [10:30:31] NOTE: (19/20) failed to find the install partition. Retrying...
(006470) [10:30:31] NOTE: (20/20) failed to find the install partition. Retrying...
(006470) [10:30:31] ERROR: Unable to find the partition prefix, expected the first partition of /dev/mmcblk1 to be located at /dev/mmcblk11 or /dev/mmcblk1p1!
(006470) [10:30:31] See also: <https://postmarketos.org/troubleshooting>
(006470) [10:30:31] Traceback (most recent call last):
 File "/usr/lib/python3.8/site-packages/pmb/__init__.py", line 63, in main
   getattr(frontend, args.action)(args)
 File "/usr/lib/python3.8/site-packages/pmb/helpers/frontend.py", line 196, in install
   pmb.install.install(args)
 File "/usr/lib/python3.8/site-packages/pmb/install/_install.py", line 547, in install
   install_system_image(args)
 File "/usr/lib/python3.8/site-packages/pmb/install/_install.py", line 397, in install_system_image
   pmb.install.partitions_mount(args)
 File "/usr/lib/python3.8/site-packages/pmb/install/partition.py", line 49, in partitions_mount
   raise RuntimeError("Unable to find the partition prefix,"
RuntimeError: Unable to find the partition prefix, expected the first partition of /dev/mmcblk1 to be located at /dev/mmcblk11 or /dev/mmcblk1p1!


Now, if I try :

Code:
pmbootstrap install --sdcard=/dev/mmcblk0
or
Code:
pmbootstrap install --sdcard=/dev/mmcblk1
or
Code:
pmbootstrap install --sdcard=/dev/mmcblk2
I got this error:

Code:
(006763) [10:42:19] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/dev
(006763) [10:42:19] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
1711869952    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
(006763) [10:42:19] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
53035008    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
(006763) [10:42:19] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
8192    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
(006763) [10:42:19] % sudo touch /home/laurent/.local/var/pmbootstrap/chroot_native/dev/installp1
(006763) [10:42:19] % sudo mount --bind /dev/mmcblk0p1 /home/laurent/.local/var/pmbootstrap/chroot_native/dev/installp1
(006763) [10:42:19] % sudo touch /home/laurent/.local/var/pmbootstrap/chroot_native/dev/installp2
(006763) [10:42:19] % sudo mount --bind /dev/mmcblk0p2 /home/laurent/.local/var/pmbootstrap/chroot_native/dev/installp2
(006763) [10:42:19] (native) mount /dev/installp2 to /mnt/install
(006763) [10:42:19] (native) % mkdir -p /mnt/install
(006763) [10:42:19] (native) % mount /dev/installp2 /mnt/install
(006763) [10:42:19] (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot
(006763) [10:42:19] (native) % mkfs.ext2 -F -q -L pmOS_boot /dev/installp1
/dev/installp1 is apparently in use by the system; will not make a filesystem here!
(006763) [10:42:20] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(006763) [10:42:20] NOTE: The failed command's output is above the ^^^ line in the log file: /home/laurent/.local/var/pmbootstrap/log.txt
(006763) [10:42:20] ERROR: Command failed: (native) % mkfs.ext2 -F -q -L pmOS_boot /dev/installp1
(006763) [10:42:20] See also: <https://postmarketos.org/troubleshooting>
(006763) [10:42:20] Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pmb/__init__.py", line 63, in main
    getattr(frontend, args.action)(args)
  File "/usr/lib/python3.8/site-packages/pmb/helpers/frontend.py", line 196, in install
    pmb.install.install(args)
  File "/usr/lib/python3.8/site-packages/pmb/install/_install.py", line 547, in install
    install_system_image(args)
  File "/usr/lib/python3.8/site-packages/pmb/install/_install.py", line 407, in install_system_image
    pmb.install.format(args)
  File "/usr/lib/python3.8/site-packages/pmb/install/format.py", line 94, in format
    format_and_mount_boot(args)
  File "/usr/lib/python3.8/site-packages/pmb/install/format.py", line 35, in format_and_mount_boot
    pmb.chroot.root(args, ["mkfs.ext2", "-F", "-q", "-L", "pmOS_boot", device])
  File "/usr/lib/python3.8/site-packages/pmb/chroot/root.py", line 90, in root
    return pmb.helpers.run_core.core(args, msg, cmd_sudo, None, output,
  File "/usr/lib/python3.8/site-packages/pmb/helpers/run_core.py", line 301, in core
    raise RuntimeError("Command failed: " + log_message)
RuntimeError: Command failed: (native) % mkfs.ext2 -F -q -L pmOS_boot /dev/installp1

if i try :


Code:
pmbootstrap install --sdcard=/dev/mmcblk0p1


I got this error :


Code:
(007060) [10:47:53] *** (3/5) PREPARE INSTALL BLOCKDEVICE ***
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_native/mnt/install
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/var/cache/distfiles
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/var/cache/apk
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/proc
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-rust
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-packages
(007060) [10:47:53] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-git
(007060) [10:47:54] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-ccache
(007060) [10:47:54] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-abuild-config
(007060) [10:47:54] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/etc/apk/keys
(007060) [10:47:54] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/dev/shm
(007060) [10:47:54] % sudo umount /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/dev
(007060) [10:47:54] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
1711869952    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
(007060) [10:47:54] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
53035008    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
(007060) [10:47:54] % sudo du --summarize --block-size=1 /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
8192    /home/laurent/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
(007060) [10:47:54] NOTE: (1/20) failed to find the install partition. Retrying...
(007060) [10:47:54] NOTE: (2/20) failed to find the install partition. Retrying...
(007060) [10:47:54] NOTE: (3/20) failed to find the install partition. Retrying...
(007060) [10:47:54] NOTE: (4/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (5/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (6/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (7/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (8/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (9/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (10/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (11/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (12/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (13/20) failed to find the install partition. Retrying...
(007060) [10:47:55] NOTE: (14/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (15/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (16/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (17/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (18/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (19/20) failed to find the install partition. Retrying...
(007060) [10:47:56] NOTE: (20/20) failed to find the install partition. Retrying...
(007060) [10:47:56] ERROR: Unable to find the partition prefix, expected the first partition of /dev/mmcblk0p1 to be located at /dev/mmcblk0p11 or /dev/mmcblk0p1p1!


Does anyone know which command I should run to install on EMMC ?
* PinePhone BraveHeart Edition
#2
SOLVED IN MY CASE: TOP TIP FROM Funeral_Chris ON IRC TO FORMAT THE eMMC FIRST TO CLEAR THE FACTORY IMAGE.

I have also just failed to install to eMMC.

My Brave Heart has booted pmOS/phosh from SDcard fine.
I have pmbootstrap setup fine on the phosh installation.
AFAIK emmc appears as /dev/mmcblk2
Everything runs fine with pmbootstrap until the actual copy to eMMC

Code:
$ pmbootstrap install --sdcard /dev/mmcblk2
...
(003064) [10:28:16] *** (3/5) PREPARE INSTALL BLOCKDEVICE ***
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/var/cache/distfiles
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/var/cache/apk
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/proc
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-rust
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-packages
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-git
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-ccache
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/mnt/pmbootstrap-abuild-config
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/etc/apk/keys
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/dev/shm
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/dev
(003064) [10:28:16] % sudo du --summarize --block-size=1 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
1075089408 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone
(003064) [10:28:16] % sudo du --summarize --block-size=1 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
46227456 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/boot
(003064) [10:28:16] % sudo du --summarize --block-size=1 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
8192 /home/chris/.local/var/pmbootstrap/chroot_rootfs_pine64-pinephone/home
(003064) [10:28:16] (native) mount /dev/install (host: /dev/mmcblk2)
(003064) [10:28:16] % sudo touch /home/chris/.local/var/pmbootstrap/chroot_native/dev/install
(003064) [10:28:16] % sudo mount --bind /dev/mmcblk2 /home/chris/.local/var/pmbootstrap/chroot_native/dev/install
(003064) [10:28:16] % sudo touch /home/chris/.local/var/pmbootstrap/chroot_native/dev/sdcardp1
(003064) [10:28:16] % sudo mount --bind /dev/mmcblk2p1 /home/chris/.local/var/pmbootstrap/chroot_native/dev/sdcardp1
(003064) [10:28:16] (native) % blkid -s LABEL -o value /dev/sdcardp1
/dev/sdcardp1: LABEL="pmOS_boot" UUID="e1c1b6b8-94f9-4b91-9438-3f4aea445694" TYPE="ext2"
(003064) [10:28:16] % sudo umount /home/chris/.local/var/pmbootstrap/chroot_native/dev/sdcardp1
[10:28:16] WARNING: This device has a previous installation of pmOS. CONTINUE? (y/n) [n] y
(003064) [10:28:22] (native) partition /dev/install (boot: 69M, root: the rest)
(003064) [10:28:22] (native) % parted -s /dev/install mktable msdos
(003064) [10:28:22] (native) % parted -s /dev/install mkpart primary ext2 2048s 69M
(003064) [10:28:22] (native) % parted -s /dev/install mkpart primary 69M 100%
(003064) [10:28:22] (native) % parted -s /dev/install set 1 boot on
(003064) [10:28:22] % sudo touch /home/chris/.local/var/pmbootstrap/chroot_native/dev/installp1
(003064) [10:28:22] % sudo mount --bind /dev/mmcblk2p1 /home/chris/.local/var/pmbootstrap/chroot_native/dev/installp1
(003064) [10:28:22] % sudo touch /home/chris/.local/var/pmbootstrap/chroot_native/dev/installp2
(003064) [10:28:22] % sudo mount --bind /dev/mmcblk2p2 /home/chris/.local/var/pmbootstrap/chroot_native/dev/installp2
(003064) [10:28:22] (native) format /dev/installp2
(003064) [10:28:22] (native) % mkfs.ext4 -O ^metadata_csum -F -q -L pmOS_root /dev/installp2
/dev/installp2 is apparently in use by the system; will not make a filesystem here!
(003064) [10:28:22] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(003064) [10:28:22] NOTE: The failed command's output is above the ^^^ line in the log file: /home/chris/.local/var/pmbootstrap/log.txt
Any suggestions how to get mkfs to overcome its inhibitions?
  • 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
#3
I managed to install PostmarketOS to my pinephones emmc by booting Manjaro from the SD Card and running pmbootstrap from there.

I think as the factory test is also Postmarket os any installation running from the SD card will mount the emmc partitions as they have the pmos_* labels as well.
#4
(02-17-2020, 04:55 AM)hk135 Wrote: I managed to install PostmarketOS to my pinephones emmc by booting Manjaro from the SD Card  and running pmbootstrap from there.

I think as the factory test is also Postmarket os any installation running from the SD card will mount the emmc partitions as they have the pmos_* labels as well.

Thanks a lot ! I runned this from Manjaro :

Code:
pmbootstrap install --sdcard mmcblk2

and it worked !
* PinePhone BraveHeart Edition
#5
Mine worked with `pmbootstrap install --sdcard=/dev/mmcblk0` on Ubuntu 20.04.
Make sure not to add the extra `p1` at the end - `mmcblk0p1`
#6
What might be easier nowadays is just using JumpDrive to make the eMMC show up as writeable storage on your PC and just run pmbootstrap on your pc.


Possibly Related Threads…
Thread Author Replies Views Last Post
  phone won't boot from emmc with sdcard inserted ssilvi 3 3,609 06-06-2021, 02:47 AM
Last Post: ssilvi
  eMMC Partitioning/Formatting Izzet 3 4,133 01-12-2021, 03:57 PM
Last Post: Izzet
  Cannot find a method of flashing to EMMC that works MarkF 4 6,120 10-30-2020, 09:06 PM
Last Post: discogribbs

Forum Jump:


Users browsing this thread: 1 Guest(s)