New to Pinebook Pro and lots of questions!
#1
Question 
Hi everyone!


I just got my brand new Pinebook Pro a few days ago. I started to play with it and I must say that I like it.


I am mostly a Windows guy alghouth I played a little bit with Linux (I have a Rpi2, a NextCloud instance, etc.) mostly Ubuntu/Debian and CentOS.


I bought the Pinebook Pro for it’s « Open source » nature in design and the fact that there is a lot of different OS for it, etc.


And, that why I am writing now, I am ready to start playing with the different OS avalable.


Before doing that, I started to read the Wiki and a few forums post about the boot process, the differents flashing options, etc. And I am a little lost!


So here am I to ask some clarifications and confirmation of what I understand and a few more questions.




1 – Boot Order / eMMC
If I understand correctly, the SoC boot from eMMC first. Right now, the eMMC has a U-Boot loader on it that make the computer search the SD card for a bootloader and switch to it. If not found, it continue on the eMMC. If the u-boot bootloader on the eMMC become corrupted, the computer won’t boot, even from SD card. In that case we need to disable the eMMC from the switch under the laptop, boot from SD card, re-enable the eMMC and force redection (instruction from Wiki) and reflash it.


So, Am I right with my understanding of the boot process?
Are the instructions in the Wiki to redetect the eMMC works also for Manjaro? The Wiki says it is for Debian.




2 – Restoring a factory image of Manjaro


On first boot, the Pinebook asked me to create my user account, set hte root paassword, and select the langage. How do I restore the Manjora system on it to act the same way? I took a look at the script to install to eMMC from SD but the script seems to ask the question during the restore process. I would like to know how to restore the eMMC so it act as a new system on first boot.


Should I use an old Manjaro image (eMMC installer) or there is a way to use the new script to have it ask the questions only on next reboot?




3 – Creating a full image of the eMMC from Linux


What is the best way to create a image of the eMMC (when booted from SD card) that will includes everything on the eMMC including the current U-BOOT loader?




4 – Creating a full image of the eMMC from Windows


When using the eMMC to USB adapter, underr Windows, what is the best way to backup the whole eMMC including the U-BOOT bootloader?


5 – Restoring the full image of the eMMC from Linux including U-BOOT


What is the best way (command with parameterrs) to restore the eMMC from a previous backup (see previous question) including the U-BOOT bootloader and everything?




6 – Restoring the full image of the eMMC from Windows including U-BOOT


What is the best way to restore eMMC using USB to eMMC from Windows incldding the u-boot bootloader?


7 – Restoring a eMMC that is corrupted / Non working U-BOOT


Is there a way to backup only the U-BOOT part from the eMMC from Linux (or Windows using the adapter) to restore it if it becomes corrupted or a full image reinstall is always required?




8 – What are the mmcblk2boot0 and mmcblk2boot1 device?


LSBLK show me the eMMC device itself with the ROOT and the BOOT partition as mmcblk2. There is also 2 otherrs device, mmcblk2boot0 et mmcblk2boot1. Are there physical partition on the eMMC? Is the U-BOOT bootloder written there? When using DD to mmcblk2 does it write in that section of the chip also or not?




Thanks all! I know I ask alot but your help will be reallly appreciated to put some light on the differents things I read.


Have a nice day!
  Reply
#2
(12-28-2020, 04:56 PM)Anarethos Wrote: 1 – Boot Order / eMMC
If I understand correctly, the SoC boot from eMMC first. Right now, the eMMC has a U-Boot loader on it that make the computer search the SD card for a bootloader and switch to it. If not found, it continue on the eMMC. If the u-boot bootloader on the eMMC become corrupted, the computer won’t boot, even from SD card. In that case we need to disable the eMMC from the switch under the laptop, boot from SD card, re-enable the eMMC and force redection (instruction from Wiki) and reflash it.


So, Am I right with my understanding of the boot process?
Are the instructions in the Wiki to redetect the eMMC works also for Manjaro? The Wiki says it is for Debian.

Mostly, yes. Technically the SoC boot order starts SPI>eMMC>SD (mainline uboot also adds USB here)>USB OTG (rkflashtool)

In most cases, no one will need the USB OTG, though. check out https://wiki.pine64.org/index.php?title=...t_sequence


(12-28-2020, 04:56 PM)Anarethos Wrote: 2 – Restoring a factory image of Manjaro


On first boot, the Pinebook asked me to create my user account, set hte root paassword, and select the langage. How do I restore the Manjora system on it to act the same way? I took a look at the script to install to eMMC from SD but the script seems to ask the question during the restore process. I would like to know how to restore the eMMC so it act as a new system on first boot.


Should I use an old Manjaro image (eMMC installer) or there is a way to use the new script to have it ask the questions only on next reboot?

The easiest way to restore your eMMC install to default (out of the box) state would be to use the SD-to-eMMC installer images from Manjaro. You could go through and remove all traces of your user account and settings, but it'd be easier/quicker to just rewrite your eMMC.

(12-28-2020, 04:56 PM)Anarethos Wrote: 3 – Creating a full image of the eMMC from Linux

What is the best way to create a image of the eMMC (when booted from SD card) that will includes everything on the eMMC including the current U-BOOT loader?

Use dd, a disk management app, or similar, to create a .img, .img.gz, .img.xz (again, your preference here.) When you write or restore that img file back to a drive, it will include everything on the drive that was backed up, including uboot.

(12-28-2020, 04:56 PM)Anarethos Wrote: 4 – Creating a full image of the eMMC from Windows

When using the eMMC to USB adapter, underr Windows, what is the best way to backup the whole eMMC including the U-BOOT bootloader?

You can use this guide. There's little difference in use between the SD and eMMC in the adapter.
https://thepihut.com/blogs/raspberry-pi-...0your%20PC.

(12-28-2020, 04:56 PM)Anarethos Wrote: 5 – Restoring the full image of the eMMC from Linux including U-BOOT

What is the best way (command with parameterrs) to restore the eMMC from a previous backup (see previous question) including the U-BOOT bootloader and everything?

Check out this wiki section: https://wiki.pine64.org/index.php/NOOB#I...D_on_Linux

(12-28-2020, 04:56 PM)Anarethos Wrote: 6 – Restoring the full image of the eMMC from Windows including U-BOOT

What is the best way to restore eMMC using USB to eMMC from Windows incldding the u-boot bootloader?

Just use your WinDiskImager/etcher/whatever app of choice.

(12-28-2020, 04:56 PM)Anarethos Wrote: 7 – Restoring a eMMC that is corrupted / Non working U-BOOT

Is there a way to backup only the U-BOOT part from the eMMC from Linux (or Windows using the adapter) to restore it if it becomes corrupted or a full image reinstall is always required?

There's not much point to this, honestly. uboot files are readily available within each OS' repos, and can easily be reflashed at anytime. If uboot becomes corrupted, it's easier to just boot into SD, find the emmc through lsblk, and download/rewrite uboot that way. It's not something you should really find yourself in need of doing often. Unless, you're intending to take on uboot development, i guess...

(12-28-2020, 04:56 PM)Anarethos Wrote: 8 – What are the mmcblk2boot0 and mmcblk2boot1 device?

LSBLK show me the eMMC device itself with the ROOT and the BOOT partition as mmcblk2. There is also 2 otherrs device, mmcblk2boot0 et mmcblk2boot1. Are there physical partition on the eMMC? Is the U-BOOT bootloder written there? When using DD to mmcblk2 does it write in that section of the chip also or not?

i don't know this one, for sure, but i think they do reside there (but do NOT write to the directly with dd or similar programs, uboot is typically written to drive in the following manner: # dd if=/boot/idbloader.img conv=notrunc seek=64 of=/dev/mmcblkX # dd if=/boot/u-boot.itb conv=notrunc seek=16384 of=/dev/mmcblkX)
  Reply
#3
Wow.

thanks you for your answers!

In the mean time I found some thing by myself also. Like to backup the extlinux.conf file when playing with the uboot package in Manjaro. Ended with an unbootable system.

Which made me test the MicroSD boot and reflash using manjaro-arm-flasher script which correclty rewrote the eMMC like the computer was on firt boot (except it is now using the mainline uboot and not the bsp version).
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  An unofficial Debian Installer for Pinebook Pro danielt 430 151,507 6 hours ago
Last Post: ab1jx
  OpenMandriva to release ARM builds for PineBook Pro and Pi ludix 8 760 Yesterday, 04:38 PM
Last Post: wdt
  postmarketOS/Alpine edge image for the Pinebook Pro MartijnBraam 62 31,319 02-14-2021, 12:25 PM
Last Post: pmjohann
  Pinebook Pro wifi not working seyo-iv 1 188 02-01-2021, 11:00 AM
Last Post: seyo-iv
  slarm64 (unofficial slackware) Pinebook Pro RK3399 (aarch64) mara 25 3,538 01-30-2021, 11:03 AM
Last Post: mara
  FLOSS pinebook pro linux set-up misha64 3 1,097 01-14-2021, 04:05 PM
Last Post: kuleszdl
  My Debian journey on the Pinebook Pro schwarzwieweiss 32 3,821 01-07-2021, 09:35 AM
Last Post: schwarzwieweiss
  Armbian for the Pinebook Pro [WIP] Luke 41 14,083 01-06-2021, 06:14 PM
Last Post: Idaho
  Gentoo on Pinebook Pro RELEASE jannik2099 48 28,419 01-03-2021, 06:21 AM
Last Post: wdt
Question Help: Pinebook Pro will not enter sleep [Manjaro 20.04] EverythingIsInput 48 17,464 12-30-2020, 09:08 AM
Last Post: wdt

Forum Jump:


Users browsing this thread: 1 Guest(s)