Welcome

Troves being gleaned while surfing on the Internet mostly about computer/IT/system skills and tricks, Welcome here ...
Powered By Blogger

Disclaimer

This blog is written by the owner with real practices and tests and intended to hold all original posts except there is a clear declaration for referencing from others. Thanks for tagging with the source link or other tips for reference from here if you would like to quote partial or full text from posts in this blog.

Thursday, December 30, 2010

Linux : Access network service in Single user mode

1. Enter the Level 1 - Single User Mode
In the grub boot memu, select the entry for the OS you want to start up, press "e" to edit :
Just remove the tailing "rhgb quiet" and append " single" instead;
then press "b" to enter the single user mode.

2. In order to access the network service
most of the time, the reason why you might want to enter this level 1 mode is probably your failure to start up the Linux normally so you would want to use networking for downloading something, thus you should need network access, which is disabled by default in Level 1, single user mode

a. check the network device configuration to see if it is right there and the item agrees with your need or desire.
e.g.  cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETWORK=
NETMASK=
IPADDR=
GATEWAY=
USERCTL=no

b. then start network service by
/sbin/service network start

c. if you run into problems like "Temporary failure in name resolution..." while you are going to download from a website, you should check the /etc/resolv.conf to see if there  places at least one nameserver and the server is really reachable. if not, you should add like

nameserver x.x.x.x
nameserver x.x.x.x
if you do not know what to fill here after "nameserver", you can refer to other machine within the same domain as yours current which is available for network access.

(Sometimes, when you restarted the NetworkManager service, this name resolution configuration might also be cleared, then you will need to edit like above too).

d. to verify if it got fixed, try something like wget
wget www.google.com, for instance, it now works well if you can get the index.html from this site.