LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2016, 01:27 AM   #1
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Rep: Reputation: 57
systemd, reboot from single user mode


Hi,

I have a fedora 22 virtual machine. I forgot the password , so I add init=/bin/bash to the kernel line in grub and Ctrl+x , and I get a prompt.

I get to reset my root password, but only after remounting / as rw , but I cannot reboot.

# systemctl reboot
Failed to get D-bus connection : No such file or directory

# systemctl list-units -t service
Failed to get D-bus connection : No such file or directory

If I poweroff the machine and restart it , the new root password is not saved.

How do I proceed ?
 
Old 10-30-2016, 02:04 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
man sync

My 2. Not a systemd user.
 
Old 10-30-2016, 02:42 AM   #3
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
Nopes, doesnt work. Not even "systemctl start reboot.target"

I accidentally exited the rescue shell , I got kernel panic.

xD
 
Old 10-30-2016, 02:51 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Something is wrong, you set the password and you sync the disk, it must be written then and the password changed.
 
Old 10-30-2016, 02:52 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,700

Rep: Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548
I can't believe a quick search wouldn't solve this.
Add "systemd.unit=rescue.target" to the kernel parameters.
 
Old 10-30-2016, 03:26 AM   #6
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
I had already tried that , systemd.boot=rescue.target gave me a prompt where it asked the root password.

Now the crap is , my vm wont boot, it shows the blue white loading progress bar of fedora boot, the progress bar reaches at the very end and stays there.

 
Old 10-30-2016, 03:30 AM   #7
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
On a note , I installed CentOS 7 x64 in a vm in oracle virtualbox , the same problem exists. cant reboot from resuce shell (where you specify init=/bin/bash or /bin/sh) and if you exit the rescue shell , you get a kernel panic.

 
Old 10-30-2016, 03:31 AM   #8
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
Can someone please confirm this on a new test vm if possible, or am I going horribly wrong somewhere ?
 
Old 10-30-2016, 06:48 AM   #9
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
Ok I went a step ahead, added init=/bin/bash line to kernel in grub, and

# mount -o remount,rw /
# vi /etc/selinux/config (set it to disabled)
# passwd root
# sync

and had to poweroff and poweron the vm again, to login.

but still couldnt reboot from rescue mode command line.
 
Old 11-21-2016, 12:59 PM   #10
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 291

Original Poster
Rep: Reputation: 57
On an update , the solution was found here .

https://linuxconfig.org/recover-a-fo...selinux-system

Things seem okay now.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single user mode/ Recovery mode logging CentOS 5.6 RHFanatic CentOS 1 03-02-2016 02:40 PM
No Single-User Mode or Diagnostic Startup Mode El Capitan MacPro 2012 pcarrington Linux - Newbie 2 02-12-2016 08:28 PM
Unable to Access to Single User Mode or Emergency Mode Pinglu Linux - Newbie 3 10-17-2011 01:25 PM
Emergency mode can mount the HDD with FS error but not in rescue or single user-mode kayod_jj Linux - Newbie 3 12-01-2010 07:03 PM
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration