?
Solved

How to repaire Linux OS before login into shell?

Posted on 2008-10-10
6
Medium Priority
?
339 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 1000 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

URL rewriting in AWS CloudFront

A quick how-to guide to implement with a Lambda function!

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

719 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