Solved

How to repaire Linux OS before login into shell?

Posted on 2008-10-10
6
331 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
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now