Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not booting up #12

Closed
fernandodiacenco opened this issue Jul 18, 2023 · 6 comments
Closed

Image not booting up #12

fernandodiacenco opened this issue Jul 18, 2023 · 6 comments

Comments

@fernandodiacenco
Copy link

Hi there,

Using this image: https://github.com/inindev/nanopi-r5/releases/download/v12.0/nanopi-r5s_bookworm.img.xz

Its is not booting up stock Debian 12 on my NanoPI R5S

I tried downloading it again and flashing with both w32diskImager and Balena Etcher to no avail

In contrast, the Debian 11 bullseye core image found here:

https://drive.google.com/drive/folders/1fB3R5WX4M4IPPqO8A0waCT_tUeEisfST

Works flawlessly

What could be the problem?

Thanks, have a nice week.

@inindev
Copy link
Owner

inindev commented Jul 18, 2023 via email

@fernandodiacenco
Copy link
Author

Downloaded your file and flashed it using a Debian 11 and xzcat, it flashes successfully but still does not boot, tried balena again, it flashes but does not boot.

Even if I extract the .xz or .gz file with 7zip, get the .img file and flash it, it flashes correctly, but does not boot.

The only thing that I can see being different from the Bullseye image is that your file is smaller and has less partitions after flashing.

@inindev
Copy link
Owner

inindev commented Jul 18, 2023 via email

@fernandodiacenco
Copy link
Author

fernandodiacenco commented Jul 18, 2023

It is connected by hdmi to a tv, what I see is this:
Without sd card it boots to the default friendlyelec system
With the sd card flashed with Debian 11 bulleye core, it boots to Debian 11 with the password pi/pi
With the sd card flashed with your Debian 12 bookworm, it does not boot bookworm, but boots to the default friendlyelec
Holding mask upon powering on for a little while and then releasing boots up... Debian 12!
Sorry did not know that I should hold mask, since I did not have to on Debian 11
Upon reboot it reverts to friendlyelec unless I hold mask every time, how do I make booting by the card the default Like it is with Debian 11?
Thanks.

@inindev
Copy link
Owner

inindev commented Jul 18, 2023

The NanoPi R5S has an internal eMMC on the board that comes from the factory with Linux running on it.
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R5S
https://wiki.friendlyelec.com/wiki/index.php/Ubuntu_FAQ

The mask button disables the internal eMMC allowing the external removable MMC card to boot.
https://wiki.friendlyelec.com/wiki/images/0/0f/NanoPi_R5S_2204_SCH.PDF

You have two options: one is to erase the internal eMMC which will always force the external MMC to be used. The other is to over-write the internal eMMC and always boot from it.

  1. Boot from the external removable MMC using the mask button.

  2. List the mmc devices in the system:

# ls -al /dev/mmc*
brw-rw---- 1 root disk 179, 768 May 31 23:56 /dev/mmcblk0
brw-rw---- 1 root disk 179, 769 May 31 23:56 /dev/mmcblk0p1
brw-rw---- 1 root disk 179,   0 May 31 23:56 /dev/mmcblk1
brw-rw---- 1 root disk 179, 256 May 31 23:56 /dev/mmcblk1boot0
brw-rw---- 1 root disk 179, 512 May 31 23:56 /dev/mmcblk1boot1
brw-rw---- 1 root disk 179,   1 May 31 23:56 /dev/mmcblk1p1
brw-rw---- 1 root disk 179,   2 May 31 23:56 /dev/mmcblk1p2
brw-rw---- 1 root disk 179,   3 May 31 23:56 /dev/mmcblk1p3
brw-rw---- 1 root disk 179,   4 May 31 23:56 /dev/mmcblk1p4
brw-rw---- 1 root disk 179,   5 May 31 23:56 /dev/mmcblk1p5
brw-rw---- 1 root disk 179,   6 May 31 23:56 /dev/mmcblk1p6
brw-rw---- 1 root disk 179,   7 May 31 23:56 /dev/mmcblk1p7
brw-rw---- 1 root disk 179,   8 May 31 23:56 /dev/mmcblk1p8
brw-rw---- 1 root disk 179,   9 May 31 23:56 /dev/mmcblk1p9
crw------- 1 root root 241,   0 May 31 23:56 /dev/mmcblk1rpmb

The internal eMMC is easy to spot as it will have entries for mmcblk1boot0 and mmcblk1boot1. The external MMC is mmcblk0. I keep my partitioning simple, so there is just the one partition mmcblk0p1

To erase the internal eMMC with the factory load, become root (sudo su) and overwrite it with zeros:
cat /dev/zero > /dev/mmcblk1

It will take a minute or two to complete then you can reboot without using the mask button. It would then look like:

# ls -al /dev/mmc*
brw-rw---- 1 root disk 179, 768 May 31 23:56 /dev/mmcblk0
brw-rw---- 1 root disk 179, 769 May 31 23:56 /dev/mmcblk0p1
brw-rw---- 1 root disk 179,   0 May 31 23:56 /dev/mmcblk1
brw-rw---- 1 root disk 179, 256 May 31 23:56 /dev/mmcblk1boot0
brw-rw---- 1 root disk 179, 512 May 31 23:56 /dev/mmcblk1boot1
crw------- 1 root root 241,   0 May 31 23:56 /dev/mmcblk1rpmb

There are instructions for installing this debian load to the internal eMMC here:
https://github.com/inindev/nanopi-r5#booting-from-internal-emmc

Basically you just download an image to the booted system:

wget https://github.com/inindev/nanopi-r5/releases/download/v12.0/nanopi-r5s_bookworm.img.xz

Then write it to the internal eMMC:

xzcat nanopi-r5s_bookworm.img.xz > /dev/mmcblk1

@fernandodiacenco
Copy link
Author

Ok so I opted to overwrite the internal system and followed your guide and it worked flawlessly, thank you!

You can close this since this was a non-issue after all, but lack of information on my part.

Thank you again, keep up the good work, and have a nice week!

@inindev inindev closed this as completed Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants