Having difficulty installing PostmarketOS on Pinephone Convergence Beta edition
#1
Hi all.
I made a reply about this issue to this issue in somebody else's thread started in 2021,
but it might be bumping a thread which is too old.
The original thread is this:

    https://forum.pine64.org/showthread.php?tid=13703


My essential problems are:
  •  When I decompress and then dd the PostmarketOS image to an SD Card, I cannot boot from that SD Card on the Pinephone.   

  •  Alternately: When I try to directly follow the PostmarketOS instructions for this: It also will not boot from that SD Card.
       
  •  When I try to dd an image of  "JumpDrive" (PostmarketOSbootloader / boot selection tool developed by PostmarketOS devs) to the same SD Card, this also fails to boot.

This is a BRAND NEW SD card out of the package.
The Pinephone does SEE the SD Card when I run lsblk on the pinephone, so it is mysterious to me why it cannot boot the images when I flash them. 

So, I am mystified and must consult the wise oracles and wizards on this forum and hope for assistance.
   
Further specific details about my attempts and links are below.   

Brand new SD card.
I have a Pinephone Convergence Beta edition.
Running lsblk on the phone, it actually sees the sd card.

However, no matter what I seem to try, I cannot boot it to either PostmarketOS as flashed to the SD card, or to Jumpdrive (developed by some of the Postmarket developers).

In the other forum thread: 
One of the repondents  [MtnSk8]   suggested zeroing the first few bytes of the SD Card.

    https://forum.pine64.org/showthread.php?tid=13703


Q.
    HOW do I zero "the first few bytes" of the SD card for this operation,
    and exactly how many bytes is "the first few"?
    1?  2? 8? 16? 512? 1024?

