Aliasgar Taksali wrote: ↑
Thu Aug 17, 2017 11:00 am
I cant find any file named "cmdline.txt" on my NOOBS SD card.
Sorry this is a bit late, but maybe it is of use to other people too.
The cmdline.txt file is on the BOOT partition of the OS that you've lost the password to.
If you installed an OS image directly using win32DiskImager or Etcher or something, then the BOOT partition is the first partition on the SD card (/dev/mmcblk0p1) and is visible if you put it in a Windows PC.
If you used NOOBS to install your OS, then the first partition of the SD card is the NOOBS recovery partition and is the one visible on a Windows PC. The OS BOOT partition is now moved to probably partition#6 (/dev/mmcblk0p6) and is not visible to Windows, so it is a little more tricky to get at.
NOOBS has a recovery shell you can get at (ctrl-alt-F2, username root, password raspberry) which you can use to mount partition 6 and use vi to edit cmdline.txt. But it's not so easy for a beginner.
An alternative is to replace NOOBS with PINN (just overwrite the files in the NOOBS partition with the files in pinn-lite.zip WITH THE EXCEPTION OF RECOVERY.CMDLINE
*. PINN has a nice useful to reset or change the password of most NOOBS installed OSes.
(* The default recovery.cmdline has a 'runinstaller' option that causes it to wipe and reformat your whole SD card, so do be careful that this option is not present after overwriting NOOBS with PINN)