Partial boot after installing Manjaro on emmc

Hello,

I usually use my pinebook pro with an SD card.

A few days ago I installed manjaro on emmc with manjaro-arm-installer.

After reboot I have the u-boot splash screen, which I have never seen before, then the OS boots up to the login screen, freezes then shuts down.

With the sd card inserted, linux fails to find mmcblk1 and therefore cannot boot the operating system from the sd card, and provides an emergency shell.

On the emergency shell, it is possible to boot a dysfunctional operating system on a USB key, without wifi and without kernel modules.

I asked for help on forum.pine64.org, and wdt replied that u-boot was at fault and that it had to be replaced.

He didn’t tell me exactly what to do.

I found the uboot-pinebookpro page on manjaro’s gitlab, and in the uboot-pinebookpro.install file it says:

New version of U-Boot firmware can be flashed to your microSD card (mmcblk1)
or eMMC module (mmcblk2). You can do that by running these two commands:
# dd if=/boot/idbloader.img of=/dev/mmcblkX seek=64 conv=notrunc,fsync
# dd if=/boot/u-boot.itb of=/dev/mmcblkX seek=16384 conv=notrunc,fsync

I wish confirmation that the problem came from u-boot.

I wish confirmation that the indications contained in uboot-pinebookpro.install are correct.

I also wish to know if these commands would make all the data on mmcblk2 inaccessible, or if this operation would just replace u-boot without touching the rest.

We have had some reports that newer uboot packages does not work correctly. We are looking into it.

In the meantime, I’d recommend you try tow-boot:

The proposed solution is not clear to me.

Wouldn’t it be more convenient to install a working previous version of U-Boot, for example the one that existed in manjaro 2023-01?

Where to find this version?

What are the command lines to install it, from the emergency shell?

Knowing that from the emergency shell, I can access the USB key, but not the internet.

On the U-Boot splash screen it says:

I deduce that U-Boot is loaded from the SPIFlash memory, and not from the emmc.

On the pinebook pro wiki it says:

I deduce that:

  • manjaro-arm-installer presumably installed U-Boot on SPIFlash when installing Manjaro on the emmc.
  • This version of U-Boot is unsuitable for SPIFlash.
  • I can disable the SPIFlash to try to start U-Boot on the emmc or on the SD card (hardware deactivation).

On the wiki it is also written:

It is therefore possible to deactivate SPIFlash by overwriting the memory (software deactivation)

However, it is necessary to check on U-Boot is installed on the emmc or SD card, before overwriting the SPIFlash memory, otherwise the Pinebook pro will not restart.

For this I can, “short pin 6 of the SPI flash to GND and boot” and see if the pinebook pro reboots.

Do you think this is the right solution?

Hi, the problem is solved.

I installed Tow Boot on the emmc which solved the problem.

However, when Tow Boot is installed on the SPI, I have exactly the same problem as with U-Boot: the system does not detect the encrypted partition on the SD card, it does not detect the SD card at all (no /dev/mmcblk1), booting is impossible and I get into an emergency shell.

Procedure:

On another computer, download the latest version of Tow Boot at https://github.com/Tow-Boot/Tow-Boot/releases. Choose the pinebookPro version.

Assume the latest version is pine64-pinebookPro-2021.10-005.tar.xz

$ wget https://github.com/Tow-Boot/Tow-Boot/releases/download/release-2021.10-005/pine64-pinebookPro-2021.10-005.tar.xz # download archive
$ tar xvf pine64-pinebookPro-2021.10-005.tar.xz # unzip
$ cd pine64-pinebookPro-2021.10-005
$ cp shared.disk-image.img [your-usb-stick-location]
$ sudo -s
# dd if=spi.installer.img of=[your-SDcard-location-in-/dev/] bs=1M status=progress

Then, I plugged the USB key into the faulty computer, and I started it with the encrypted SDcard to arrive at the emergency shell.

Perhaps due to the abnormal boot, I was unable to use dd with the options given in the documentation.

On the emergency shell,

# dd if=shared.disk-image.img of=/dev/mmcblk2 bs=1M oflag=direct,sync status=progress # /dev/mmcblk2 is internal emmc memory.

returns an error.

So I used the command:

# dd if=shared.disk-image.img of=/dev/mmcblk2 bs=1M oflag=direct conv=fsync

Source.

What worked.

Then I replaced the encrypted SDcard with the Tow Boot SDcard containing spi.installer.img, rebooted and overwritten the SPI memory.

Finally, I replaced the Tow Boot SDcard with the encrypted SDcard, and when I restarted, everything was working normally.

I tried to install Tow Boot on SPI memory, but as I said, Tow Boot on SPI does not detect the encrypted SDcard.

I haven’t tested unencrypted system boot on emmc with Tow Boot on SPI. As Tow Boot works on the emmc, I leave it as is.

Thanks for your suggestion, Strit!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.