Nieuws:

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

Auteur Topic: (OPGELOST) Voorkeur in Grub2 aanpassen lukt me niet.  (gelezen 4395 keer)

(OPGELOST) Voorkeur in Grub2 aanpassen lukt me niet.
« Gepost op: 2010/07/16, 10:26:33 »
Damens, heren,
Ik kom er even niet meer uit. Ik heb op de laptop in de woonkamer een update gedaan van windows 7 (bloost een beetje, wijst beschuldigend naar vrouw die ubuntu niet wil). Uiteraard moest ik dan weer Grub opnieuw instellen, dus ervoor zorgen dat grub weer keurig verschijnt om de opstart-opties te geven. Dat is me keurig met allerlei wiki's bij de hand gelukt. Volgens afspraak met mijn vrouw moet de laptop standaard (default) opstarten in windows 7, dus wil ik als laatste slag de default-optie aanpassen in Grub. Dat krijg ik dus niet voor elkaar. Via Opstart manager niet, (kan wel via de menus wijzigingen aanbrengen die hij ook bewaart maar ze hebben geen effect!); via de handmatige methode aanpassen menu.lst heeft ook geen effect. Dus ben ik even uitgepuzzeld en vraag ik hier de hogere goden te hulp.
Wat moet ik doen om de default grub op te laten starten naar windows? (keuze 5 in mijn opstartscherm) ????

« Laatst bewerkt op: 2010/07/16, 16:48:48 door Goldfingers »
What's in a name....
AMD Zambezi FX6100, 16 Gb intern, Nvidia GTX650 TI, SSD Samsung 830, SSD Liteon 160 Gb. 1 HDD 500 Gb

Offline SaoLK

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #1 Gepost op: 2010/07/16, 10:45:08 »
ga naar  /etc/default/grub

zoek de lijn: GRUB_DEFAULT=0

wijzig naar  GRUB_DEFAULT=4  (voor keuze 5)

succes

Offline Gr8Jen

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #2 Gepost op: 2010/07/16, 11:03:34 »
ik ken het probleem van een persoon die niet alleen onder linux wil werken dus ik wil best helpen XD

ik heb het pas nog uitgevoerd dus voor het beval dat je niet alle stappen hebt doorlopen:
type in terminal
sudo su

geef het wachtwoord voor super user

type in terminal
nano /boot/grub/grub.cfg

