Server-Foren > Server - HowTo's

Debian Kernel Update Config Grub

(1/2) > >>

wbauer:
Hallo,

nach einem Kernel Update von 2.6.18-4-amd64 auf 2.6.18-5-amd64 nimmt der Server beim Booten leider dennoch den alten Kernel.
Wie sollte ich die menu.lst verändern ?

Was mache ich, falls der Server nach der Änderung und einem reboot nicht mehr hochfährt ?

Danke.

wbauer

Hier die menu.lst

default         0
timeout         5
color cyan/blue white/blue

title           Debian GNU/Linux, kernel 2.6.18-4-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 apm=off ro noapic acpi=off nolapic
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-4-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro noapic acpi=off nolapic single
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault
### 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/md1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

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

## 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=(single-user) single
# altoptions=(single-user 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           Debian GNU/Linux, kernel 2.6.18-5-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-5-amd64 root=/dev/md1 ro
initrd          /boot/initrd.img-2.6.18-5-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-5-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-5-amd64 root=/dev/md1 ro single
initrd          /boot/initrd.img-2.6.18-5-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-4-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-4-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro single
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

### END DEBIAN AUTOMAGIC KERNELS LIST

White2001:
savedefault geht nur wenn du

default saved

benutzt.
und dann kansnte auch an kommandozeile mit grub-set-default 0  den index setzen.

is quasi nen byte im bootloader. ich nutz das imme rals fallback für nen neuen kernel.

default saved
kernel 0: mit panic=1
savedefault 1.

kernel 1:

kommandozeile grub-set-default 0 net vergessen.

wbauer:
Erstmal danke für Deine Antwort.

Allerdings stehe ich etwas auf der Leitung:

Was muss ich der menu.lst ersetzen/einkommentieren ?
Sind deine Angaben in die menu.lst einzutragen ?
An welcher Stelle ?

und zum Schluß am prompt: grub-set-default 0 eingeben ?

Dann nimmt er kernel 0 ?
Und bei panic kernel 1 ?

Danke für Deine Mühe ...

White2001:
naja ich bin net so ins detail gegangen sondern wollte nur allgemein meine vorgehensweise schildern.

Sehr ausfürlich sit dies in der Anleoitung zu Grub erklärt. In nem extra Kapitel.
ich empfehle dringed das durchzulesen als irgendwo was abzuschrieben.
Wäre doof wenns net geht. Jeder Server ist doch bissle anders.
so Mein tipp:
Das ist ziemlich eifnach und kurz erklärt.
http://gentoo-wiki.com/HOWTO_Remote_Kernel_Upgrade
http://de.gentoo-wiki.com/Remote_Kernel_Upgrade
Ins Detail geht dagegen die Grub info pages.

Hoffe das hilft....

wbauer:
Ich bitte Dich nochmal um Hilfe.
Hier meine geänderte menu.lst:

default saved
timeout 10
fallback 0
color cyan/blue white/blue

title           Debian GNU/Linux, kernel 2.6.18-4-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 apm=off ro noapic acpi=off nolapic
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-4-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro noapic acpi=off nolapic single
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

### 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/md1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

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

## 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=(single-user) single
# altoptions=(single-user 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           Debian GNU/Linux, kernel 2.6.18-5-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-5-amd64 root=/dev/md1 ro
initrd          /boot/initrd.img-2.6.18-5-amd64
savedefault fallback

title           Debian GNU/Linux, kernel 2.6.18-5-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-5-amd64 root=/dev/md1 ro single
initrd          /boot/initrd.img-2.6.18-5-amd64
savedefault fallback

title           Debian GNU/Linux, kernel 2.6.18-4-amd64
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

title           Debian GNU/Linux, kernel 2.6.18-4-amd64 (single-user mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-4-amd64 root=/dev/md1 ro single
initrd          /boot/initrd.img-2.6.18-4-amd64
savedefault

### END DEBIAN AUTOMAGIC KERNELS LIST


Mich irritieren die doppelten Einträge oben und unten ...

Ist die Configuration so okay ?
Jetzt müßte ich grub-set-default 1 setzen, wenn ich das richtig verstanden habe ?

und später, falls er bootet

grub-set-default

ausführen ?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln