LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 02:59 AM   #16
lmohammeed
Member
 
Registered: Sep 2013
Posts: 61

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, 03:09 AM   #17
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 03:35 AM   #18
lmohammeed
Member
 
Registered: Sep 2013
Posts: 61

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, 03:39 AM   #19
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 04:27 AM   #20
lmohammeed
Member
 
Registered: Sep 2013
Posts: 61

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, 07:42 PM   #21
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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, 08:21 PM   #22
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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, 10:44 PM   #23
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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



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 02: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 08:25 AM
Bash problem : -bash: [: /bin/bash: unary operator expected J.A.X Linux - Software 1 09-22-2011 05:52 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 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