LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2014, 03:59 AM   #16
lmohammeed
Member
 
Registered: Sep 2013
Posts: 38

Original Poster
Rep: Reputation: Disabled

Hi,
Thanks.

But, I don't know how to drop (or boot) to single user mode.

Kind regards
Lawal
 
Old 07-10-2014, 04:09 AM   #17
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

single user mode should be runlevel 1. You can change the runlevel with the telinit command. Eg.
Code:
telinit 1
Evo2.
 
Old 07-10-2014, 04:35 AM   #18
lmohammeed
Member
 
Registered: Sep 2013
Posts: 38

Original Poster
Rep: Reputation: Disabled
Hi,
Thanks.
The command
Code:
telinit 1
seems not to be working for me. It gives me a blank screen, I have to restart to restore the terminal interface.
What should I do?
Kind regards
Lawal
 
Old 07-10-2014, 04:39 AM   #19
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by lmohammeed View Post
Hi,
Thanks.
The command
Code:
telinit 1
seems not to be working for me. It gives me a blank screen, I have to restart to restore the terminal interface.
What should I do?
Sounds like it worked. Now you should be able to unmount /home. Eg
Code:
umount /home
Then have a look in /home eg
Code:
ls -al /home
and report what you find.

Once you are done you can use telnint to go back to what ever runlevel you were at before. The command "runlevel" will list the current and previous runlevel.

Evo2.
 
Old 07-10-2014, 05:27 AM   #20
lmohammeed
Member
 
Registered: Sep 2013
Posts: 38

Original Poster
Rep: Reputation: Disabled
Hi,
Thank you.
I got the same output as in post 14, that is
Code:
umount /home
PHP Code:
umount: /homedevice is busy.
        (
In some cases useful info about processes that use
         
the device is found by lsof(8) or fuser(1)) 
Kind regards
Lawal
 
Old 07-10-2014, 08:42 PM   #21
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

ok, so something is using /home. Try killing all user processes.
Eg
Code:
killall -u mohammed
failing that read the error message and use lsof or fuser to find what process to kill.

Evo2.
 
Old 07-10-2014, 09:21 PM   #22
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by lmohammeed View Post
Dear btmiller,

Yes, I remember, I was running a program called wien2k in root, then instead of deleting a newly created directory, I did a mistake by deleting the home directory.
Well, here's the problem, if you deleted everything from /home then the files are gone, including the shell start-up scripts. You can try to use something like testdisk or photorec to recover them, but chances are good that they're gone. You should restore from back-up (you do have back-ups, right)?
 
Old 07-10-2014, 11:44 PM   #23
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by lmohammeed View Post
Yes, I remember, I was running a program called wien2k in root, then instead of deleting a newly created directory, I did a mistake by deleting the home directory.
WTF? How did I not see this earlier? You deleted your home directory that, is why it is not there.

Good bye,

Evo2.
 
1 members found this post helpful.
  


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
[SOLVED] Bash Script - Reading User Input while Processing output from Command within Bash cleeky Linux - General 5 05-27-2014 03:57 PM
[SOLVED] Converting Script from Linux (GNU) Bash 4 to Solaris Bash 2.05 - Any cheat sheet? oly_r Solaris / OpenSolaris 6 05-03-2013 09:25 AM
Bash problem : -bash: [: /bin/bash: unary operator expected J.A.X Linux - Software 1 09-22-2011 06:52 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 12:10 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM


All times are GMT -5. The time now is 11:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration