Перейти к содержанию

Навигация

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

Новая страница: «==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…»
(Новая страница: «<!--{{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.
12 063

правки