Solved

How to repaire Linux OS before login into shell?

Posted on 2008-10-10
6
336 Views
Last Modified: 2012-05-05
I have a linux box, but when it startups, a service inform error (Samba share : mount: No route to host...) and It can't run over this error, I press Ctrl + C, but not effect.

I want to access /etc/fstab or other files to delete the startup of service, but how to access these file when can't login into shell?

Thanks in advanced!
0
Comment
Question by:star6868
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 250 total points
ID: 22692903
What kind of Linux distribution do you have? Fedora, SuSE, CentOS or Ubuntu?

Anyway, if your boot loader is Grub, then
1. On boot up menu,  press "E" twice then type "single" at the end of the line start with "kernel..." i.ie.
  kernel /vmlinuz-<version> ro root=... rhgb quiet single    <==== "single" here
2. Then press "Enter" and "b"  to boot into single user mode.
3. Then you can edit /etc/fstab or do whatever.
in single user mode, do
# mount -o remount,rw /
if you can not save your change.
0
 
LVL 12

Expert Comment

by:ibu1
ID: 22692908
log into linux single user mode.Here are the steps
http://www.cyberciti.biz/faq/grub-boot-into-single-user-mode/
At the prompt type
# mount -o remount, rw /    (this will help u to remount the file system into the read/write mode)
# vi /etc/fstab
(Here u can make necessary changes)
# reboot  

Cheere!!!!!
0
 
LVL 19

Expert Comment

by:jools
ID: 22693587
Sounds like it's trying to mount a smb filesystem on another system.

It will eventualy time out but go for the single user mode as mentioned above (note you can also press `a` to append and then type ` 1` and enter to boot) or you could try one of the other terminals (try pressing alt + F2 or alt+F3).

You shouldnt need to mount root rw in single user mode as far as I remember.

Then remove the offending mount from the fstab file (also mentioned above).

Is there a reason that the mount existed in the first place?
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:star6868
ID: 22696285
I have 2 Linux BOX meet this problem, that 's Centos 5.2 and Asianux 2( RHEL4)

I try your sollutions, but It's seem not effect.

Or I miss something?

0
 
LVL 19

Expert Comment

by:jools
ID: 22697656
If it's not working then you need to post more information, logs, errors etc.
0
 

Author Comment

by:star6868
ID: 22720866
@wesly_chen

I run over this error!

I retest and discover my mistake:
Not only add "single", but add "quiet single" if have not "quiet",
and If command have "quite" so only add "single"


0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question