• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: How to reset root password by boot loader  (Read 7371 times)
frafra
Newbie
*

Karma: 0
Posts: 6


View Profile
« on: August 03, 2009, 01:55:54 PM »

Actually I'm using a nettop, and I think that I've set a mispelled root password, because I can't login. So, I thinked to put something "init=/bin/sh" (this is the grub-like syntax), mount the fs, and reset the password. The problem is that I don't know how could I say this to uboot. Otherwise, is there a simple way to put debian in the internal nand drive?

Thanks Wink
Logged

frafra
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #1 on: August 04, 2009, 10:47:55 AM »

It was not releated to a mispelled password, but it's a bug occurred after an upgrade of Ubuntu. I've solved it Smiley

Connected (with minicom) to my sweet sheeva plug.
Edited the boot loader agruments with:
Code:
setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500
000(rootfs) rw root=/dev/mtdblock1 init=/bin/bash
And then the usual:
Code:
setenv
Then I've boot it with:
Code:
boot

At the comand prompt I've reset root password:
Code:
pwconv; passwd -d root; passwd

The "reboot" command didn't work, so I restarted it manually. Then, I've write those lines in the bootloader env:
Code:
setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500
000(rootfs) rw root=/dev/mtdblock1
setenv
Then I've boot it with:
Code:
boot

And it worked Cheesy

Other resources:
http://plugcomputer.org/plugforum/index.php?topic=110.0
http://computingplugs.com/index.php/Default_software
« Last Edit: August 05, 2009, 05:13:34 AM by frafra » Logged

darcam
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #2 on: September 07, 2009, 07:38:54 AM »

Hi,
I'm new about plugPC and i lost my password with the apt-get upgrade.
Using your istruction i finally recover the login but at the boot time i receive this strage string:
jffs2_scan_inode_node(): CRC failed on node at 0x07f887c8: Read 0xffffffff, calculated 0x63f8e840

Regards
 Smiley
Logged

Dammuozz
Newbie
*

Karma: 0
Posts: 41


View Profile
« Reply #3 on: September 21, 2009, 10:48:50 AM »

after some troubles i managed to log-in and get things working

i noticed that i got something wrong at my first try cuz the line on the forum got an "return" in it...hope you understand..sorry for the poor english...

btw everything goes well when you copy-paste this way
Code:
setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 init=/bin/bash

and not
Code:
setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500
000(rootfs) rw root=/dev/mtdblock1 init=/bin/bash
that get an error like 000(rootfs) command not found

and maybe when you said and the usual "setenv" did you meant "savenv" ??....however I think is better not to save so you haven't to use the second part of the code to restore the default...


hope it helps

Dammuozz
Logged

BTravers
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #4 on: September 29, 2009, 10:55:45 AM »

Thanks to Dammuozz for the easy copy paste.  I had the same problem, unable to log in as root.  I tried changing the bootargs as first suggested by frafra and messed it up somehow.  I ended up getting stuck in a state where I couldn't boot at all.  So I thought I'd post this link on how to reset the Uboot environment variables to the factory defaults in case anyone is having the same problems:
http://www.openplug.org/plugwiki/index.php/Factory_Default_u-Boot_Environment
Logged

alexK
Newbie
*

Karma: 1
Posts: 22


View Profile
« Reply #5 on: July 01, 2012, 08:26:09 AM »

To recover from a lost root password on a plug computer (I needed to do
this on a DreamPlug) here's what I did according to the suggestions found
here and at
http://archlinuxarm.org/forum/viewtopic.php?f=7&t=613

In uboot:
setenv x_bootargs_pwrecov init=/bin/bash

Then using copy and past I brought a copy of the existing bootcmd
variable into my favorite editor (vim) and added "${x_bootargs_pwrecov};"
to the end of the list of the other bootargs so that it looks like the
following:

bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_pwrecov}; bootm 0x6400000;

Copy and paste back into uboot and boot up.

This is supposed to give you a terminal for which a password is not needed.
That didn't happen
But what did change is that now the system 'remembered' my root password.

I'm happy of course to have root control back but explanations seem lacking:-)
Logged

Pages: [1]
Print
Jump to: