impossible to modify menu.lst

Asked by Tyro

 i hav a pc computer toshiba sattellite serie L40
I was tried to install ubuntu 7.10 for a dual boot with windows vista; after research on forums,i tried to put the vista's bootloader in first position.
after changes; I can not save menu.lst. I received a message saying that i have not rights to do that.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Markus Thielmann
Solved:
Last query:
Last reply:
Revision history for this message
Markus Thielmann (thielmann) said :
#1

Thanks for your question.

Did you manually change your /etc/hosts file or changed your hostname after installing Hardy? This error happens, if you don't have your hostname in your host file.

This problem can be solved by adding some line like

127.0.0.1 localhost localhost.localdomain <hostname>

to your /etc/hosts file. Unfortunatly, without being able to use "sudo" you have to start Hardy with the recovery console, which you can select at boot time.

Revision history for this message
Tyro (ffnodig224) said :
#2

Don't think I changed something on my /etc/host file (I really new to this all). Look ing at the file, there are various entries in it. One is the '127.0.0.1 localhost' and the next one is '127.0.1.1 localhost.localdomain' nothing else or as complex as you say.
Should this be enough?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

To help you my local /etc/hosts is:

127.0.0.1 localhost
127.0.1.1 ubu-vendita

ubu-vendita is the network name of pc.

Hope this helps

Revision history for this message
Tyro (ffnodig224) said :
#4

Not really, but thanks. I'll probably need te re-install 8.04 once again to solve this. I'll just see if other reactions might help.

Revision history for this message
Best Markus Thielmann (thielmann) said :
#5

Like I said: your /etc/hosts file is obviously missing a hostname for your computer. So you either add it, or reinstall Ubuntu. It's your decision.

Revision history for this message
Tyro (ffnodig224) said :
#6

Does not really solve the problem, but Iĺl try a completely fresh 8.04 installation.
Thanks for the help.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#7

Seems like this: https://answers.launchpad.net/ubuntu/+question/31395

Into the /etc/hosts file there must be the computer name
lshw | head -1
give me "ubuntu" is my computer name

and into my /etc/hosts i have:
127.0.0.1 localhost ubuntu
127.0.1.1 ubuntu

So please check yours

You must edit the /etc/hosts file as root but sudo is not working so:

Please Start the pc the when you see the GRUB row...
Press ESC.

Press "e" for edit.

Highlight the line that begins kernel ………, and press "e"

Go to the very end of the line, add rw init=/bin/bash

press enter, then press "b" to boot your system.

Your system will boot up to a passwordless root shell.

You can edit the /etc/hosts file with nano editor type

nano /etc/hosts

to reboot the pc please type

reboot

Hope this helps

Revision history for this message
Tyro (ffnodig224) said :
#8

Thanks for the help. I've re-installed ubuntu 8.04 and now everything is ok. Still don't know what went wrong the first time.