OS on SD Card only booted once


jedi23

Very Active Member
Joined
Aug 11, 2020
Messages
203
I flashed pyra-42.img with Etcher on an SD card so that I can try out a few things while the system on the eMMC remains unaffected.
When I inserted the SD card in the left slot, the Pyra did boot, the config tool started and shutted the system down after completion. So far so good.
However, when I now press the Power key, nothing happens and only the logo on the back side lights green. I tried several times with shutting off by holding the Power key for 10 sec or by removing the battery. Even when I reflashed the SD card, the Pyra doesn't boot anymore from SD!
When I remove the SD card, the Pyra boots normally from the eMMC.

Why booted my Pyra only once from SD card and how can I fix it?
 
Last edited:
I flashed pyra-42.img with Etcher on an SD card so that I can try out a few things while the system on the eMMC remains unaffected.
When I inserted the SD card in the left slot, the Pyra did boot, the config tool started and shutted the system down after completion. So far so good.
However, when I now press the Power key, nothing happens and only the logo on the back side lights green. I tried several times with shutting off by holding the Power key for 10 sec or by removing the battery. Even when I reflashed the SD card, the Pyra doesn't boot anymore from SD!
When I remove the SD card, the Pyra boots normally from the eMMC.

Why booted my Pyra only once from SD card and how can I fix it?
I dealt with this on my Pyra when I first got it, It was trying to boot off the SD card even though it wasn't bootable, I had to reformat the SD card so it didn't try and boot off the SD card. I don't remember exact details, but I will search the forum for a bit and post what I did to resolve it.
 
@jedi23

Not entirely sure what was up, but seems my solution back in the day was to format my SD card on my old Macbook pro, for reasons doing it on Linux with gparted seemed to bungle it up and it tried to boot from it, I recall even playing with the boot flag didn't matter for some reason, If I had more details it would have likely been an IRC conversation with aTc back in the day...

I linked the only reference I had on it long ago.

 
Last edited:
Still strange why my Pyra booted from SD on the first try!
 
Can you connect some PC through an µUSB cable and run a terminal program to watch what the serial console is telling during boot?
 
It's possible that I'm not remembering well, but wasn't there a size limit for the boot partition to work ?
 
I use a 16GB SD card. However, after flashing the partition size will equal the size of the img file unless you expand the partition afterwards. And it does not explain why I could boot once.

@hns I did that but I am not sure about the UART parameters, since I receive only rubbish. Are they U-Boot specific? I tried
  • Baud Rate: 115200
  • Parity: none
  • Bits: 8
  • Stop bits: 1
  • Flow control: none

I only receive 5 or 6 digits while powering on with the SD card.
 
I use a 16GB SD card. However, after flashing the partition size will equal the size of the img file unless you expand the partition afterwards. And it does not explain why I could boot once.

@hns I did that but I am not sure about the UART parameters, since I receive only rubbish. Are they U-Boot specific? I tried
  • Baud Rate: 115200
  • Parity: none
  • Bits: 8
  • Stop bits: 1
  • Flow control: none
Yes, that looks good.
I only receive 5 or 6 digits while powering on with the SD card.
What do you see if you boot from the eMMC?
 
I managed to get readable output! The upper part is from shutting down the OS from the eMMC and the last 8 rows are the output when booting via SD card.
 

Attachments

  • pyboot.jpg
    pyboot.jpg
    252 KB · Views: 99
  • Like
Reactions: rSl
In the past there were a lot of discussion about SD formatting, and this was the solution for the problems I had with mine, starting the first partition after 4MB, because for some reason the data at the beginning of the card became always corrupted.
 
I managed to get readable output! The upper part is from shutting down the OS from the eMMC and the last 8 rows are the output when booting via SD card.

Ok, it looks as if your board may have different RAM chip setup parameters when booting from eMMC than on the SD card and therefore the U-Boot from SD does not properly initialize the RAM.
This could explain why it worked once: you just were lucky.

I am not sure what the solution for SD card boot is, but I remember that ED may have different versions of U-Boot to install. There could also be a fallback if no U-Boot is on the SD card but I do not know what has been done execatly by developers of the PyraOS.
 
After I read this post about the same issue, I was encouraged to try another boot via SD:
https://pyra-handheld.com/boards/threads/creating-an-empty-os-for-the-pyra.99487/post-1695576

And it booted again! Since I reflashed the SD card, the system started the config tool again and did the shutdown afterwards. Even a second boot worked and I updated the debian system with apt update && apt upgrade.
After a while I turned the device off and tried to boot a third time. No success. I thought, maybe it just boots randomly, so I tried maybe 10 times to boot with no success. Was I really that lucky that the system now booted twice in a row? I think there must be a better explanation for this...

Update:
I did a few more tests and can confirm that according to ljones:
after leaving the pyra powered off and with the sd card out for a while I can get back to booting from the sd card too
this seems to be a reliable solution for now! These are no lucky shots, every time I wait a few hours, the Pyra boots from SD card on the first attempt. Since I only need the system on SD card to try something out from time to time, I can live with that. But I'm still wondering what makes the difference when waiting a few hours? Any capacitors need to be fully discharged?
 
Last edited:
Back
Top