LinuxQuestions.org
Review your favorite Linux distribution.
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 01-09-2007, 11:28 AM   #1
Perquisitor
Member
 
Registered: Jul 2004
Location: Panama City Beach, Florida
Distribution: Debian Etch
Posts: 150

Rep: Reputation: 15
Boot Listing Advice Needed


I just installed Kubuntu 6.1 on my parent's HP Laptop computer. They are even less computer literate than I am, and I am attempting to introduce them to the world of Linux. To lessen their confusion I would like to eliminate the multiple options at boot-up, and have only a choice of Kubuntu and Windows listed. How can I change the boot-up screen to eliminate the other items in the list? Currently this list of options is displayed:
Ubuntu, kernel 2.6.17-10-generic
Ubuntu, kernel 2.6.17-10-generic (recovery mode)
Ubuntu, memtest86+
Other operating systems:
Windows XP Media Center Edition
Windows NT/2000/XP
Microsoft Windows XP Embedded

I would like only to have the following listed:
Ubuntu, kernel 2.6.17-10-generic
Windows XP Media Center Edition

thanks in advance
 
Old 01-09-2007, 11:47 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
In this case, become superuser (root) in Ubuntu and with a text editor open the file /boot/grub/menu.lst. In the file find the sections describing the boot options you want to remove from the list (each consists of a few lines, you'll notice them) and either remove, or preferrably comment them out; commenting out is done by adding a #-mark to the very beginning of each line you wish not to be read (this causes GRUB to ignore those lines). So, simply write a # in the beginning of each line in every boot choice section you want to, save and exit - that's it.

A note: if you update the system using the package manager (apt, or it's front-ends like Synaptic or Adept), and the kernel is updated (a new kernel is installed), apt usually automatically reconfigures the menu.lst file, so after this you'll have to redo your changes I think. One option is to tell apt not to update the file automatically, but then you would have to add an entry to the new kernel yourself. It's probably easier to tell apt not to update the kernel automatically, and do it yourself manually if needed, fixing the menu.lst file at the same time. This way the list stays clean and nobody gets into trouble updating the kernel is not essential unless you face trouble or actually need some cool new stuff presented in the new kernel; this is usually not the case with "small" updates.
 
Old 01-09-2007, 12:18 PM   #3
Perquisitor
Member
 
Registered: Jul 2004
Location: Panama City Beach, Florida
Distribution: Debian Etch
Posts: 150

Original Poster
Rep: Reputation: 15
you know..........I've never had a problem becoming superuser on my own system, but when trying to follow the instructions you provided, I find that I am unable to become su in Kubuntu. I supplied the correct password in the terminal mode, but it says authentication failed. When I use the same password for the gui system administrator, it is successful. strange.

so, although you tried to assist me, I am unable presently to apply your advice.

any further advice as to how to resolve this?
 
Old 01-09-2007, 12:42 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Code:
sudo kwrite /boot/grub/menu.lst
then add a "#" to every line of the booting choice you don't want, starting from the title statement to the next line just before another "title" statement. (exactly as what B0uncer suggested)

Save the file.

That is it.

If you want to be taken by the hand post /boot/grub/menu.lst here so that we can show where to insert the "#"

Last edited by saikee; 01-09-2007 at 12:44 PM.
 
Old 01-09-2007, 01:24 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
In Ubuntu, the root user is disabled by default. Easy to fix---in a terminal:
sudo passwd root
you will be prompted for your normal user password, then it will ask you for the new root password. Once set up, then su will work.
 
Old 01-09-2007, 02:15 PM   #6
Perquisitor
Member
 
Registered: Jul 2004
Location: Panama City Beach, Florida
Distribution: Debian Etch
Posts: 150

Original Poster
Rep: Reputation: 15
ok....here's where I am. First I did what Saikee suggested. this is what I got. First the terminal screen displayed this:

marge@Lincoln1:~$ sudo kwrite /boot/grub/menu.lst
X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 144
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 166
Major opcode: 144
Minor opcode: 3
Resource id: 0x0
Failed to open device
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0.0
kded: ERROR: KUniqueApplication: Registering failed!
kded: ERROR: Communication problem with kded, it probably crashed.

Then almost immediately another screen opened and displayed 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-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

## 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=6a7525a4-c0ea-4a67-9771-07c8e5e605d1 ro
# kopt_2_6=root=/dev/hda1 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

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

## ## End Default Options ##

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title #Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root #(hd0,0)
kernel #/boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro single
initrd #/boot/initrd.img-2.6.17-10-generic
boot#
#
title #Ubuntu, memtest86+
root #(hd0,0)
kernel #/boot/memtest86+.bin
quiet#
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/hda2
title Windows XP Media Center Edition
root (hd0,1)
savedefault
makeactive
chainloader +1


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


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

and still I am unable to modify the boot menu
 
Old 01-09-2007, 02:18 PM   #7
Perquisitor
Member
 
Registered: Jul 2004
Location: Panama City Beach, Florida
Distribution: Debian Etch
Posts: 150

Original Poster
Rep: Reputation: 15
Then I did what Pixellany suggest..... that worked as far as changing the password, but when I go into a terminal and type su, and then my password, and then /boot/grub/menu.lst I get: Permission denied

hmmmmmmmm
 
Old 01-09-2007, 02:25 PM   #8
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
To give root the ability to run graphical applications in the user's environment, give this command as user:

xhost +localhost

then sudo kwrite.
 
Old 01-09-2007, 02:28 PM   #9
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,959

Rep: Reputation: Disabled
Quote:
Originally Posted by Perquisitor
/boot/grub/menu.lst
I get: Permission denied
hmmmmmmmm
This way you tried to execute the file. Precede the command with an editor name.

examples (do not know what editor you have there):

nano /boot/grub/menu.lst
vim /boot/grub/menu.lst
ee /boot/grub/menu.lst
 
Old 01-09-2007, 02:58 PM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Code:
# 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=6a7525a4-c0ea-4a67-9771-07c8e5e605d1 ro
# kopt_2_6=root=/dev/hda1 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

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

## ## End Default Options ##

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

#title #Ubuntu, kernel 2.6.17-10-generic (recovery mode)
#root #(hd0,0)
#kernel #/boot/vmlinuz-2.6.17-10-generic root=/dev/hda1 ro single
#initrd #/boot/initrd.img-2.6.17-10-generic
#boot#
#
#title #Ubuntu, memtest86+
#root #(hd0,0)
#kernel #/boot/memtest86+.bin
#quiet#
#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/hda2
title Windows XP Media Center Edition
root (hd0,1)
savedefault
makeactive
chainloader +1


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


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda4
#title #Microsoft Windows XP Embedded
#root #(hd0,3)
#savedefault#
#makeactive#
#chainloader #+1
I think you are getting a Desktop Editor Kwrite to edit the above file.

Every line starting with "#" will be disregarded and left there for information only.

I have disbled the choices you don't want with the additions marked in red.
 
Old 01-09-2007, 03:12 PM   #11
Perquisitor
Member
 
Registered: Jul 2004
Location: Panama City Beach, Florida
Distribution: Debian Etch
Posts: 150

Original Poster
Rep: Reputation: 15
thank you all for your help. per the last post by Saikee, I was able to see that I had placed the # symbols in the wrong location. I went back and corrected this and now I have accomplished what I was trying to do.

Thanks again to you all for your assistance. I love this place.
 
  


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
advice needed crimsonmuon Linux - Software 1 12-19-2005 04:57 AM
Triple boot advice needed plz. mortal Slackware 2 11-26-2005 04:27 PM
dual boot advice needed RRepster General 8 11-08-2005 02:27 PM
advice needed bshearer *BSD 2 04-18-2005 12:19 PM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 10:11 AM


All times are GMT -5. The time now is 10:27 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