How to reset user password on pyra


Sebzy

Member
Joined
Oct 18, 2015
Messages
46
Seem to have forgot my login password for my pyra. Tried to to enter grub by hitting ESC but the bootloader just zooms past

Is this the right approach for pyra?
  1. As the pyra boots, press ESC to bring up the GRUB boot prompt.
  2. At the GRUB boot prompt, press E to edit the first boot option.
  3. Find the kernel line starting with linux /boot/.
  4. Add a space and the text init=/bin/bash to the end of the line.
  5. Press CTRL+X or F10 to boot into single-user mode.
  6. The system will boot, and you will see the root prompt.
  7. Run mount -o remount,rw / to mount the system volume.
  8. Run passwd and follow the prompts to change the root password.
  9. Reboot the pyra.
 
There is no GRUB as it's an embedded device and it uses uboot.
While I can't give exact commands, but the small microSD above the regular USB port is a serial terminal you can use minicom to get to the uboot prompt and modify the kernel boot arguments...
Not sure if this could help, another possibe method would likely be boot from an SD card and mount it.
 
There is no GRUB as it's an embedded device and it uses uboot.
While I can't give exact commands, but the small microSD above the regular USB port is a serial terminal you can use minicom to get to the uboot prompt and modify the kernel boot arguments...
Not sure if this could help, another possibe method would likely be boot from an SD card and mount it.
Yea thanks for that was able to get into the serial console via the USB and COM3 115200. Trying to figure out uboot now.
 
Tried adding "setenv bootargs ${bootargs} init=/bin/bash" in uboot but seems to be ignored.

