Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 09/08/2017, à 16:39

tweetysat

Changement de kernel

Bonjour à tous,

J'ai un serveur dédié chez kimsufi.  Pour le moment je suis toujours en ubuntu 14.04.

Avant de passer en 16.04 je voudrais 'dockeriser' certaines applications.

J'ai donc installé docker.  Un docker -v fonctionne mais impossible de démarrer un container avec une erreur du style error response from daemon: failed to create endpoint eager_bassi on network bridge.

Après quelques recherches sur le net le problème viendrait du fait que ovh utilise un kernel à eux (dans mon cas Ubuntu 14.04 LTS, OVH kernel 3.10.23-xxxx-std-ipv6-64).

J'ai donc trouvé ces 2 guides pour mettre un noyau 'normal' à la place.
ici et ici

En mixant les 2 j'en suis arrivé à ceci

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="Advanced options for Ubuntu>0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod ext2
set root='hd0'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
else
  search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=2
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=2
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
                set vt_handoff=vt.handoff=7
        else
                set vt_handoff=
        fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod ext2
        set root='hd0'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
        else
          search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
        fi
        linux   /boot/vmlinuz-3.13.0-126-generic root=/dev/sda1 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
        initrd  /boot/initrd.img-3.13.0-126-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
        menuentry 'Ubuntu, with Linux 3.13.0-126-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-126-generic-advanced-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
                recordfail
                load_video
                gfxmode $linux_gfx_mode
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
                else
                  search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
                fi
                echo    'Loading Linux 3.13.0-126-generic ...'
                linux   /boot/vmlinuz-3.13.0-126-generic root=/dev/sda1 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.13.0-126-generic
        }
        menuentry 'Ubuntu, with Linux 3.13.0-126-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-126-generic-recovery-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
                recordfail
                load_video
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
                else
                  search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
                fi
                echo    'Loading Linux 3.13.0-126-generic ...'
                linux   /boot/vmlinuz-3.13.0-126-generic root=/dev/sda1 ro recovery nomodeset
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.13.0-126-generic
        }
        menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
                recordfail
                load_video
                gfxmode $linux_gfx_mode
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
                else
                  search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
                fi
                echo    'Loading Linux 3.13.0-24-generic ...'
                linux   /boot/vmlinuz-3.13.0-24-generic root=/dev/sda1 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.13.0-24-generic
        }
        menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-8eec7161-1a66-42cf-9fd5-4924f4f1b791' {
                recordfail
                load_video
                insmod gzio
                insmod ext2
                set root='hd0'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
                else
                  search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
                fi
                echo    'Loading Linux 3.13.0-24-generic ...'
                linux   /boot/vmlinuz-3.13.0-24-generic root=/dev/sda1 ro recovery nomodeset
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.13.0-24-generic
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_OVHkernel ###
menuentry "Ubuntu 14.04 LTS, OVH kernel 3.10.23-xxxx-std-ipv6-64" {
        insmod ext2
        set root='hd0'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  8eec7161-1a66-42cf-9fd5-4924f4f1b791
        else
          search --no-floppy --fs-uuid --set=root 8eec7161-1a66-42cf-9fd5-4924f4f1b791
        fi
        linux   /boot/bzImage-3.10.23-xxxx-std-ipv6-64 root=/dev/sda1 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
}
### END /etc/grub.d/25_OVHkernel ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

et

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="Advanced options for Ubuntu>0"
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nomdmonddf nomdmonisw nomdmonddf nomdmonisw"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

J'ai aussi essayé avec GRUB_DEFAULT=0 mais ça ne change rien.  Le serveur de démarre pas.

Obligé à chaque fois de redémarrer en mode rescue, remettre comme avant et redémarrer.

Et je ne sais pas du tout ce qui peut se passer ni pourquoi il ne démarre plus...

Quelqu'un peut m'aider ?

Merci.

Hors ligne

#2 Le 10/08/2017, à 12:56

bruno

Re : Changement de kernel

Bonjour,

Quoiqu'il en soit il na faut pas modifier le fichier grub.cfg. C'est écrit en gros en tête du fichier…
On adapte la configuration de GRUB en modifiant/créant des fichiers dans /etc/grub.d et éventuellement /etc/default/grub.cionf et on met à jour avec :

sudo update-grub

La configuration des serveurs OVH est particulière (il y a un fichier spécifique à OVH dans /etc/grub.d) et la réponse se trouve dans leurs documentations officielles et sur leurs forums.

En ligne

#3 Le 10/08/2017, à 18:43

tweetysat

Re : Changement de kernel

Bonjour bruno,

Merci pour ta réponse.

