How do I get at '/boot/grub/menu.lst'?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
biffer
Level 2
Level 2
Posts: 94
Joined: Fri Dec 14, 2007 7:23 am

How do I get at '/boot/grub/menu.lst'?

Post by biffer »

Hi,

I've installed Mint 7 on partition #1, with Grub on the MBR. I have another distro on partition #2 with grub in its own root. I now have to edit '/boot/grub/menu.lst' to add the chain loader commands.

I can't work out how to get to the edit stage. When I open a terminal and enter 'gksudo gedit /boot/grub/menu.lst' I'm asked for my password, no problem. But then I get two screens of explanations about Grub and something else which is no help. Where am I going wrong, please?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: How do I get at '/boot/grub/menu.lst'?

Post by DrHu »

I don't know what that is, since gedit should just open the file for editing,
--just make sure you are selecting the partition and the /boot/grub/menu.1st file for Linux mint in partition #1, then add the chainload +1 to start the second grub menu in partition # 2

I would, before trying the edit again, check that you have /boot/grub in thhat partition that mint uses , that is your partition #1
--you can even use the nautilus file manager, and open as root /boot/grub, find the menu.1st file and open it, then save your changes (chainloader +1 entries)

Also you may want to read Freds' (user in these forums) data about multibooting and Grub..
http://forums.linuxmint.com/search.php? ... =fred+grub
biffer
Level 2
Level 2
Posts: 94
Joined: Fri Dec 14, 2007 7:23 am

Re: How do I get at '/boot/grub/menu.lst'?

Post by biffer »

DrHu,

Have a look at this!

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## Graphical boot menu location
gfxmenu=/boot/gfxmenu/linuxmint.message

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Linux Mint 7 Gloria, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

That's what I get when using 'gedit'

I can't find anything to help that's been posted by Fred, unfortunately. I'm sure I could manage the chainloader commands - if I could get to the point where I can apply them.

I also can't work out how to use Nautilus. All I can find is Nautilus Actions configuration which isn't quite crystal clear!

Oh dear. Why is everything so complicated?
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How do I get at '/boot/grub/menu.lst'?

Post by MALsPa »

You're there, biffer -- that command is using gedit to open up your menu.lst so that you can edit it. I think you just need to learn about grub and the menu.lst and what each line in there is all about. For example, that every line starting with "#" is just a comment, to be ignored by grub.

And it is complicated, or can be! Check out the GRUB manual: http://www.gnu.org/software/grub/manual/grub.html

And do some Google searches about how to edit your menu.lst file.

And look for some examples of other folks' menu.lst files, especially folks who are dual-booting or multi-booting.

For example, I'm using Debian to boot Debian Lenny, Mepis 8, Mint Elyssa, and Ubuntu Hardy, and here is my menu.lst in Debian, customized by me:

Code: Select all

timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1

gfxmenu /boot/grub/message

title MEPIS at hdb1, newest kernel
root (hd1,0)
kernel /boot/vmlinuz root=/dev/hdb1 nomce quiet splash vga=791 
initrd /boot/initrd.img
boot

title MEPIS at hdb1, previous kernel (if any)
root (hd1,0)
kernel /boot/vmlinuz.old root=/dev/hdb1 nomce quiet splash vga=791 
boot

title MEPIS at hdb1, kernel 2.6.27-1-mepis-smp
root (hd1,0)
kernel /boot/vmlinuz-2.6.27-1-mepis-smp root=/dev/hdb1 nomce quiet splash vga=791 
initrd /boot/initrd.img-2.6.27-1-mepis-smp
boot

title Debian GNU/Linux, kernel 2.6.26-1-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/hda1 ro quiet
initrd /boot/initrd.img-2.6.26-1-686

title Linux Mint, kernel 2.6.24-23-generic
root (hd1,6)
kernel /boot/vmlinuz-2.6.24-23-generic root=/dev/sdb7 ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.2, kernel 2.6.24-23-generic
root (hd1,8)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=c80c7227-b542-4b2d-8fed-f15e38694df3 ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic

title MEMTEST
kernel /boot/memtest86+.bin
Note that unlike Ubuntu and Mint, the Debian menu.lst doesn't have a bunch of lines starting with "#" but of course I could add some to provide some comments about what each line or section is all about...

You're on the right track, though!
biffer
Level 2
Level 2
Posts: 94
Joined: Fri Dec 14, 2007 7:23 am

Re: How do I get at '/boot/grub/menu.lst'?

Post by biffer »

Hi MalsPa,

You're right. I do need to learn, don't I? Your post and example is very helpful and will put me on the right track. I'm very grateful.

biffer
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How do I get at '/boot/grub/menu.lst'?

Post by MALsPa »

Sorry, I didn't mean for that "...you just need to learn..." comment to come out the wrong way, probably a bad choice of words! I was thinking about how I struggled to understand what was going on in there. In the end, the whole thing is kind of elegant. But I think that Mint's and Ubuntu's menu.lst files kinda threw me at first. Debian's seems a lot more straight-forward to me, and I think I have an easier time booting everything from Debian. The main thing is, seeing other folks' menu.lst files, I think that's when the light started to come on for me. People have a few different ways of doing things, but comparing things like that helped me figure things out. That GRUB manual is kinda tough to go through but there's a lot of info in there that helps.
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How do I get at '/boot/grub/menu.lst'?

Post by MALsPa »

And do keep in mind, different distros can have different things going on in the menu.lst, although I guess they all follow most of the same rules. I think if you edit the one in Mint, you'll automatically have a copy of the old one saved there, but I sure do like to make a copy of it before I do anything to it, just in case.
biffer
Level 2
Level 2
Posts: 94
Joined: Fri Dec 14, 2007 7:23 am

Re: How do I get at '/boot/grub/menu.lst'?

Post by biffer »

If it wasn't bad manners, I'd shout 'hooray, hooray, hooray' in caps. I'm typing this using my second distro. It worked! I held my breath when I did it. I really expected my computer to blow up or freeze or something. But it didn't and I feel quite triumphant, even though I know that's stupid.

Many, many thanks to both of you. It's great that you'll help so willingly and I really appreciate that.
Locked

Return to “Installation & Boot”