[Ubuntu] Grub default OS aanpassen

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

Anoniem: 296662

Topicstarter
Ik heb Ubuntu geinstalleerd naast een al bestaande XP installatie. Als ik mijn PC nu aanzet, krijg ik de Grub bootloader. Standaard start die Ubuntu op, maar dit wil ik veranderen naar XP.

Op de internets vond ik dat ik in /boot/grub/menu.lst de "default" value moet aanpassen. In menu.lst zouden de verschillende opties aangegeven staan met # entry 1, # entry 2, etc. Je kunt dan het default entry nummer invullen. Echter, in mijn menu.lst staan geen "# entry x"-secties aangegeven. Wat moet ik nu invullen als default value om te zorgen dat XP standaard laadt?

Van tevoren excuses voor de lange copy-paste, maar omdat ik nieuw ben met Ubuntu, weet ik niet zeker wat wel en niet van belang is. Volgens mij kan alles wat uitgecommentarieerd staat, worden weggelaten voor dit topic, maar je weet maar nooit :)

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# 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

### 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=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9

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

## 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 9.04, kernel 2.6.28-16-generic
uuid        1ccecdf4-d5ab-424d-8853-e44b6e38c3d9
kernel      /boot/vmlinuz-2.6.28-16-generic root=UUID=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9 ro quiet splash 
initrd      /boot/initrd.img-2.6.28-16-generic
quiet

title       Ubuntu 9.04, kernel 2.6.28-16-generic (recovery mode)
uuid        1ccecdf4-d5ab-424d-8853-e44b6e38c3d9
kernel      /boot/vmlinuz-2.6.28-16-generic root=UUID=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9 ro  single
initrd      /boot/initrd.img-2.6.28-16-generic

title       Ubuntu 9.04, kernel 2.6.28-11-generic
uuid        1ccecdf4-d5ab-424d-8853-e44b6e38c3d9
kernel      /boot/vmlinuz-2.6.28-11-generic root=UUID=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9 ro quiet splash 
initrd      /boot/initrd.img-2.6.28-11-generic
quiet

title       Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid        1ccecdf4-d5ab-424d-8853-e44b6e38c3d9
kernel      /boot/vmlinuz-2.6.28-11-generic root=UUID=1ccecdf4-d5ab-424d-8853-e44b6e38c3d9 ro  single
initrd      /boot/initrd.img-2.6.28-11-generic

title       Ubuntu 9.04, memtest86+
uuid        1ccecdf4-d5ab-424d-8853-e44b6e38c3d9
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       Microsoft Windows XP Professional
rootnoverify    (hd0,0)
savedefault
makeactive
chainloader +1

Acties:
  • 0 Henk 'm!

  • zwippie
  • Registratie: Mei 2003
  • Niet online

zwippie

Electrons at work

Volgens mij wil je default aanpassen naar 6.

Als je onderin je config het aantal entries gaat tellen kom je op 7 (inclusief de 'Other operating systems') maar aangezien je moet beginnen met tellen bij 0 kom je dus op 6.

Volgens mij had je dit ook best zelf kunnen vinden en dan met wat proberen kunnen zien wat er gebeurt.

How much can you compute with the "ultimate laptop" with 1 kg of mass and 1 liter of volume? Answer: not more than 10^51 operations per second on not more than 10^32 bits.


Acties:
  • 0 Henk 'm!

  • u_nix_we_all
  • Registratie: Augustus 2002
  • Niet online
Of je verplaatst het blok met de gegevens van je windows (de laatste 7 regels) naar boven, voor de regel "### BEGIN AUTOMAGIC KERNELS LIST". Eventueel daarbij default=0.

Dan loop je ook niet het risico dat het weer aangepast moet worden als er een nieuwe kernel geinstalleerd wordt met de updates, en de lijst langer wordt.

You don't need a parachute to go skydiving. You need a parachute to go skydiving twice.


Acties:
  • 0 Henk 'm!

  • MaximusTG
  • Registratie: April 2003
  • Niet online
(overleden)
Als je het niet goed durft om hier mee te gaan prutsen, zorg dan dat je van te voren een backup hebt van je menu.lst, en een werkende live-cd/usb hebt liggen. Bij een probleem kan je dan zo je menu.lst backup terugzetten! Of editten vanuit de live cd omgeving.

Zin in pizza? Probeer 'mijn' pizzarecept eens! Laatste versie pizzarecept Blog:KookKompas


Acties:
  • 0 Henk 'm!

  • jayvol09
  • Registratie: Augustus 2009
  • Laatst online: 02-09-2020
of installeer startupmanager en je kan t met een gui doen denk ik.

[ Voor 7% gewijzigd door jayvol09 op 25-11-2009 19:38 ]

"Between the weak and the strong one it is the freedom which oppresses and the law that liberates" [Jean Jacques Rousseau]


Acties:
  • 0 Henk 'm!

  • Ozzie
  • Registratie: Februari 2004
  • Laatst online: 09:56
Je kan ook default op saved zetten. De volgende keer dat je dan windows start zal Grub dit onthouden en automatisch windows kiezen.

Edit:
code:
1
2
3
4
5
# 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    saved


Zo word dat eerste stukje dan dus.

[ Voor 56% gewijzigd door Ozzie op 25-11-2009 19:43 ]

"Write code as if the next maintainer is a vicious psychopath who knows where you live."

Pagina: 1