Mais je te rassure, je n'ai pas changé grub.cfg.  J'ai bien utilisé update-gub.  J'ai mis le contenu du fichier juste pour montrer ce que j'ai.

Je suppose que le fichier spécial dont tu parles est 06_OVHkernel.  Comme repéré dans un autre tuto j'ai également essayé de le renommer en 25_OVHkernel (et ensuite un update-grub ;-) mais rien à faire.

Par contre si la réponse se trouve dans les docs officielles de ovh, je suis preneur d'un lien.

Encore merci d'essayer de m'aider.

edit :

Voilà ce que j'ai dans /boot

-rw-r--r-- 1 root root  1166936 Jul 20 22:10 abi-3.13.0-126-generic
-rw-r--r-- 1 root root  1158016 May  3  2014 abi-3.13.0-24-generic
-rw-r--r-- 1 root root  7694800 Mar 18  2014 bzImage-3.10.23-xxxx-std-ipv6-64
-rw-r--r-- 1 root root   166050 Jul 20 22:10 config-3.13.0-126-generic
-rw-r--r-- 1 root root   165510 May  3  2014 config-3.13.0-24-generic
drwxr-xr-x 5 root root     4096 Aug  9 17:39 grub
-rw-r--r-- 1 root root 21571782 Aug  9 16:29 initrd.img-3.13.0-126-generic
-rw-r--r-- 1 root root  7386187 Aug  9 16:29 initrd.img-3.13.0-24-generic
-rw-r--r-- 1 root root  2735956 Mar 18  2014 System.map-3.10.23-xxxx-std-ipv6-64
-rw------- 1 root root  3400307 Jul 20 22:10 System.map-3.13.0-126-generic
-rw------- 1 root root  3372643 May  3  2014 System.map-3.13.0-24-generic
-rw------- 1 root root  5851792 Jul 20 22:10 vmlinuz-3.13.0-126-generic
-rw------- 1 root root  5776416 May  3  2014 vmlinuz-3.13.0-24-generic

est-normal de ne pas avoir de fichier bzimage... pour les kernels 3.13.0-24 et 3.13.0-126 ?

Je les ai installé avec apt-get install linux-image-server et apt-get install linux-image-3.13.0-24-generic

Dernière modification par tweetysat (Le 10/08/2017, à 19:16)

Hors ligne

#4 Le 11/08/2017, à 06:53

bruno

Re : Changement de kernel

Tu devrais carrément supprimer le fichier de config d'OVH (ou plutôt le déplacer dans dossier personnel) :

sudo mv /etc/grub.d/25_OVHkernel ~/25_OVHkernel

même chose pour le kernel OVH :

sudo mv bzImage-3.10.23-xxxx-std-ipv6-64 ~/bzImage-3.10.23-xxxx-std-ipv6-64
sudo mv System.map-3.10.23-xxxx-std-ipv6-64 ~/System.map-3.10.23-xxxx-std-ipv6-64

Ensuite vérifier les liens symboliques à la racine :

ls -l /vmlinuz*

qui doivent pointer vers le dernier noyau installé.

Puis modifier le fichier /etc/default/grub :

GRUB_DEFAULT=0

Et finalement :

sudo update-grub

Si le serveur ne démarre toujours pas il faudra examiner les logs.

Dernière modification par bruno (Le 11/08/2017, à 06:56)

En ligne

#5 Le 11/08/2017, à 19:12

tweetysat

Re : Changement de kernel

Super, merci bruno wink

Mais en fait je crois que ce que j'avais fait marchait bien.

Après avoir réalisé tes manips, cela ne marchait pas.  Mais je viens de comprendre.  Le problème ne venait pas du serveur qui ne démarrait plus.
Sur ce serveur j'héberge plusieurs domaines et pour l'un d'entre eux, le principal je gère aussi le dns.  Et en fait c'est bind qui ne démarrait plus !
Comme j'utilise ce nom de domaine pour ssh, ftp, et http, plus rien ne marchait donc je me suis dit c'est le serveur qui ne démarre plus.

J'avais cette erreur dans le log système

Aug 11 19:59:02 ns322380 kernel: [ 1007.776493] type=1400 audit(1502474342.068:24): apparmor="DENIED" operation="open" profile="/usr/sbin/named" name="/var/log/bind/query.log" pid=18796 comm="named" requested_mask="c" denied_mask="c" fsuid=105 ouid=105

Je ne sais pas du tout ce qui s'est passé.  La solution a été d'ajouter /var/log/bind/query.log rw, dans /etc/apparmor.d/local/usr.sbin.named qui était vide et un petit apparmor_parser -r /etc/apparmor.d/usr.sbin.named

Après cela tout refonctionne.  Et docker aussi.

Encore merci pour ton aide.

Hors ligne