BE VERY CAREFULL AND DONT COPY FROM HERE, YOU CAN HAVE DIFFERENT VALUES IN YOUR BOOTARGS ROW!
Changes made by setenv are lost after reboot!
7. After you set the new boot arguments, you can process to boot into the system.
If you will enter the saveenv command, you will save the current configured bootargs, and will enter single mode every time after reboot, so DONT saveenv!
8. Enter the boot command to boot with configured single mode.
9. You should boot in the system with the @(none):/# prompt.
10. Type /dev/ and press Tab twice. You should get the list of devices. You are interested in mtdblock2 device. This is the NAND memory the PBX normally boots from.
11. Create temporary mount point, using this command:
@(none):/# mkdir /mnt/temp
12. After mount point was created, mount mtdblock2 device to your running system, like that:
@(none):/# mount -t yaffs2 /dev/mtdblock2 /mnt/temp
-t yaffs2 = indicates that mounted device has YetAnotherFlashFileSystem
13. Now access memory through mount point.
@(none):/# cd /mnt/temp
Enter ls command and check if there is present /etc directory. If yes, cd into it
@(none):/mnt/temp# cd ./etc/
14. ls again, you should find passwd file.
15. Now you are going to purge the forgotten root password. For this you need to edit the passwd file, where all password are saved in encrypted form.
Check your prompt, it indicates that you are int the etc directory:
is the encrypted password. CAREFULLY DELETE it, so you get the following row:
15. Enter :wq command to save and exit from the editor. Enter vi passwd command again and check if anything is ok and password is purged. Enter the :q command to just exit the vi text editor.
16. Enter the reboot command. Now your PBX will boot in normal way, because after reboot your setenv settings will be lost, because these was not saved with the saveenv command. However, root password is purged now.
17. After PBX boots up and login as: prompt apperas, try to login as root. When the password prompt will appear, just hit ENTER.
You should be able to log in console with root privileges. Now enter passwd command and enter the new password.
That’s all. Be careful and don’t forget your passwords, like i did, haha! 😀