unable to resolve hosts

Asked by kjerryn

hello,
i just upgraded to hardy and in terminal the sudo results in unable to resolve hosts.
i followed a contributor to the forum to use a passwordless root as system boots to see the contents of /etc/hosts
which is 127.0.0.1 localhost
             127.0.1.1 kwam-desktop.kwam
i tried changing the second line to kwam
reply was [error writing /etc/hosts: read-only system file]
what do i do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
kjerryn
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1
Revision history for this message
kjerryn (kjerryn) said :
#2

hi
i just tried the passwordless root as system boots to see the contents of /etc/hosts
which is 127.0.0.1 localhost
             127.0.1.1 kwam-desktop.kwam
and tried to add to the first line.
the result is the same [error writing /etc/hosts: read-only system file]
how does one get out of that place anyway? typing reboot, shutdown, exit does not really do anything. i've had to cut power to shut down

Revision history for this message
Jean-Baptiste Lallement (jibel) said :
#3

You may ever
- follow the steps in the thread above without forgetting the "rw" option on the command line
- Or when you press ESC to access the grub menu, simply select recovery mode.
- If all that fails and you still have a read-only filesystem the execute "mount -no remount,rw /" (if /etc is on the same partition as /"

Revision history for this message
kjerryn (kjerryn) said :
#4

hi
the problem was solved with

gksudo gedit /etc/hosts

and making the hostname the same as that in

cat /etc/hostname