Petits problèmes suite à la mise à jour du Grub

Forum de support pour les utilisateurs francophones

Moderator: Laurent85

Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
Ticrob

Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Bonjour,

Aujourd'hui sur mon pc dualboot (cf. signature), lors de la mise à jour du système LM m'a proposé une mise à jour du Grub.
Depuis j'ai 2 petits soucis :
1) le plus embêtant : lorsque je démarre le pc et que mon câble hdmi est branché, le boot sur Linux me génère des écrans allumés/éteints successifs sans pouvoir parvenir à ma session. Si je refais la manipulation en retirant le cable hdmi, aucun souci le pc boot nickel. Après arrivé sur ma session, je peux là rebrancher le cable hdmi de mon moniteur.
2) avant la mise à jour du grub j'avais un time out de 3 secondes pour ne pas booter automatiquement sur Linux, si j'avais besoin de choisir W$. Avec la mise à jour c'est repasser à 10 secondes. Je suis donc retourné sur le fichier etc/default/grub, j'ai attribué 3 à la ligne grub_timeout, puis j'ai enregistré, fais sudo update-grub et rebooté...mais le time out reste à 10 s au boot ? Je me suis planté kèkèpart ?
A toute fin utile je donne le contenu de mon fichier grub :

Code: Select all

# 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=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
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"
Merci :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Petits problèmes suite à la mise à jour du Grub

Post by Laurent85 »

Bonjour, il y a quoi dans le fichier /boot/grub/grub.cfg, 10" ou 3" ?
Image
Ticrob

Re: Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Hello Laurent,
J'avais regardé aussi mais le fichier contient plusieurs timeout. Un seul contient la valeur 10 mais n'étant pas sûr que cela soit le bon timeout j'ai préféré ne rien toucher.
De la même manière, il y a aussi plusieurs lignes concernant la vidéo et je me demandais si le problème avec l'hdmi (que je n'avais pas avant la mise à jour du grub) ne vient pas de là ?
Je te donne le fichier grub.cfg :

Code: Select all