U-Boot SPL 2016.11-g8e417ba870-dirty (Jan 07 2021 - 21:35:15) OMAP5432-GP ES2.0 cold reset rsttime1 has not yet been configured Status before starting init: EMIF_STATUS 40000004 40000004 EMIF_SDRAM_CONFIG 60812031 60812031 EMIF_SDRAM_REFCTRL 8000061b 8000061b EMIF_PERF_CTR_TIME 00618707 0061873e EMIF_OCP_ERROR_LOG 00000000 00000000 EMIF_DDR_PHY_CTRL1 0000081e 0000081e EMIF_PHY_STATUS_1 0000003f 0000003f EMIF_PHY_STATUS_20 003f0000 003f0000 EMIF_PHY_STATUS_21 00000000 00000000 Status after init: EMIF_STATUS 40000004 40000004 EMIF_SDRAM_CONFIG 61951bba 61951bba EMIF_SDRAM_REFCTRL 00001035 00001035 EMIF_PERF_CTR_TIME 01012bb9 01012bf2 EMIF_OCP_ERROR_LOG 00000000 00000000 EMIF_DDR_PHY_CTRL1 0034400a 0034400a EMIF_PHY_STATUS_1 0000003f 0000003f EMIF_PHY_STATUS_20 cbffffff 37ffffff EMIF_PHY_STATUS_21 00000000 0000003f READBACK deadbeef Status after memory test: EMIF_STATUS 40000004 40000004 EMIF_SDRAM_CONFIG 61951bba 61951bba EMIF_SDRAM_REFCTRL 00001035 00001035 EMIF_PERF_CTR_TIME 018b210b 018b2140 EMIF_OCP_ERROR_LOG 00000000 00000000 EMIF_DDR_PHY_CTRL1 0034400a 0034400a EMIF_PHY_STATUS_1 0000003f 0000003f EMIF_PHY_STATUS_20 1fffffff 17ffffff EMIF_PHY_STATUS_21 00000001 0000003d READBACK deadbeef >>spl:board_init_r() spl_init() Trying to boot from MMC2_2 SPL: Please implement spl_start_uboot() for your board SPL: Direct Linux boot not active! spl: payload image: U-Boot 2016.11-g0fecbc0a98-dirty load addr: 0x807fffc0 size: 337584 Jumping to U-Boot loaded - jumping to U-Boot... U-Boot 2016.11-g0fecbc0a98-dirty (Dec 24 2020 - 19:14:56 +0100) LPAE build running in hypervisor mode! CPU : ARM Cortex-A15 r2p2 SoC : OMAP5432-GP ES2.0 Board: OMAP5432 Pyra I2C: ready DRAM: 4 GiB power on reason is not valid MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1, OMAP SD/MMC: 2 *** Warning - bad CRC, using default environment HW Revision: CPU: v5.3 Mainboard: v5.3 BOOTDEV: eMMC/uSD SCSI: SATA link 0 timeout. AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst scanning bus for devices... Found 0 device(s). Net: No ethernet found. Hit any key to stop autoboot: 0 => setenv bootargs ${bootargs} init=/bin/bash => printenv arch=arm baudrate=115200 board=omap5_pyra board_name=omap5_pyra boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr} boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf boot_net_usb_start=usb start boot_prefixes=/ /boot/ boot_script_dhcp=boot.scr.uimg boot_scripts=boot.scr.uimg boot.scr boot_targets=mmc0 mmc1 scsi0 usb0 bootargs=init=/bin/bash bootcmd=run distro_bootcmd bootcmd_mmc0=setenv devnum 0; run mmc_boot bootcmd_mmc1=setenv devnum 1; run mmc_boot bootcmd_scsi0=setenv devnum 0; run scsi_boot bootcmd_usb0=setenv devnum 0; run usb_boot bootdelay=2 bootm_size=0x10000000 console=ttyO2,115200n8 cpu=armv7 distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done efi_dtb_prefixes=/ /dtb/ /dtb/current/ fdt_addr_r=0x88000000 fdtaddr=0x88000000 fdtfile=omap5-letux-cortex15-v5.3+pyra-v5.3.dtb kernel_addr_r=0x82000000 load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile} loadaddr=0x82000000 mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi mmcdev=1 pxefile_addr_r=0x80100000 ramdisk_addr_r=0x88080000 rdaddr=0x88080000 scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done scriptaddr=0x90000000 scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi scsidevs=0 soc=omap5 stderr=serial stdin=serial stdout=serial usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi usbethaddr=02:21:19:b2:0d:80 vendor=dragonbox ver=U-Boot 2016.11-g0fecbc0a98-dirty (Dec 24 2020 - 19:14:56 +0100) Environment size: 3487/131067 bytes => boot Card did not respond to voltage select! switch to partitions #0, OK mmc1(part 0) is current device Scanning mmc 1:1... Found /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf 309 bytes read in 3 ms (100.6 KiB/s) Retrieving file: /extlinux/linux.cfg 1887 bytes read in 4 ms (460 KiB/s) Retrieving file: /extlinux/user.cfg 0 bytes read in 4 ms (0 Bytes/s) Extlinux Boot Menu 1: Debian GNU/Linux 10 (buster), kernel 5.6.19-daveiii-pyradef-aufs 2: Debian GNU/Linux 10 (buster), kernel 5.6.19-daveiii-pyradef-aufs (recovery mode) 3: Debian GNU/Linux 10 (buster), kernel 5.6.19-daveiii-pyradef-aufs (hwtest) Enter choice: 1: Debian GNU/Linux 10 (buster), kernel 5.6.19-daveiii-pyradef-aufs Retrieving file: /initrd.img-5.6.19-daveiii-pyradef-aufs 19303669 bytes read in 992 ms (18.6 MiB/s) Retrieving file: /vmlinuz-5.6.19-daveiii-pyradef-aufs 7216800 bytes read in 372 ms (18.5 MiB/s) append: root=PARTUUID=f236729a-02 console=ttyO2,115200n8 console=tty0 vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 musb_hdrc.preserve_vbus=1 log_buf_len=8M ignore_loglevel earlyprintk drm_kms_helper.fbdev_rotation=8 drm.force_hw_rotation fastboot Retrieving file: /dtb/linux-image-5.6.19-daveiii-pyradef-aufs/omap5-letux-cortex15-v5.3+pyra-v5.3.dtb 96086 bytes read in 26 ms (3.5 MiB/s) etc.... etc... just goes back to the login prompt
 
As always on a Linux, the best way to recover root password (or any other user if you have not the root password) is to boot an alternative system (like the pyra OS installed on a sdcard in the left slot) mount the original is filesystem, chroot to it and use the passwd command
 
Going to single user mode used to be commonly used for installing non-free kernel modules and resetting password and things like that, about 10 years ago. But that was under the old init system, I'm not sure whether that's still a viable approach under systemd.
 
  • Like
Reactions: rSl
or you have the option just to reimage the pyra back to "factory"
 
Going to single user mode used to be commonly used for installing non-free kernel modules and resetting password and things like that, about 10 years ago. But that was under the old init system, I'm not sure whether that's still a viable approach under systemd.
Most distro request root password for shell in "single" mode... which, by default isn't even set (that has nothing to do with systemd...)
 
Most distro request root password for shell in "single" mode... which, by default isn't even set (that has nothing to do with systemd...)
Am I correct in thinking that it’s the same approach as for RPiOS?
 
Back
Top