WB5 root password recovery/en: различия между версиями

Материал из Wiren Board
(Новая страница: «<!--{{DISPLAYTITLE:WB6 root password recovery}}-->»)
(Новая страница: «==Root password recovery procedure on Wiren Board 5== # Plug the USB-UART adapter to the controller. The connection is described in detail on the page Debug_UAR…»)
 
(не показана 1 промежуточная версия этого же участника)
Строка 3: Строка 3:
<!--{{DISPLAYTITLE:WB6 root password recovery}}-->
<!--{{DISPLAYTITLE:WB6 root password recovery}}-->


[[File:Stop_autoboot.png|thumb | 400px|Остановка автозагрузки uboot]]
[[File:Stop_autoboot.png|thumb | 400px| uboot autoboot stop]]
[[File:Stop_autoboot_commands.png|thumb | 400px|Stop_autoboot_commands.png| Вввод команд]]
[[File:Stop_autoboot_commands.png|thumb | 400px|Stop_autoboot_commands.png| Entering commands]]


==Процедура восстановления пароля root на Wiren Board 5==
==Root password recovery procedure on Wiren Board 5==
# Подключаем USB-UART переходник контроллеру. Подробно подключение описано на странице [[Debug_UART|Debug UART]]. Обратите внимание, что в последних версиях контроллера отладочный порт UART представлен в виде microUSB-разъема, так что дополнительнного преобразователя USB-UART не требуется.
# Plug the USB-UART adapter to the controller. The connection is described in detail on the page [[Debug_UART|Debug UART]]. Note that in the latest versions of the controller, the UART debug port is represented as a microUSB connector, so no additional USB-UART Converter is required.
# Включаем питание контроллера и в UART-консоли быстро нажимаем любую клавишу.  
# Turn on the power of the controller and in the UART-console quickly press any key.  
# '''Очень быстро''' последовательно вводим команды (их лучше заранее скопировать в буфер обмена):<br/><code>setenv optargs ro rootwait fixrtc single init=/bin/sh</code><br/><code>run bootcmd</code><br/>Если команды вводить медленно (вручную), то прерванный процесс загрузки продолжится.
# '''Very fast''' sequentially enter the commands (it is better to copy them in advance to the clipboard):<br/><code>setenv optargs rootwait fixrtc single init=/bin/sh</code><br/><code>run bootcmd</code><br/>If the commands enter slowly (manually), the interrupted boot process will continue.
# Загружаемся и получаем системное приглашение <code>#</code>
# Load and get the system prompt <code>#</code>
# Монтируем корневую файловую систему<br/><code>mount -n -o remount,rw /dev/mmcblk0p2 /</code><br/>и получаем сообщение <code> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)</code>
# Mount the root filesystem<br/><code>mount -n -o remount,rw /dev/mmcblk0p2 /</code><br/>and get the message <code> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)</code>
#Монтируем раздел с резервной копии конфигурации:<br/><code>mount /dev/mmcblk0p6 /mnt/data</code><br/>и получаем сообщение <code>EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)</code>
#Mount the partition from the configuration backup:<br/><code>mount /dev/mmcblk0p6 /mnt/data</code><br/>and get the message <code>EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)</code>
#Вводим команду <code>passwd</code> и меняем пароль. Успешное изменение пароля: <code>passwd: password updated successfully</code>
#Enter the command <code>passwd</code> and change the password. Successful password change: <code>passwd: password updated successfully</code>
#Копируем новый пароль в раздел с резервной копии конфигурации:<br/><code>cp /etc/shadow /mnt/data/etc</code>
#Copy the new password to the configuration backup section:<br/><code>cp /etc/shadow /mnt/data/etc</code>
#Отмонтируем всё:<br/><code> # sync</code><br/><code> # umount /mnt/data</code><br/><code> # umount /</code>
#Unmount all:<br/><code> # sync</code><br/><code> # umount /mnt/data</code><br/><code> # umount /</code>
#Выключаем и снова включаем питание. Пароль изменен.
#Turn off and turn on the power again. The password is changed.

Текущая версия на 19:57, 19 июля 2019

Другие языки:


uboot autoboot stop
Entering commands

Root password recovery procedure on Wiren Board 5

  1. Plug the USB-UART adapter to the controller. The connection is described in detail on the page Debug UART. Note that in the latest versions of the controller, the UART debug port is represented as a microUSB connector, so no additional USB-UART Converter is required.
  2. Turn on the power of the controller and in the UART-console quickly press any key.
  3. Very fast sequentially enter the commands (it is better to copy them in advance to the clipboard):
    setenv optargs rootwait fixrtc single init=/bin/sh
    run bootcmd
    If the commands enter slowly (manually), the interrupted boot process will continue.
  4. Load and get the system prompt #
  5. Mount the root filesystem
    mount -n -o remount,rw /dev/mmcblk0p2 /
    and get the message EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
  6. Mount the partition from the configuration backup:
    mount /dev/mmcblk0p6 /mnt/data
    and get the message EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
  7. Enter the command passwd and change the password. Successful password change: passwd: password updated successfully
  8. Copy the new password to the configuration backup section:
    cp /etc/shadow /mnt/data/etc
  9. Unmount all:
    # sync
    # umount /mnt/data
    # umount /
  10. Turn off and turn on the power again. The password is changed.