#
# 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="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 part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
else
  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
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=fr_FR
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  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/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_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 'Linux Mint 18.1 Cinnamon 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-14552faf-2fa6-4976-8056-6a85b98b47ea' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
	else
	  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
	fi
        linux	/boot/vmlinuz-4.8.0-51-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro  
	initrd	/boot/initrd.img-4.8.0-51-generic
}
submenu 'Options avancées pour Linux Mint 18.1 Cinnamon 64-bit' $menuentry_id_option 'gnulinux-advanced-14552faf-2fa6-4976-8056-6a85b98b47ea' {
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, avec Linux 4.8.0-51-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-51-generic-advanced-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.8.0-51-generic…'
	        linux	/boot/vmlinuz-4.8.0-51-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro  
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.8.0-51-generic
	}
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, with Linux 4.8.0-51-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-51-generic-init-upstart-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.8.0-51-generic…'
	        linux	/boot/vmlinuz-4.8.0-51-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro   init=/sbin/upstart
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.8.0-51-generic
	}
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, with Linux 4.8.0-51-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.8.0-51-generic-recovery-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.8.0-51-generic…'
	        linux	/boot/vmlinuz-4.8.0-51-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro recovery nomodeset 
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.8.0-51-generic
	}
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, avec Linux 4.4.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-advanced-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.4.0-53-generic…'
	        linux	/boot/vmlinuz-4.4.0-53-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro  
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.4.0-53-generic
	}
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, with Linux 4.4.0-53-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-init-upstart-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.4.0-53-generic…'
	        linux	/boot/vmlinuz-4.4.0-53-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro   init=/sbin/upstart
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.4.0-53-generic
	}
	menuentry 'Linux Mint 18.1 Cinnamon 64-bit, with Linux 4.4.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-recovery-14552faf-2fa6-4976-8056-6a85b98b47ea' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  14552faf-2fa6-4976-8056-6a85b98b47ea
		else
		  search --no-floppy --fs-uuid --set=root 14552faf-2fa6-4976-8056-6a85b98b47ea
		fi
		echo	'Chargement de Linux 4.4.0-53-generic…'
	        linux	/boot/vmlinuz-4.4.0-53-generic root=UUID=14552faf-2fa6-4976-8056-6a85b98b47ea ro recovery nomodeset 
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.4.0-53-generic
	}
}

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

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (sur /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option 'osprober-efi-E0DE-D401' {
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  E0DE-D401
	else
	  search --no-floppy --fs-uuid --set=root E0DE-D401
	fi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### 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 ###
PS : mes réponses sont un peu longues à venir car je suis en déplacement toute cette semaine. Merci ;)
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Petits problèmes suite à la mise à jour du Grub

Post by Laurent85 »

Salut Ticrob, Vérifie ton fichier de configuration /etc/default/grub, la valeur n'est pas à 3 mais à 0 d'après le fichier /boot/grub/grub.cfg (ou bien update-grub n'a pas été lancé). Si tu mets la valeur à 0 et que grub détecte un autre système que Mint alors grub mettra le compteur à 10 de lui même.
Image
Ticrob

Re: Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Hello Laurent, Merci pour ton aide.
Lorsque tu me dis
Vérifie ton fichier de configuration /etc/default/grub, la valeur n'est pas à 3 mais à 0 d'après le fichier /boot/grub/grub.cfg
, tu me parles de quelle variable :
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
car GRUB_TIMEOUT=3
J'avais mis dans mon 1er post le contenu du fichier /etc/default/grub ;)
viewtopic.php?f=63&t=247624&sid=83461cd ... d#p1330855
Et je reconfirme que j'avais bien fait sudo update-grub après la modification du fichier. Comme je suis pas avare je l'ai refais au cas où, mais bon, ca n'a pas changé.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Petits problèmes suite à la mise à jour du Grub

Post by Laurent85 »

Ah pardon j'avais oublié, ça vient du code qui génère le fichier alors. Et avec les lignes suivantes mises en commentaire ça marche ou pas ?

Code: Select all

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
Tu ne veux pas de menu affiché non plus ?
Image
Ticrob

Re: Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Tu ne veux pas de menu affiché non plus ?
heu non ? Comme je suis en dual boot, j'ai besoin du menu de boot. Je n'ai jamais fait de changement de ce côté là.
Si GRUB_HIDDEN_TIMEOUT_QUIET=true signifie que le menu ne doit pas apparaître au démarrage, et bien de mon côté ce menu apparaît bien au boot du PC. Je précise que je n'ai pas pour l'instant mis le # dont tu me parles puisque ta dernière question m'a mis le doute.
J'ai l'impression que la mise à jour du paquet grub m'a mis un peu le binz :roll:
Pour faire simple avant la mise à jours de ce paquet, les modifications que j'avais opéré visait à :
1) Avoir un délai de 3 secondes pour changer d'OS vers W$
2) Retirer le splash screen pour voir les lignes de commandes défiler au cas où une erreur apparaîtrait
Depuis la mise à jour, le délai est repasser à 10 secondes et j'ai l'impression que l'apparition de lignes de commandes est plus longues (comme s'il faisait une pause prononcée entre la validation de l'OS et l'apparition des lignes de commandes...Bref, LM est beaucoup plus long à se lancer que W$10...un comble :mrgreen: )

Bref, au vue de cette mise au point, me conseillerais tu de ne changer que #GRUB_HIDDEN_TIMEOUT=0 ?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Petits problèmes suite à la mise à jour du Grub

Post by Laurent85 »

Mets en commentaire ces deux lignes et mets à jour grub. Sinon je pense que grub force et l'affichage et les 10" :

Code: Select all

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
Image
Ticrob

Re: Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Hello Laurent, merci les deux lignes ont réglé le problème du TimeOut ;)
Concernant le problème de l'affichage hdmi au boot, je suppose que cela n'a pas eu d'incidence dessus mais je testerai toutefois à mon retour dans mon home sweet home.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Petits problèmes suite à la mise à jour du Grub

Post by Laurent85 »

Ticrob wrote:Concernant le problème de l'affichage hdmi au boot, je suppose que cela n'a pas eu d'incidence dessus mais je testerai toutefois à mon retour dans mon home sweet home.
héhé c'est bon quand ça se termine les déplacements :wink:
Image
Ticrob

Re: Petits problèmes suite à la mise à jour du Grub

Post by Ticrob »

Ho que oui ! Surtout quand tu dors dans un mini studio sous les combles par temps de canicule :mrgreen:
Locked

Return to “Français - French”