Revising a menu.lst

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Revising a menu.lst

Postby jadaro on Fri Feb 08, 2008 5:41 pm

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

Linux Mint is funded by ads and donations.
 

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 5:53 pm

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.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby timmyflight on Fri Feb 08, 2008 6:01 pm

Always, Always, make a backup copy of your existing file if you're not sure how changes will affect your system...
Image

Believe on the Lord Jesus Christ, and you will be saved, and your house
Acts 16:31
User avatar
timmyflight
Level 2
Level 2
 
Posts: 87
Joined: Tue Dec 12, 2006 11:42 pm
Location: PA, USA

Re: Revising a menu.lst

Postby jadaro on Fri Feb 08, 2008 6:46 pm

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

Re: Revising a menu.lst

Postby Chi on Fri Feb 08, 2008 7:03 pm

Hi Jadaro

Can you post the menu.lst with a quick description of what you want to accomplish (i.e. which lines/os'es to be present, which to be default)? This could help Fred (who is quite helpful and busy). More general concepts are around if googled, but if these don't make sense then the help here can really assist making that research practical (I for one have to see it applied to my own system to fully understand).

BTW backup is the greatest, yet sometimes most overlooked, advice for configuration files.
Last edited by Chi on Fri Feb 08, 2008 7:40 pm, edited 1 time in total.
Time is what keeps everything from happening all at once.
User avatar
Chi
Level 2
Level 2
 
Posts: 79
Joined: Wed Jan 09, 2008 5:02 am
Location: New Zealand

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 7:11 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby jadaro on Fri Feb 08, 2008 7:26 pm

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

Postby jadaro on Fri Feb 08, 2008 7:51 pm

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

Re: Revising a menu.lst

Postby Chi on Fri Feb 08, 2008 8:22 pm

Hi Fred, keep up the good work. :D

Whow, that's some reading (sorry it took me so long I'm looking after the children)

Firstly changing line 8;
default 0
will change the system that gets booted. So after commenting out the un-needed systems (below) either count from 0 which one is first and change the number. The alternative is to leave this as default 0 and change the listed order of the systems to boot.

Now about the bootable systems, still trying to read what I am seeing. Now I know you only want 3 listing but I strongly advise keeping the recovery mode boots (this may save your life one day when you can't locate that supergrub or other livecd to change the menu.lst). That said, you have made a backup right? :)

OK simply comment out what you no longer need. Or you could get brutal & do something like:

Code: Select all
default 0
gfxmenu=/etc/grub/message.mint
timeout 10
color cyan/blue white/blue

# Use either this listing or the other called Puupy Linux
#OS Listing #0
# /dev/sda5.
title PCLOS (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

#OS listing #1 -- LinuxMint;  from freedom...
# /dev/sda6
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

# This is only one of what appears to be 2 windows systems
#OS Listing #3
# /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1



For this I am assuming:
/dev/sda5 is PCLOS and that this listing boots successfully (just use the other /dev/sda5 one if not)
That you do not want to boot /dev/sda2 (possibly another Windows system)

Let me know if any of this makes sense.

Gotta go stop a fight.
Time is what keeps everything from happening all at once.
User avatar
Chi
Level 2
Level 2
 
Posts: 79
Joined: Wed Jan 09, 2008 5:02 am
Location: New Zealand

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 8:53 pm

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.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 9:06 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby jadaro on Fri Feb 08, 2008 9:45 pm

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

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 10:00 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 10:21 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby jadaro on Fri Feb 08, 2008 11:07 pm

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

Re: Revising a menu.lst

Postby yamawho on Fri Feb 08, 2008 11:15 pm

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 ?
ImageImage
User avatar
yamawho
Level 3
Level 3
 
Posts: 183
Joined: Tue Dec 04, 2007 8:53 pm

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 11:28 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby Fred on Fri Feb 08, 2008 11:37 pm

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.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Revising a menu.lst

Postby yamawho on Sat Feb 09, 2008 12:00 am

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 ...
ImageImage
User avatar
yamawho
Level 3
Level 3
 
Posts: 183
Joined: Tue Dec 04, 2007 8:53 pm

Re: Revising a menu.lst

Postby Fred on Sat Feb 09, 2008 12:20 am

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.
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: waynea and 12 guests