om er zeker van te zijn dat je niet de menuentry moet aanpassen als er een extra kernel bij komt zoeken we naar de naam in plaats van boot nr:
zoek jouw menuentry voor windows 7 en kopieer dat wat staat inclusief ""  zonder de {
Citaat
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 66acce59acce2401
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

druk ctrl samen met x toets in en je sluit het bestand
als gevraagd wordt of je wijziginen wilt opslaan druk je n van no
vervolgens type je in de terminal:

nano /etc/default/grub

op de derde regel ongeveer staat GRUB_DEFAULT

deze regel wijzig je in:

Citaat
GRUB_DEFAULT="Microsoft Windows XP Professional (on /dev/sda1)"
alleen dan in wat bij jou de menuentry is voor windows 7 en opletten dat er geen spatie staat achter het = teken
druk ctrl samen met x toets in en je sluit het bestand
druk y om wijzigingen op te slaan
druk enter om naam van het bestand te bevestigen

om de wijzigingen door te voeren nog één commando in de terminal:

sudo update-grub
en het is gefikst.


als dit niet helpt horen we het graag

Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #3 Gepost op: 2010/07/16, 11:21:01 »
Ik heb de optie van gr8jan geprobeerd en ik merk dat als ik naar /etc/default/grub ga, ik een leeg scherm krijg, maw er staat helemaal niets in. Geen typefauten of zo, dubbel gechekt....dus kan het niet zo afmaken. Help !?
What's in a name....
AMD Zambezi FX6100, 16 Gb intern, Nvidia GTX650 TI, SSD Samsung 830, SSD Liteon 160 Gb. 1 HDD 500 Gb

Offline Gr8Jen

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #4 Gepost op: 2010/07/16, 11:38:46 »
probeer is:
nano /boot/grub/menu.lst
als je geen leeg scherm hebt gebruik je grub in plaats van grub2 en moet het compleet anders

Offline heir4c

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #5 Gepost op: 2010/07/16, 12:43:32 »
Welke versie heb je? Vanaf 9.10 gebruikt men Grub2, alle versies daarvoor de oude grub.
Tip: https://makkelijkelinuxtips.blogspot.com/p/1.html en http://wiki.ubuntu-nl.org/   Upload-site:http://imgur.com/
be Open be Free be Ubuntu

Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #6 Gepost op: 2010/07/16, 15:11:28 »
Ik krijg dit als ik mijn menu.lst bekijk: Zoals te zien heb ik de default op de 4e entry gezet, maar dat werkt dus niet:

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

## 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=64a1664a-2c8e-40e3-b02f-791724ee6482 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=64a1664a-2c8e-40e3-b02f-791724ee6482

## 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 vga=788

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

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## 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 10.04 LTS, kernel 2.6.32-23-generic
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/vmlinuz-2.6.32-23-generic root=UUID=64a1664a-2c8e-40e3-b02f-791724ee6482 ro quiet splash vga=788
initrd /boot/initrd.img-2.6.32-23-generic
quiet

title Ubuntu 10.04 LTS, kernel 2.6.32-23-generic (recovery mode)
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/vmlinuz-2.6.32-23-generic root=UUID=64a1664a-2c8e-40e3-b02f-791724ee6482 ro  single
initrd /boot/initrd.img-2.6.32-23-generic

title Chainload into GRUB 2
root 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/grub/core.img

title Ubuntu 10.04 LTS, memtest86+
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
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 Windows Vista (loader)
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


Moderator edit: Code-tags geplaatst
« Laatst bewerkt op: 2010/07/16, 15:18:26 door Ron »
What's in a name....
AMD Zambezi FX6100, 16 Gb intern, Nvidia GTX650 TI, SSD Samsung 830, SSD Liteon 160 Gb. 1 HDD 500 Gb

Offline jolo

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #7 Gepost op: 2010/07/16, 15:35:32 »
Ik krijg dit als ik mijn menu.lst bekijk: Zoals te zien heb ik de default op de 4e entry gezet, maar dat werkt dus niet:
Dan draai je dus toch GRUB versie 1.x. Maar waarom staat er dan in je topictitel grub2.

Dat de 4e entry niet werkt is waarschijnlijk omdat de divider regel ook telt voor de default keuze. Dan wordt het dus: default 5 zie ook deze hyperlink 
https://help.ubuntu.com/community/GrubHowto/ChangeDefaultOS

Eventueel zou dat Windows gedeelte bovenaan de menu.lst kunnen plaatsen. Dus die

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title      Windows Vista (loader)
rootnoverify   (hd0,0)
savedefault
makeactive
chainloader   +1
Dan kan default weer terug op 0
Hoofd PC januari 2018 HP Compaq Elite 8300 SFF Windows 10 & Xubuntu 18.04.3
PC 2011 Asus P8Z68-V Pro i7 2600K 8 GB RAM GT730 Xubuntu test pc
PC 2007 Asus P5B E6600 2GB RAM 8800GTS  
Notebook 2008 Lenovo ThinkPad R61i 8932GMG 2,5 GB RAM

Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #8 Gepost op: 2010/07/16, 15:47:50 »
Ikheb mijn systeem met de een live cd van 10.04 LTS weer gerestaureerd, dus ga ik er vanuit dat daar grub2 in zit, daarom. Ik heb je advies gevolgd en de windows-entry bovenaan gezet. Maar nada effect, er veranderd niets !!! ik snap er geen moer meer van!
# 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

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

### 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=64a1664a-2c8e-40e3-b02f-791724ee6482 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=64a1664a-2c8e-40e3-b02f-791724ee6482

## 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 vga=788

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

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## 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 10.04 LTS, kernel 2.6.32-23-generic
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/vmlinuz-2.6.32-23-generic root=UUID=64a1664a-2c8e-40e3-b02f-791724ee6482 ro quiet splash vga=788
initrd /boot/initrd.img-2.6.32-23-generic
quiet

title Ubuntu 10.04 LTS, kernel 2.6.32-23-generic (recovery mode)
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/vmlinuz-2.6.32-23-generic root=UUID=64a1664a-2c8e-40e3-b02f-791724ee6482 ro  single
initrd /boot/initrd.img-2.6.32-23-generic

title Chainload into GRUB 2
root 64a1664a-2c8e-40e3-b02f-791724ee6482
kernel /boot/grub/core.img

title Ubuntu 10.04 LTS, memtest86+
uuid 64a1664a-2c8e-40e3-b02f-791724ee6482
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



What's in a name....
AMD Zambezi FX6100, 16 Gb intern, Nvidia GTX650 TI, SSD Samsung 830, SSD Liteon 160 Gb. 1 HDD 500 Gb

Offline jolo

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #9 Gepost op: 2010/07/16, 16:01:30 »
Als je live cd van 10.04 LTS gebruikt hebt om grub opnieuw in het MBR van je harddisk te installeren, dan draai je zeker Ubuntu 10.04 LTS. Die standaard inderdaad grub2 heeft. Maar je had het echter over menu.lst die bij grub 1.x hoort. Grub2 gebruikt echter /boot/grub/grub.cfg zodat de antwoorden 1 en 2 van SaoLK en Gr8Jen van toepassing zijn.
Hoofd PC januari 2018 HP Compaq Elite 8300 SFF Windows 10 & Xubuntu 18.04.3
PC 2011 Asus P8Z68-V Pro i7 2600K 8 GB RAM GT730 Xubuntu test pc
PC 2007 Asus P5B E6600 2GB RAM 8800GTS  
Notebook 2008 Lenovo ThinkPad R61i 8932GMG 2,5 GB RAM

Offline Gr8Jen

  • Lid
Re: Voorkeur in Grub2 aanpassen lukt me niet.
« Reactie #10 Gepost op: 2010/07/16, 16:18:07 »
vaag

waarschijnlijk had je eerst grub voor het opstarten en heb je later 10.04 cd gebruikt zodat je grub2 heb gekregen.

Het lijkt me het beste om grub2 opnieuw te installeren omdat niet goed gegaan is omdat "/etc/default/grub" niet bestaat.
hierdoor zal die waarschijnlijk de standaard instellingen gebruiken en niet te wijzigen zijn.

zie de volgende link om grub2 te herstellen:
http://wiki.ubuntu-nl.org/community/Grub2

Re: Voorkeur in Grub2 aanpassen lukt me niet.-> OPgelost !!
« Reactie #11 Gepost op: 2010/07/16, 16:48:12 »
 =D
Super, dat was de tip die ik nodig had. Mijn veronderstelling was dus verkeerd, ik bleek toch nog de oude grub-versie er op te hebben staan. Ik heb daarna volgens de how-to geupgrade naar grub2 en daarna met de opstartmanager de voorkeur succesvol kunnen aangepast. Alles werkt weer zoals ik het wilde.
Top, bedankt voor je advies Gr8jen !!!
ik zal deze thread afsluiten !
What's in a name....
AMD Zambezi FX6100, 16 Gb intern, Nvidia GTX650 TI, SSD Samsung 830, SSD Liteon 160 Gb. 1 HDD 500 Gb