Solved

How to repaire Linux OS before login into shell?

Posted on 2008-10-10
6
332 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

911 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

16 Experts available now in Live!

Get 1:1 Help Now