Revising a 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
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Revising a menu.lst

Post by jadaro »

Two questions?
1. Can I revise my menu.lst so that the boot screen presents only 3 options?
2. Can I revise my menu.lst so that any distro could be the default booting choice?

I am hoping I can command out anything that I don't want and rearrange my booting order choices.
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.
Fred

Re: Revising a menu.lst

Post by Fred »

The answer to both of your questions is yes.

You need to know what you are doing though, or let some one help you that does.

If you want me to help you post back and I will.

Fred
Last edited by Fred on Fri Feb 08, 2008 6:03 pm, edited 1 time in total.
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Re: Revising a menu.lst

Post by jadaro »

Fred I appreciate you offer.

Can you give me a general guide?
I am guessing a lot of users will be interested.

I was planning on cutting and pasting to avoid any typos.
Looking forward to your next post.
Fred

Re: Revising a menu.lst

Post by Fred »

EDIT: oops sorry Chi, I was writing this post when you posted. lol

Go with Chi, he is a good man, younger and faster than I am. :-)



Ok,

Lets do it this way. Since I don't have a clue what your set up is, please post the contents of your entire /boot/grub/menu.lst file. If you don't know how to do this post back and we will back up a bit. :-)

Tell me what you want to default boot and the order of the other entries you want on the boot screen, including the text as you want it to appear.

I will post a modified file for you to look at and we can discuss what I did and why.

How is that for a plan? :-)

Fred
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Re: Revising a menu.lst

Post by jadaro »

I am running XP; PCLOS; & Mint
I want to default into PCLOS for now and until I feel comfortable with Mint.
My menu.lst is below.

# 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-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.
default 0

gfxmenu=/etc/grub/message.mint

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

# 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/sda6 ro

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

## 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

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) 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

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

## ## End Default Options ##

title Linux Mint 4.0 KDE CE, kernel 2.6.22-14-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint 4.0 KDE CE, kernel 2.6.22-14-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro single
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint 4.0 KDE CE, kernel memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows NT/2000/XP
root (hd0,1)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title Puppy linux (on /dev/sda5)
root (hd0,4)
kernel /boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda5 acpi=on resume=/dev/sda3 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title linux-nonfb (on /dev/sda5)
root (hd0,4)
kernel /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda5 acpi=on resume=/dev/sda3
initrd (hd0,4)/boot/initrd.img
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title failsafe (on /dev/sda5)
root (hd0,4)
kernel /boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda5 failsafe acpi=on resume=/dev/sda3
initrd (hd0,4)/boot/initrd.img
savedefault
boot
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Re: Revising a menu.lst

Post by jadaro »

If someone will tell me how to post an image I will post a jpg of my partition.
When I click img menu above all I get is brackets. Inserting between them gives an address of image. Does this mean it will be uploaded an can be seen when the post is posted?
Fred

Re: Revising a menu.lst

Post by Fred »

EDIT: Removed this menu.lst posting for the sake of space. :-)

OK,

This is really ragged. I didn't delete anything you had. As Chi said you have more than the three entries you talked about.

What, if anything do you wish to do about them? I am assuming I put the right entry to boot first. But, Puppy Linux is showing in the same place, it looks like. Look at what I did and see if you can determine by looking at the title you have been clicking on if that is the one you want booting first.

We can clean this up quite a bit if you wish. I just need to know what you are actually using, and where it is on your hard drives.

MENU.LST

DELETED to save space in the forum
Last edited by Fred on Fri Feb 08, 2008 11:56 pm, edited 3 times in total.
Fred

Re: Revising a menu.lst

Post by Fred »

Is the entry for Puppy the one you are looking for to boot first?

Now don't copy and paste this yet. We need to make sure it is right first.

Fred
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Re: Revising a menu.lst

Post by jadaro »

Can I strip everything out to the following items?


default color
gfxmenu
timeout
color

Title Puppy + instructions
Title Mint + instructions
Title XP home + instructions

Are linux-nonfb & linux-failsafe choices necessary to boot - when would they be used.








+
Title xp home
Fred

Re: Revising a menu.lst

Post by Fred »

lol... well we can make it much much smaller. :-)

You probably should keep the instructions in the file. You might want to refer to them at some later date.

Let me clean it up a bit and post it back. You know that you can change the title lines to read anything you want. That's what shows on the boot screen.

Fred
Fred

Re: Revising a menu.lst

Post by Fred »

OK,

