LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-27-2007, 02:45 PM   #1
SickNick
Member
 
Registered: Jan 2007
Posts: 109

Rep: Reputation: 15
Ubuntu GRUB boot loader


How can you edit the Grub so theres not 10 things to choose from to load up, how do u set defaults nd so on, can i do it through ubuntu. Sorry im new to ubuntu from openSUSE nd still a new linux user
 
Old 03-27-2007, 02:53 PM   #2
RedEyez
Member
 
Registered: Nov 2006
Location: Wenatchee, Washington
Distribution: Slackware, Gentoo's and Funtoo's, Roll your Own (LFS, not doobies)
Posts: 67

Rep: Reputation: 15
quick search on google gave me this, might work for you might not, give it a look: GrubED
 
Old 03-27-2007, 08:15 PM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Have a look at /boot/grub/menu.lst, which is where the grub menu is defined.

You can set the default option with the "default" line near the top of this file. Remember that the first entry is 0. You can comment out entries you don't require with # at the beginning of the line, but make sure you adjust the default appropriately.

If you make the default saved:
Code:
default saved
instead of a number, it should default to the last OS that you booted, provided that the "savedefault" is specified for each OS entry.

The file is quite well commented, and self explanatory. If you need more help, post back here.

I hope this helps
--Ian
 
Old 03-27-2007, 08:29 PM   #4
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
Chances are you don't really need those extra choices anyway. The simplest way is to run the Synaptic package manager and delete the ones you no longer need. In Synaptic search for "linux-image" and delete those packages with version numbers you no longer need. Grub will be updated for you. No CLI required.
 
Old 03-28-2007, 08:36 AM   #5
SickNick
Member
 
Registered: Jan 2007
Posts: 109

Original Poster
Rep: Reputation: 15
im a little confused, what im baisically trying to achieve is to have two things on the Grub Boot Loader, i want one to say Linux and the other to say Windows. The rest are nothing, there memtest, failsafe, other operating system which is a blank partition, Another Windows patition which isnt windows its a small os for my quicklaunch buttons nd thats about it, thats not needed. Your saying i could edit my boot loader through the Synaptic Package Manager? Cuz if thats the case thats great cuz thats how it was done in suse through the yast manager
 
Old 03-28-2007, 08:15 PM   #6
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
No, you can't edit your GRUB menu using Synaptic. What others were suggesting is to remove any Linux kernels that have been superseded by updates.

Like I said before, open up /boot/grub/menu.lst, and read it. Comment out with a # at the beginning of the line any entries you don't want. It is quite easy to see which entry is which.

--Ian
 
Old 03-28-2007, 09:46 PM   #7
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
Quote:
Originally Posted by IBall
No, you can't edit your GRUB menu using Synaptic. What others were suggesting is to remove any Linux kernels that have been superseded by updates.

Like I said before, open up /boot/grub/menu.lst, and read it. Comment out with a # at the beginning of the line any entries you don't want. It is quite easy to see which entry is which.

--Ian
Synaptic may not edit grub but it will remove options to boot from linux-images Synaptic is told to remove completely. Perhaps it wouldn't do that if you only told it to remove the package. I've always done remove completely and grub has been updated.
 
Old 03-28-2007, 10:22 PM   #8
DJNolz83
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91

Rep: Reputation: 15
SickNick, can you throw us a bone here and post your menu.lst file?
We can then pick it apart and give you a new one that way.

Who knows, you may even be able to use the one we give you back!
 
Old 04-03-2007, 08:12 PM   #9
SickNick
Member
 
Registered: Jan 2007
Posts: 109

Original Poster
Rep: Reputation: 15
k i got it working with only the two boots that i want windows and linux. Now i want to default windows cuz this is on my home desktop which my brothers use. I feel like i did everything right but its always defaulting linux. Check my menu.lst out

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

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

## 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=c6db1ee1-5a23-4fb6-8fae-d3a6d26060d4 ro
# kopt_2_6=root=/dev/sdb1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,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 Linux
root (hd1,0)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sdb1 ro quiet splash
initrd /boot/initrd.img-2.6.17-11-generic
quiet
boot

#title Ubuntu, kernel 2.6.17-11-generic (recovery mode)
#root (hd1,0)
#kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sdb1 ro single
#initrd /boot/initrd.img-2.6.17-11-generic
#boot

#title Ubuntu, kernel 2.6.17-10-generic
#root (hd1,0)
#kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sdb1 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 (hd1,0)
#kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sdb1 ro single
#initrd /boot/initrd.img-2.6.17-10-generic
#boot

#title Ubuntu, memtest86+
#root (hd1,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/sda1
title Windows Vista
root (hd0,0)
makeactive
chainloader +1
savedefault

Last edited by SickNick; 04-04-2007 at 03:43 PM.
 
Old 04-06-2007, 01:36 AM   #10
SickNick
Member
 
Registered: Jan 2007
Posts: 109

Original Poster
Rep: Reputation: 15
never mind, its working now
 
Old 04-06-2007, 02:42 PM   #11
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
"default saved" defaults the selection to whichever entry you picked last. If Ubuntu was picked last, then Ubuntu will be selected. If Windows was picked last, then Windows will be selected.

If you want it to always select Windows by default, change it to "default 1" so that the 2nd entry in the list (Windows) is selected by default.

--ian
 
  


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
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 05:45 PM
Installed FC5> Wrote over Ubuntu MBR: How do i add Ubuntu Partition to Grub Loader Free_beer Ubuntu 4 10-02-2006 06:11 PM
Boot Loader (grub) will not work with Ubuntu ajd344 Linux - Newbie 6 08-21-2006 05:42 PM
Install of Ubuntu failed - how do I get rid of the GRUB Loader? supapat Linux - Newbie 2 11-18-2005 09:11 PM
Ubuntu and GRUB loader miickEe. Ubuntu 11 08-23-2005 10:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:18 AM.

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
Open Source Consulting | Domain Registration