Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-27-2007, 02:45 PM
|
#1
|
Member
Registered: Jan 2007
Posts: 109
Rep:
|
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
|
|
|
03-27-2007, 02:53 PM
|
#2
|
Member
Registered: Nov 2006
Location: Wenatchee, Washington
Distribution: Slackware, Gentoo's and Funtoo's, Roll your Own (LFS, not doobies)
Posts: 67
Rep:
|
quick search on google gave me this, might work for you might not, give it a look: GrubED
|
|
|
03-27-2007, 08:15 PM
|
#3
|
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
|
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:
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
|
|
|
03-27-2007, 08:29 PM
|
#4
|
Senior Member
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466
Rep:
|
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.
|
|
|
03-28-2007, 08:36 AM
|
#5
|
Member
Registered: Jan 2007
Posts: 109
Original Poster
Rep:
|
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
|
|
|
03-28-2007, 08:15 PM
|
#6
|
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
|
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
|
|
|
03-28-2007, 09:46 PM
|
#7
|
Senior Member
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466
Rep:
|
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.
|
|
|
03-28-2007, 10:22 PM
|
#8
|
Member
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91
Rep:
|
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!
|
|
|
04-03-2007, 08:12 PM
|
#9
|
Member
Registered: Jan 2007
Posts: 109
Original Poster
Rep:
|
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.
|
|
|
04-06-2007, 01:36 AM
|
#10
|
Member
Registered: Jan 2007
Posts: 109
Original Poster
Rep:
|
never mind, its working now
|
|
|
04-06-2007, 02:42 PM
|
#11
|
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
|
"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
|
|
|
All times are GMT -5. The time now is 05:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|