Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: GRUB aanpassen  (gelezen 2825 keer)

djvdorp

  • Gast
GRUB aanpassen
« Gepost op: 2006/07/13, 09:47:07 »
Hallo allemaal,

ik vind mijn GRUB-bootloader een beetje onoverzichtelijk worden met al
die kernels, dus zocht ik even bij Google en vond zo uit dat je via Synaptic
de oude kernels kan verwijderen. Nu heb ik dus alleen de nieuwste kernel, en de 1-na nieuwste laten staan, en de rest gedelete.

Nou had ik een vraag:

dit is mijn menu.lst van GRUB nu:

# 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=/dev/hdd1 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

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

## 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.15-25-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro quiet splash
initrd /boot/initrd.img-2.6.15-25-386
savedefault
boot

title Ubuntu, kernel 2.6.15-25-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.6.15-25-386
boot

title Ubuntu, kernel 2.6.15-23-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdd1 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot

title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot

title Ubuntu, memtest86+
root (hd1,0)
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/hdb1
title Microsoft Windows 2000 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
Nou wil ik deze ervan maken, dus dit is een bewerkte versie, zelfgemaakt, maar denken jullie dat hij zal werken, of zitten er nog fouten in?

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

## 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=/dev/hdd1 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

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

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

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

title Ubuntu, kernel 2.6.15-25-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro quiet splash
initrd /boot/initrd.img-2.6.15-25-386
savedefault
boot

title Ubuntu, kernel 2.6.15-25-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.6.15-25-386
boot

title Ubuntu, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
Even kort wat ik veranderd heb: Windows eerst booten ipv Ubuntu (hd0,0 ipv hd1,0), maar 1 kernel (de laatste) in menu.lst zetten, 30 sec wachten ipv 10 sec wachten en Windows bovenaan in de lijst...



Nou wil ik graag weten of het zou werken, omdat ik niet GRUB en/of meer wil slopen!

Alvast bedankt voor de hulp,
Daniel van Dorp

Offline mcgyver

  • Lid
GRUB aanpassen
« Reactie #1 Gepost op: 2006/07/13, 10:11:57 »
Wat je hebt gedaan kan. Je moet zelf kiezen. Wat  heb gedaan (ik heb een i686 kernel) is van de laatste i686 EN i386 zowel de gewone ALS de recoverymode bewaren. Voorts heb ik een # voor de timeout geplaatst. Dan blijft ie netjes wachten tot ik kies waarmee ik wil opstarten. Voor de rest heb ik ook alles weggeveegd.

Offline mcgyver

  • Lid
GRUB aanpassen
« Reactie #2 Gepost op: 2006/07/13, 10:31:38 »
Bij nader inzien twijfel ik over dit
Citaat van: djvdorp
Windows eerst booten ipv Ubuntu (hd0,0 ipv hd1,0)
stukje.

djvdorp

  • Gast
GRUB aanpassen
« Reactie #3 Gepost op: 2006/07/13, 12:56:44 »
OK, bedankt voor de reactie, maar waarom niet over dat laatste stukje?

Offline mcgyver

  • Lid
GRUB aanpassen
« Reactie #4 Gepost op: 2006/07/13, 15:42:07 »
Citaat van: djvdorp
OK, bedankt voor de reactie, maar waarom niet over dat laatste stukje?
Dit is de mijne (tenminste, het laatste gedeelte):


## ## End Default Options ##

title      Ubuntu, kernel 2.6.15-26-686
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.15-26-686 root=/dev/hda2 ro quiet splash
initrd      /boot/initrd.img-2.6.15-26-686
savedefault
boot

title      Ubuntu, kernel 2.6.15-26-686 (recovery mode)
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.15-26-686 root=/dev/hda2 ro single
initrd      /boot/initrd.img-2.6.15-26-686
boot

title      Ubuntu, kernel 2.6.15-26-386
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro quiet splash
initrd      /boot/initrd.img-2.6.15-26-386
savedefault
boot

title      Ubuntu, kernel 2.6.15-26-386 (recovery mode)
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro single
initrd      /boot/initrd.img-2.6.15-26-386
boot

title      Ubuntu, memtest86+
root      (hd0,1)
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/hda1
title      Microsoft Windows XP Professional
root      (hd0,0)
savedefault
makeactive
chainloader   +1

Tot zover de mijne.

Lees de posts in onderstaande links en probeer het even uit, maar als ik het goed begrepen heb, moet windows bovenaan zetten ook helpen.


http://forum.ubuntu-nl.org/topic/1915

Offline profoX

  • Lid
    • wesley
    • Lionslink
GRUB aanpassen
« Reactie #5 Gepost op: 2006/07/13, 16:22:25 »
hd(x,y) veranderen is geen goed idee, aangezien dat heeft te maken met aanwijzen van harde schijf/partitie

om opstartvolgorde te wijzigen kan je ofwel savedefault gebruiken bij een bepaalde keuze ofwel default num aanpassen
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

djvdorp

  • Gast
GRUB aanpassen
« Reactie #6 Gepost op: 2006/07/16, 16:19:36 »
ProfoX en mcgyver, bedantk voor de tips, ik heb er nu dit van gemaakt:

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

## 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=/dev/hdd1 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

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

## 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.15-25-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro quiet splash
initrd /boot/initrd.img-2.6.15-25-386
savedefault
boot

title Ubuntu, kernel 2.6.15-25-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-25-386 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.6.15-25-386
boot

title Ubuntu, kernel 2.6.15-23-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdd1 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot

title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdd1 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot

