Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I run Ubuntu in a virtual machine and I've managed to reset my password in recovery mode, by editing the parameters according to these instructions on Superuser.com. Summarizing my steps:

I changed ro single at the end of the line beginning with Linux to rw init=/bin/bash, while booting, then using the command passwd <username>, entered the new password twice. The password is reported to be updated successfully.

However, when I try to reboot the system nothing happens. I tried the command reboot, but it does not work. If I type exit I get kernel panic.

Any tips on how to proceed?

share|improve this question
    
can you try sudo shutdown -h now and sudo reboot? –  don.joey Jan 5 '13 at 15:22
    
Thanks. I get "sudo: unable to resolve host (none)" from both of those commands. –  forumuser Jan 5 '13 at 15:31
    
can you type hostname? –  don.joey Jan 5 '13 at 15:40
    
hostname gives me "(none)" –  forumuser Jan 5 '13 at 17:16

1 Answer 1

up vote 2 down vote accepted

Try telinit 6 you don't need sudo since your in single user mode.

EDIT:

If it wont reboot using the standard tools there is a way to do it straight through to the kernel, however this does not close file systems nicely.

Found this here

you must activate the magic SysRq option:

echo 1 > /proc/sys/kernel/sysrq

When you are ready to reboot the machine simply run the following:

echo b > /proc/sysrq-trigger

This does not attempt to unmount or sync filesystems, so it should only be used when absolutely necessary..

share|improve this answer
    
When I do init 6 I get " Failed to connect to socket /com/ubuntu/upstart: Connection refused" –  forumuser Jan 5 '13 at 17:15
    
@forumuser update answer try this one. –  Shutupsquare Jan 5 '13 at 17:43
    
I'm afraid I get the same error message –  forumuser Jan 5 '13 at 17:55
    
@forumuser how strange.... edited again. –  Shutupsquare Jan 5 '13 at 18:04
    
Thanks, that actually worked!! –  forumuser Jan 5 '13 at 21:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.