12-29-2020, 10:58 AM
(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)