title Ubuntu, memtest86+
root (hd1,0)
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/hdb1
title Microsoft Windows 2000 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
Is deze nu wel goed? En hoe kan ik Windows 2000 als standaard zetten? (ik snap het savedefault en defaultnum niet helemaal...)



Met vriendelijke groet,
Daniel van Dorp



EDIT: als ik van ## default num 5 maak, dan boot hij toch standaard na 30 seconden van Windows?

Offline profoX

  • Lid
    • wesley
    • Lionslink
GRUB aanpassen
« Reactie #7 Gepost op: 2006/07/16, 16:45:55 »
Oei, wat een grote fout :) je hebt Windows 2000 bij Debian automagic geplaatst, als je nu een kernel upgrade krijgt, dan zal je Windows2000 volgens mij verdwijnen uit de lijst :p even een nota: de debian automagic zet automatisch alle ge
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

djvdorp

  • Gast
GRUB aanpassen
« Reactie #8 Gepost op: 2006/07/16, 16:51:25 »
ProfoX:

dat ik Windows 2000 bij automagic had geplaatst, was toch NIET bij mijn vorige post, maar die daarvoor?

En klopt het, dat als ik in deze lijst ## default num 5 zet, dat dan Windows 2000 na 30 seconden start?

Offline profoX

  • Lid
    • wesley
    • Lionslink
GRUB aanpassen
« Reactie #9 Gepost op: 2006/07/16, 16:59:10 »
Citaat van: djvdorp
ProfoX:

dat ik Windows 2000 bij automagic had geplaatst, was toch NIET bij mijn vorige post, maar die daarvoor?

En klopt het, dat als ik in deze lijst ## default num 5 zet, dat dan Windows 2000 na 30 seconden start?
Ja, was die post daarvoor, sorry.

niet "##default num" maar een beetje naar beneden,
daar staat "default 0" en daar kan je bv. "default 6" van maken om Windows 2000 automatisch op te starten, maar als je een kernel update doet komen er meer Ubuntu kernels weer in je Grub te staan en moet je het weer handmatig aanpassen je /boot/grub/menu.lst (ik weet geen makkelijkere manier)
Maar ik heb gewoon "savedefault" gezet bij je Windows2000 partitie en dan "default saved" ingesteld. Dat is hetzelfde effect, maar minder prutsen met getalletjes.
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

djvdorp

  • Gast
GRUB aanpassen
« Reactie #10 Gepost op: 2006/07/16, 17:05:23 »
OK, bedankt voor de fantastische hulp hier, bij Windows vind je die niet zomaar :P

Ik ga hem gelijk proberen, als het niet werkt kom ik weer terug op het topic (hoop ik ;))...

djvdorp

  • Gast
GRUB aanpassen
« Reactie #11 Gepost op: 2006/07/16, 19:40:49 »
Ik heb menu.lst net gewijzigd, na een backup gemaakt te hebben, en ga nu rebooten, dus op hoop van zegen he ;)

GRUB aanpassen
« Reactie #12 Gepost op: 2006/07/16, 20:47:16 »
Als je wil dat windows vanzelf opstart dan zou ik ook eerder het default nummer veranderen ipv windows bovenaan te zetten. Veel veiliger en dat deed ik ook toen in dualbootte.
Je kan de oude kernels ook verwijderen door ze te de

djvdorp

  • Gast
GRUB aanpassen
« Reactie #13 Gepost op: 2006/07/16, 23:05:57 »
Bedankt voor alle goede hulp, ik heb de menu.lst van ProfoX gebruikt en het werkt perfect, zeker met die savedefault-parameter...

En Burnass, bedankt voor de tip over het verwijderen van oude kernels om schijfruimte vrij te maken!

Dus even voor het topic, ik heb Windows NIET bovenaan gezet, maar de truc van ProfoX gebruikt met savedefault.

Offline profoX

  • Lid
    • wesley
    • Lionslink
GRUB aanpassen
« Reactie #14 Gepost op: 2006/07/16, 23:29:18 »
Ik was al bang dat het verkeerd was gegaan, vanwege de late reply :)
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

djvdorp

  • Gast
GRUB aanpassen
« Reactie #15 Gepost op: 2006/07/16, 23:32:07 »
Nee, gelukkig niet ProfoX, maar als ik eenmaal aan Ubuntu ben begonnen op een dag, ben ik niet meer te stoppen, dus na GRUB aangepast te hebben, ben ik aan het werk gegaan met WINE, maar ik snap er nog niet erg veel van...



Nog een fijne avond/nacht en bedankt voor de goede zorgen,
Daniel van Dorp

GRUB aanpassen
« Reactie #16 Gepost op: 2006/07/16, 23:35:04 »
Citaat van: djvdorp
Dus even voor het topic, ik heb Windows NIET bovenaan gezet, maar de truc van ProfoX gebruikt met savedefault.
Oke fout gelezen.

NB: als je de oude kernels er af haalt, zorgt synaptic er ook voor dat je menu.lst wordt aangepast. maw je oude kernels er vanzelf uitgaan.

Nog een tip:
ALS je 90% altijd dezelfde bootoptie gebruikt jan het handig zijn in het booten de GRUB 'onzichtbaar' te maken.
Ik de menu.lst staat er een regel hidemenu die je kan uncommanden. Dan zal de je keuzes niet meer zien. Enkel een klein regeltje.
Om het menu te krijgen kan je dan op ESC duwen tijdens dat regeltje er is. cfr om in je BIOS te geraken.

Groeten,
Arvid Van Essche

djvdorp

  • Gast
GRUB aanpassen
« Reactie #17 Gepost op: 2006/07/16, 23:36:53 »
OK Burnass nog bedankt voor de tip en ook een fijne avond!