Here is what I would suggest. I left the instructions in the file. Everything that only has one # before it can be removed, but I wouldn't.

Make sure you backup your menu.lst file before you start editing it. Also it would be good if you had a boot cd to get back into the system if you make a mistake, or I made a mistake. :-)

I would suggest downloading and burning Supergrub iso. You can Google and find it easily.

If you have any questions ask.

Keep me posted.

Fred


MENU.LST

# 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-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.
default 0

gfxmenu=/etc/grub/message.mint

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

# 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


# THIS BEGINS THE NEW ENTRY BY FRED you can change the titles to read as you wish

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title Puppy linux (on /dev/sda5)
root (hd0,4)
kernel /boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda5 acpi=on resume=/dev/sda3 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img
savedefault
boot

title
root

# THIS ENDS THE NEW ENTRY BY FRED

### 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/sda6 ro

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

## 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

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) 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

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

## ## End Default Options ##

title Linux Mint 4.0 KDE CE, kernel 2.6.22-14-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint 4.0 KDE CE, kernel 2.6.22-14-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda6 ro single
initrd /boot/initrd.img-2.6.22-14-generic
boot

title Linux Mint 4.0 KDE CE, kernel memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
jadaro
Level 1
Level 1
Posts: 12
Joined: Wed Dec 05, 2007 3:45 pm

Re: Revising a menu.lst

Post by jadaro »

Fred thanks a lot.
Your revised menu.lst got me to one screen and the correct choice as default.
Now I have to get familiar with Mint.
yamawho
Level 3
Level 3
Posts: 183
Joined: Tue Dec 04, 2007 8:53 pm

Re: Revising a menu.lst

Post by yamawho »

Fred ... your a wild man :mrgreen:

I keep wanting to add another distro to my rig but I know I will screw it up :roll:

I already have XP and Mint on one hdd, if I install Open Suse and or Mandriva, would I be able to boot of all these without too many manual edits ?

Is there a guide somewhere on playing with stuff like these that won't put me to sleep ?
Fred

Re: Revising a menu.lst

Post by Fred »

Good, I am glad it seems to be working out for you.

Now at some later date, if you decide you want to keep the other linux install, we can fix it so the kernel will update automatically. As it stands you will have to manually update this menu.lst if you ever update your other linux kernel.

Enjoy :-)

Fred
Fred

Re: Revising a menu.lst

Post by Fred »

yamawho,

I don't know about the wild part....lol Might be some wishful thinking there. :-)

Yes you can add distros without much trouble. The key is to not load the new grubs into the mbr, like all the installers seem to want to do. When you install another distro install grub to the partition that the /boot file of the new distro is in. That is usually /.

Then you just add the 3 or 4 chainloder lines to the Mint menu list and you are done.

Hope this helps you.

Fred
Last edited by Fred on Tue Feb 12, 2008 4:06 am, edited 1 time in total.
yamawho
Level 3
Level 3
Posts: 183
Joined: Tue Dec 04, 2007 8:53 pm

Re: Revising a menu.lst

Post by yamawho »

I was looking over the Mandriva install screens and I saw two grub install options, one to MBR and the other to root.

So if I understand this correctly, once I install it, it will not boot without 3 or 4 chainloader lines ?

This is new ground for me ...
Fred

Re: Revising a menu.lst

Post by Fred »

yamawho,

That is correct. You would have to open the Mint /boot/grub/menu.lst and add these lines just before or just after your Windows chainloder lines.

This is one of my chainloader entries:


title Kbuntu Gutsy 7.10
root (hd0,0)
makeactive
chainloader +1

There is one possible "gotcha" that can pop up from time to time. Some times the versions of grub aren't compatible between distros and the new distro will not boot. If this occurs just open a terminal in Mint and type:

sudo grub

root (hd0,0)

setup (hd0,0)

quit


Of course you would have to change the hard drive and partition notation to whatever applies to you but that should make everything work right.

Hope this was a little bit helpful.

Fred
Last edited by Fred on Sat Feb 09, 2008 11:06 pm, edited 1 time in total.
yamawho
Level 3
Level 3
Posts: 183
Joined: Tue Dec 04, 2007 8:53 pm

Re: Revising a menu.lst

Post by yamawho »

Thanks for the response Fred.

I need to ponder my next move ...
Fred

Re: Revising a menu.lst

Post by Fred »

You are welcome sir. If you have a problem I'll be happy to try to help out.

Fred
Locked

Return to “Installation & Boot”