I took a gamble on this from pinephone documentation
[url
https://wiki.pine64.org/index.php/PinePh...structions
[/url]

and tried:
Code:
    sudo dd if=/dev/zero of=/dev/[DEVICE] bs=8k seek=1 count=4

But have no idea if that's what I am meant to do.
Anyway, this didn't help.

For flashing the image, I have attempted the following:

I tried flashing using standard dd method  (having first run unxz to decompress the postmarket.img.xz file)

Code:
    sudo dd if=postmarket.img of=/dev/sdXX status=progress

and also tried to flash using the interesting method of decompressing postmarket.img.xz  piped through dd as described in postmarket documentation below


    https://wiki.postmarketos.org/wiki/JumpDrive


Code:
    xz --decompress --stdout pine64-pinephone.img.xz | sudo dd of=/dev/mmcblk... status=progress

In this case, I think the instructions are indicating doing this on the pinephone itself, but I am flashing it to the SD card using my linux desktop. 
So, in the instructions,

Code:
    /dev/mmcblk...

...in my case obviously becomes
Code:
    /dev/sdXX

I have attempted all these methods a few times, after my ignorant attempt at zeroing the first few bytes of the SD Card.
Still no luck or success at all. 
Thanks anybody for any help or advice.
  Reply
#2
have you  tried etcher ?

the dd didn't work for me but etcher did

ezik
  Reply
#3
(10-04-2024, 01:47 AM)shulamy Wrote: have you  tried etcher ?

the dd didn't work for me but etcher did

ezik

Thanks ezik. 
That's a good suggestion, but this would probably be a bit of a last resort. 
I might try the app-image version of etcher if absolutely nothing else works, 
but I hesitate as etcher is not found under standard debian repos, and has to be downloaded from a third party's website. 

dd should work, and it is mentioned in all of the documentation (postmarketOS and pinephone documentation). 
It's also the standard / default tool in gnu/linux for flashing bootable images to media.  
I'm sure there is probably just something I am missing. 

Perhaps the block size option with a specific size. 
Or something else entirely. 

Thanks again though. Good to know that might work if all else fails. 
Will keep that suggestion under my hat (:
  Reply
#4
i forgot to say that it was arch manjaro and mobian so i don't know about PostmarketOS

ezik
  Reply
#5
(10-03-2024, 11:56 PM)spazz Wrote: I tried flashing using standard dd method  (having first run unxz to decompress the postmarket.img.xz file)

Code:
    sudo dd if=postmarket.img of=/dev/sdXX status=progress

Hello! I made a video about a year ago and it shows how to find the right device to flash the image to.

PinePhone Pro (1of5) - Flash DanctNIX Arch with Phosh
https://www.youtube.com/watch?v=FBGVUq3D...ixZG94pj99
00:00 Intro
00:20 Download image
01:05 uncompressed image
02:20 Turn on phone
03:30 unmount phone
04:25 dd the image
07:10 Reboot the phone
08:40 DONE!
  Reply
#6
(10-04-2024, 07:49 AM)mikehenson Wrote:
(10-03-2024, 11:56 PM)Hello! I made a video about a year ago and it shows how to find the right device to flash the image to. PinePhone Pro (1of5) - Flash DanctNIX Arch with Phosh Wrote: https://www.youtube.com/watch?v=FBGVUq3D...ixZG94pj99
00:00 Intro
00:20 Download image
01:05 uncompressed image
02:20 Turn on phone
03:30 unmount phone
04:25 dd the image
07:10 Reboot the phone
08:40 DONE!

MH: 
You are an ABSOLUTE LEGEND, sir. 
This looks like an absolute beauty of a video. 
Chapterized, timestamped. 
Appears to be extremely thorough. 
Definitely deserves a few more views. 
I will work through this this evening or tomorrow and report back. 
Really glad to see this. 
Top work. Thank you! 

In fact, your entire channel looks like a massive asset to the community. 
I take my hat off to you.
  Reply
#7
The OP is using an original PinePhone, so you should probably be linking to the original PinePhone version of your video: https://www.youtube.com/watch?v=XNF8zuIEGik (step 1 being the one step that is different).
  Reply
#8
(10-04-2024, 06:06 PM)spazz Wrote: MH: 
You are an ABSOLUTE LEGEND, sir. 
This looks like an absolute beauty of a video. 
Chapterized, timestamped. 
Appears to be extremely thorough. 
Definitely deserves a few more views. 
I will work through this this evening or tomorrow and report back. 
Really glad to see this. 
Top work. Thank you! 

In fact, your entire channel looks like a massive asset to the community. 
I take my hat off to you.

You are welcome!  

See this post for a complete install and setup. 
https://forum.pine64.org/showthread.php?tid=18192

See this post for my experience on functionally 
https://forum.pine64.org/showthread.php?...#pid118783
  Reply
#9
Thanks Kevin, for clarifying. Yes, a convergence Beta model, which I guess is an original.  
Thanks again Mike!  Life has gotten busy the past couple of days, but I will get through it, and will report back soon.  (:
  Reply
#10
Hi again all.
Just wanted to share that I had success with installing postmarketOS using JumpDrive, on two separate pinephones.

My convergence Beta edition which I purchased new (I guess this is a standard pinephone),
and a standard pinephone I purchased used. 

My next steps are to: 
- Upgrade the Pinephone's firmware (not sure if I should have done this prior to installing postmarket) 
- learn to fully encrypt the storage (would be nice if there was an option for this at install, but suspect this can be done with the other pmbootstrap method, which doesn't work on my current distro). 
- Learn how to use the sxmo window manager. It's very unique and interesting. Definitely different. 
- Hope the pinephone doesn't drop calls every 5 minutes like it used to! 

I am unsure why I failed with jumpdrive the first time, and succeeded this time, as reading back, I think I did exactly the same thing in terms of the jumpdrive steps.
Maybe not.
If I did the same thing, it should have worked.
Or maybe I did the same thing up to a point, and then missed a step.

I followed Mike's video for confidence and assurance on what I was doing.
(the second one, which Kevin pointed me to).
It was great to "SEE" exactly what he was doing, which is often lacking in reading documents.
It was excellent (apart from the microphone level being a bit low, and needing to ramp up the volume, but I think you fixed this in later videos). 

Thanks again Mike!

Maybe I just stuffed up something the first time, or missed an obvious step, 
and nobody else will have this kind of problem.

Just in case anybody else comes across some kind of similar problem,
or otherwise gets a bit confused like I did, and needs a bit of extra confidence with what they are doing,  here is a summary of what I did:

(although I'm basically redundantly repeating instructions from Michael's video and postmarketOS jumpdrive documentation).


    Get appropriate jumpdrive image from the github 

    https://github.com/dreemurrs-embedded/Jumpdrive
   
    Michael did this with
   
Code:
    $ wget https://github.com/dreemurrs-embedded/Jumpdrive/releases/###URLpathToAppropriateJumpDriveImage###
   
   
    But I'm lazy, and I just clicked the appropriate link, and that downloaded it.
   
    Then:
   
   
Code:
    unxz JUMPDRIVEIMAGE.img.xz
   
   
    Connect SD Card to computer.
    Use
    sudo lsblk to identify the SD card.
    We will name it sdX for this example.
    Then
   
   
Code:
    sudo dd if=JUMPDRIVEIMAGE.img of=sdX status=progress
   

Let run and finish.
Then
- Remove SD Card from computer, 
- Remove battery from pinephone
- insert SD Card into pinephone,
- Connect Pinephone to computer (I did not bother to reinsert battery),
- turn on pinephone.

You SHOULD now see JumpDrive splashscreen on pinephone.

On computer, navigate to path of postmarketos / distro image.

Then run this to identify the pinephone's internal memory location (eMMC),
identified as sdX, which we will flash our distro to.
   
   
Code:
        $ lsblk -o name,size,model,vendor |grep JumpDriv
        sdX        29.1G e_eMMC                    JumpDri
   

Can also be done simply with
    sudo lsblk 
to identify the pinephone eMMC card,
but the first method gives more certainty so you don't flash the wrong thing!   

You can then either:
       
   
Code:
    unxz DISTROIMAGE.img.xz
   
    #unzips the distro image, in this case postmarketOS
   
   
With pinephone connected to computer,
and booted to Jumpdrive flashscreen,
we can now flash our distro image.

   
Code:
    sudo dd if=DISTROIMAGE.img of=/dev/sdX status=progress bs=1M oflag=direct iflag=fullblock
   
   
Where sdX is our pinephone eMMC drive we identified earlier.

Let run and allow it to finish.
DO NOT INTERRUPT IT or you MIGHT risk bricking your phone's memory.
(I'm not sure, but I wouldn't risk it).

Maybe get your hands off the keyboard and away from the terminal while this runs,
to avoid potential sadness.
Go away and get a cup of tea.

Once finished:
  "Remove the USB cable and power off the phone. Remove the JumpDrive SD card if you used one. Power on the phone to boot into postmarketOS."

Honestly, I'm not sure the purpose of the portion of the above command which says
   
Code:
    oflag=direct iflag=fullblock
   

It might be redundant. I roughly guess iflag (input-flag) ensures a full 1M block size is used for each block (for some purpose), and output-flag makes the image flash directly where we already specified it to go? (um, where else would it go?)

That comes from the postmarketOS jumpdrive documentation, and those people are a lot smarter than I am, so worth keeping it in the command, I think.


OR

use the instructions on the original postmarketOS jumpdrive URL.
The section about "Flashing to eMMC"

I used these instructions, just because it was there.
It's basically the same.

The only difference with this is it pipes the output of unzipping the DISTROIMAGE.img through dd, as input to dd to flash to the pinephone.
I learned something.

       
    https://wiki.postmarketos.org/wiki/JumpDrive#Flashing_to_eMMC
   


Quote:   
    Flashing to eMMC
    Locate the block device exposed to the host computer via JumpDrive:

       
Code:
        $ lsblk -o name,size,model,vendor |grep JumpDriv
        sdX        29.1G e_eMMC                    JumpDri
       

    In the example above, the /dev/sdX is the eMMC device on your phone.

    Again, make sure you know what you are doing, and verify you picked the right path - overwriting the wrong partition or changing the partition layout on Android by accident may cause data loss or render your device unbootable! If you want to proceed:

       
Code:
        $ xzcat DISTROIMAGE.img.xz | sudo dd of=/dev/DRIVE status=progress bs=1M oflag=direct iflag=fullblock
        4277141504 bytes (4.3 GB, 4.0 GiB) copied, 194 s, 22.0 MB/s
        4093+0 records in
        4093+0 records out
        4291821568 bytes (4.3 GB, 4.0 GiB) copied, 200.427 s, 21.4 MB/s
       

    Remove the USB cable and power off the phone. Remove the JumpDrive SD card if you used one. Power on the phone to boot into postmarketOS.

Thanks again Mike and Kevin for your help.
Sorry for chewing up space and time on the forums perhaps unnecessarily.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone Pro Black Screen CrimsenRaven 3 1,573 11-13-2024, 09:33 PM
Last Post: twentyslimy
  PinePhone Pro/IMX258 Camera Debugging problem jasperji 2 853 10-20-2024, 03:59 AM
Last Post: Jite
  PinePhone doesn't boot anymore lapin 3 661 09-13-2024, 10:09 AM
Last Post: lapin
  New PinePhone Pro fails... P. Siera 5 1,322 08-01-2024, 04:56 AM
Last Post: P. Siera
  A way to view or log the splash screen on Pinephone Pro running ArchLinux (Danctnix) PHLEMON 4 1,141 07-30-2024, 11:03 PM
Last Post: PHLEMON
  PinePhone Pro silver lining, it’s fast, real damn fast ashoka232 2 1,923 07-30-2024, 05:58 AM
Last Post: DrYak
  Is my PinePhone Pro dead? jlioret 2 2,188 07-28-2024, 04:12 PM
Last Post: dchang0
  Pinephone Pro does not start with RE button pressed c0ssan 11 8,017 07-28-2024, 03:21 PM
Last Post: dchang0
  Will a Pinephone Pro (Explorer) work with TING wpeckham 8 4,688 07-28-2024, 03:04 PM
Last Post: dchang0
  Pinephone Pro: Determined To Make It (Drive-able) USeeks 3 1,073 07-20-2024, 10:11 AM
Last Post: mikehenson

Forum Jump:


Users browsing this thread: 1 Guest(s)