LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2008, 11:08 AM   #1
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Rep: Reputation: 15
Edit Grub Menu in Kubuntu Hardy Heron KDE4


Please give me Simplified Instructions on Editing my Grub Menu in Kubuntu 8.04 Hardy Heron KDE4.

I have dual/boot with Windows XP Professional

I want to eliminate old kernels & change the Default boot

Thank You for your help

Last edited by Dakota42784; 07-09-2008 at 08:50 AM.
 
Old 07-08-2008, 11:58 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,474

Rep: Reputation: 189Reputation: 189
Post this file: /boot/grub/menu.lst. The menu.lst file is the configuration file for grub and it has to be edited to make the configuration changes you want.
 
Old 07-08-2008, 05:47 PM   #3
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Edit Grub Menu in Kubuntu Hardy Heron KDE4

But how do I edit the Grub?
 
Old 07-08-2008, 05:59 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,474

Rep: Reputation: 189Reputation: 189
I haven't used kde4, but the general procedure would be to launch kwrite with admin privileges by opening a console and running:

$ sudo kwrite /boot/grub/menu.lst

Enter your password when prompted and the text editor, kwrite, should come up with admin privileges displaying menu.lst.

However, I would post menu.lst here first. Screwing up menu.lst can leave your system in an unbootable condition. You have to be very careful when editing menu.lst.
 
Old 07-08-2008, 07:52 PM   #5
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Here is my Grub Menu:
I want Windows XP Professional to boot 1st because my wife uses it for her work.

# 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.
#
# 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 use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# 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=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

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

## 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=(recovery) 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

## 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 Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04.1, kernel 2.6.24-18-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro quiet splash
initrd /boot/initrd.img-2.6.24-18-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-18-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro single
initrd /boot/initrd.img-2.6.24-18-generic

title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04.1, memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin
quiet

### 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 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

 
Old 07-08-2008, 11:08 PM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Every time the word "title" appears is another entry that will show up in the menu at boot time. Below is the first entry called the default as the default is set to zero.
Code:
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
Every line with a hash (#) at the beggining is commented out and not read it is basically just notes or what ever. Towards the top of this example you provide is an un-commented line as such: default 0, because grub counts starting at zero, the first entry will be automatically booted if no selection is made within 10 seconds as the "timeout" is set to "10".
If you were to leave the file the way it is, you would change the default value to "8" to boot Windows automatically after 10 seconds as the Windows entry is the nineth entry.
If you wanted to remove all older kernel entries, you can simply delete them similar to the example below and change the default to "3" in order to boot Windows by default. As the example below suggests, you should keep the recovery mode entry as well as the latest kernel entry for Ubuntu.
Code:
# 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.
#
# 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 use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# 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=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

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

## 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=(recovery) 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

## 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 Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=34ea7579-0652-4748-9340-511109ec9e47 ro single
initrd /boot/initrd.img-2.6.24-19-generic


### 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 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
The best way to remove unwanted entries in the menu is to open synaptic and remove the older kernels and just keep the newest one if that's what you want. This way you slim down (lean out) your installation by actually removing kernels you won't boot and the menu list will be updated accordingly.
 
Old 07-09-2008, 08:23 AM   #7
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
In Reference to editing Grub Menu, How do I Install the Backup file if needed?

If I Screw up.........., Explain in detail, How I install the Backup that I made before Editing the Grub Menu?????

I think I install the Live Kubuntu CD & Then I am Lost????
 
Old 07-14-2008, 03:12 PM   #8
shridhar005
Member
 
Registered: Jul 2008
Posts: 90

Rep: Reputation: 17
Smile

try
Quote:
man grub
info grub
Surely there is solution for every problem.
 
Old 07-14-2008, 07:14 PM   #9
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Talking In Reference to editing Grub Menu, How do I Install the Backup file if needed?

Thank You for the Info, I will Read & then Edit My Grub.

I do not have the KDE4 anymore, Installed the Kubuntu 8.04 i386 Version. Too many problems with KDE4.
I am still confused on how to Install the Backup of the Grub If Needed.????????
 
Old 07-15-2008, 06:02 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Using synaptic, remove unwanted kernels.


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

and

### END DEBIAN AUTOMAGIC KERNELS LIST

will get updated, not the rest.

So if you would like for example to have the default one on window$, you should move the section about window$ as the first stanza and set
default 0



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

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


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

etc..


Make a backup of this menu.lst file if you are scared.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Kubuntu 8.04 (Hardy Heron) Screenshots Tour LXer Syndicated Linux News 0 06-22-2008 06:21 PM
How do I backup Kubuntu (Hardy Heron) harecanada Linux - Newbie 5 05-17-2008 10:20 AM
Recovering a menu option under Hardy Heron Linux31 Ubuntu 2 05-10-2008 03:52 PM
LXer: The Perfect Desktop - Kubuntu 8.04 (Hardy Heron) LXer Syndicated Linux News 0 05-01-2008 07:10 AM
LXer: Updating to Kubuntu 'Hardy Heron' 8.04 Beta LXer Syndicated Linux News 0 03-26-2008 06:50 PM


All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration