LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   anyone know how to edit the /boot/grub/menu.lst? plzz help (https://www.linuxquestions.org/questions/linux-newbie-8/anyone-know-how-to-edit-the-boot-grub-menu-lst-plzz-help-305903/)

earth.hero 03-25-2005 09:48 AM

anyone know how to edit the /boot/grub/menu.lst? plzz help
 
I cannot edit the /boot/grub/menu.lst.I just want to change sumthing.plzz help me:scratch:

batard 03-25-2005 09:53 AM

Why can't you edit it? Are you logged in as root? What message do you get when you try to edit it?

TigerOC 03-25-2005 09:54 AM

Why? You need to be the root user to do this. Become root, then edit it. When you save the file it should be automatically written to the mbr.

visaris 03-25-2005 10:51 AM

Not to be as a$$, but I just wanted to correct TigerOC slightly. When the grub config file is saved, no data is actually written to the mbr. Grub has the ability to read ext2 filesystems, and will mount/read the menu/config/etc file directly. This is why you don't need to do anything other than save the file for the changes to take effect.

TigerOC 03-25-2005 10:53 AM

Beg pardon but with Debian it does - don't know about other distros.
Ok I follow - sorry I did not know the menu.lst was read by grub but thought it was written to the mbr. No matter - the end result is the same.

visaris 03-25-2005 11:06 AM

I suppose what you say is possible, but I don't beleive it.

From: http://www.redhat.com/docs/manuals/l...de/ch-grub.htm
Quote:

GRUB's configuration file is read from the disk every time the system boots, preventing the user from having to write over the MBR every time a change the boot options is made. Most boot loaders are not sophisticated enough to read configuration files and use them to set up boot options. For example, to change a LILO boot configuration, such as changing the default operating system to boot, users must change a LILO configuration file and run a command that overwrites the system's MBR with the new configuration data. This is more risky than GRUB's method, because a misconfigured MBR would leave the system unbootable. With GRUB, if the configuration file is erroneously configured and rebooted, it will simply default to a command line and allow the user to manually type commands that will launch the operating system. The MBR is not touched except to update the Stage 1, Stage 2, or menu configuration file locations, and this is rarely necessary.

TigerOC 03-25-2005 11:19 AM

This is an interesting one because Debian does not have such a configuration file. I see it mentioned in regard to other distros but there isn't one in Debian i.e. no /etc/grub

drowbot 03-25-2005 11:22 AM

Some versions use grub.conf instead of menu.lst.

TigerOC 03-25-2005 11:36 AM

OK just clarify the whole process which can be read here .

Grub installs stage1 to the mbr which then reads stage2 (containing the menu directives) which links to menu.lst or grubconf which ever the distro uses.

earth.hero 03-25-2005 10:09 PM

hi
 
Im just start using Linux, so i know little bout it.
Can u tell me how to log on as root?
plz:)

veerain 03-25-2005 10:32 PM

root logon explained
 
In the username just type root
in the password just type your root password.
It's that simple.


My site Veera's

earth.hero 03-25-2005 10:35 PM

sry man.
I just found out how to do it.
But thanx

perfect_circle 03-25-2005 10:41 PM

Quote:

Originally posted by TigerOC
This is an interesting one because Debian does not have such a configuration file. I see it mentioned in regard to other distros but there isn't one in Debian i.e. no /etc/grub
the most common place for grub config files is /boot/grub/

earth.hero 03-25-2005 10:48 PM

im really sorry but I still cant edit that file.
I tried to log on as root but sum how it's not working.
Can any1 plz show me how to do it?

syg00 03-25-2005 10:49 PM

Re: hi
 
Quote:

Originally posted by earth.hero
Im just start using Linux, so i know little bout it.
Can u tell me how to log on as root?
plz:)

Damn, just finished an answer ;)

To the discussion re grub - that Redhat link is useful, but don't treat it as gospel.
As an aside the code looks for menu.lst. Lots of distros symlink this to grub.conf, some patch the code to look for grub.conf.
Some flip-flop between the two - the Gentoo guys can look at the patch set that comes down with the emerge of a new version of grub. Changes from one to the next.
Makes it difficult to offer good advice on sites like this that have a mix of user competence, and a mix of distros.
The OP in this case hasn't told us what distro (s)he uses.

syg00 03-25-2005 11:16 PM

Quote:

Originally posted by earth.hero
im really sorry but I still cant edit that file.
I tried to log on as root but sum how it's not working.
Can any1 plz show me how to do it?

What's the problem;
- that you can't login as root,
- that you can't edit (and save) menu.lst, or
- on reboot, you don't see any changes ???.

From a console/terminal enter:
Code:

id
ls -l /boot/grub

and post the output back here.

batard 03-26-2005 09:56 AM

Quote:

im really sorry but I still cant edit that file.
I tried to log on as root but sum how it's not working.
Can any1 plz show me how to do it?
You're going to have to tell us what error message you get. Doing the following *will* allow you to edit the file you want to edit:

- Log in as root; type "root" in the username: field and your root password (if you have one) in the password: field. If you don't have one, try hitting Enter. You should see a # prompt.

- Now type ls -la /boot/grub

- You should see either grub.conf or menu.lst in the list.

- Type vi grub.conf or vi menu.lst. This will show you what's in the file. type "i" to edit, and when you're done and satisfied with changes you've made, hit Esc, then : (a colon), then type wq!

- If you can't edit grub or menu.lst, let us know what error message you get. If you have insufficient permissions, you could try chmod 777 <filename>.

TigerOC 03-26-2005 10:15 AM

You might battle with vi as an editor. If you have a kde dsektop then go K ->System and look for File manager on the menu. It will ask for root password. Once in there use the folder icon on the left and open up the directory tree and go to /boot/grub and look for grub.conf or menu.lst and use something like kwarite to edit the file.


All times are GMT -5. The time now is 09:10 PM.