It’s been quite a time I have my BPI M5 and took one for my dad to setup a pihole server. With time and many changes his was not running for quite a time and when we wanted to put it back in service, we lost the root password (and other users too).
I tried to start with a freshly made SD card and I can’t boot on it. I searched on the forum if people had similar issues but none of the solutions I’ve found suit my problem.
Try to flash ubuntu image to the sdcard, if nothing else, the board will bootup from sdcard and then you can erase the emmc or maybe try the following method to change the password of emmc system.
after bootup from sd, mount emmc root partition /dev/mmcblk0p2 to /mnt
open /mnt/etc/shadow file and look down the line of your user name. It should look like this.
pi:$6$5e6upFQZunpdxxHH$DSodEfInqHSQDmTxa79VOKBeG2/ZfXPlaaDs.O38I3hudPWZ7Qnbfm2rj27v7KYbaFjsfM5xgIRg/OFG789Vh.:18607:0:99999:7:::
replace the contents between the first and second colon with this string,
$6$5e6upFQZunpdxxHH$DSodEfInqHSQDmTxa79VOKBeG2/ZfXPlaaDs.O38I3hudPWZ7Qnbfm2rj27v7KYbaFjsfM5xgIRg/OFG789Vh.
save the shadow file.
you should now shutdown the board, remove sdcard, bootup from emmc and login with password bananapi
Once I formated the eMMC, no more partition or data on it. it refuse to boot on the RPI os. I wanted to try this since BPI documentation is a pain to make GPIO pins work …