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 02/02/2019, à 10:10

marc61

menu de démarrage gru gnub 2.02

Bonjour a tous


voila j'ai ubuntu 18.04.1 lts sur mon ordi portable

et il y a deux jours le système me dit qu'il y a une petit mis a jours disponible, donc moi sans me mefier je clic sur ok
et la mise a jour ce fait,
une fois fait, je ne remarque aucune différence, donc sa c’était le matin je l’étain et le soir le rallume.................
seulement  au démarage et bien maintenant il m'affiche le menu que l'on peut avoir quant il y deux os sur l'ordi
mais la il ni a que ubumtu dessus
voila donc comment faire pour supprimé ce truc qui me ralenti en plus le démarrage de l'ordi
donc le menu ses, ... gru gnub 2.02

merci a vous pour votre aide 

ps; et désolé si je ne suis pas dans la bonne page smile

Hors ligne

#2 Le 02/02/2019, à 21:13

jamesbad000

Re : menu de démarrage gru gnub 2.02

Bonsoir,

Effectivement, la dernière mise à jour de grub a introduit un bug ou à tout le moins une modification indésirable.
Chez moi ça se manifeste par le menu grub qui reste affiché 30 secondes alors que je l'ai paramétré à 3 secondes.
C'est lié à l'ajout des lignes ci-dessous par la commande update-grub :

if lsefi; then
  set timeout=30
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
  fi
fi

A vu de nez ça ne concerne que les boot en mode efi.

Tu peux toujours retirer les lignes en question de /boot/grub/grub.cfg, mais à moins d'une correction, ça va revenir à chaque mise à jour de kernel ou de grub...

J'irais voir sur launchpad si le problème est déjà déclaré...

Ceci-dit il suffit d'appuyer sur ENTREE pour lancer le démarrage avant l'expiration du délais.


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#3 Le 02/02/2019, à 23:41

marc61

Re : menu de démarrage gru gnub 2.02

Bonjour jamesbad000

donc si j'ai bien compris ses presque impossible de le supprimé, le pire ses que je n'es que ubuntu sur mon pc donc pour quoi est il venus
car avant je ne l'avais pas donc il doit etre possible de l'enlever enfin j'espère

Hors ligne

#4 Le 03/02/2019, à 01:49

jamesbad000

Re : menu de démarrage gru gnub 2.02

Hum en fait je ne reproduis pas ton problème avec un seul os.
Est-ce que tu pourrais me donner le retour de

cat /boot/grub/grub.cfg
cat /etc/default/grub

Dernière modification par jamesbad000 (Le 03/02/2019, à 01:52)


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#5 Le 03/02/2019, à 04:47

marc61

Re : menu de démarrage gru gnub 2.02

ok donc voici la copy du fichier grub.cfg


#
# 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
  # GRUB lacks write support for lvm, so recordfail support is disabled.
}
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_msdos
insmod lvm
insmod ext2
set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
else
  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
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=10
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 10 ; then
    set timeout=0
  fi
fi
if lsefi; then
  set timeout=30
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
  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
if background_color 44,0,30,0; then
  clear
fi
### 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=1
	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-8bd5d638-d6ce-4844-8281-f0231c46921b' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod lvm
	insmod ext2
	set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
	else
	  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
	fi
        linux	/boot/vmlinuz-4.15.0-37-generic root=/dev/mapper/ubuntu--vg-root ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-4.15.0-37-generic
}
submenu 'Options avancées pour Ubuntu' $menuentry_id_option 'gnulinux-advanced-8bd5d638-d6ce-4844-8281-f0231c46921b' {
	menuentry 'Ubuntu, avec Linux 4.15.0-37-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-37-generic-advanced-8bd5d638-d6ce-4844-8281-f0231c46921b' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod lvm
		insmod ext2
		set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
		else
		  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
		fi
		echo	'Chargement de Linux 4.15.0-37-generic…'
	        linux	/boot/vmlinuz-4.15.0-37-generic root=/dev/mapper/ubuntu--vg-root ro  quiet splash $vt_handoff
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.15.0-37-generic
	}
	menuentry 'Ubuntu, with Linux 4.15.0-37-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-37-generic-recovery-8bd5d638-d6ce-4844-8281-f0231c46921b' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod lvm
		insmod ext2
		set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
		else
		  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
		fi
		echo	'Chargement de Linux 4.15.0-37-generic…'
	        linux	/boot/vmlinuz-4.15.0-37-generic root=/dev/mapper/ubuntu--vg-root ro recovery nomodeset 
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.15.0-37-generic
	}
	menuentry 'Ubuntu, avec Linux 4.15.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-36-generic-advanced-8bd5d638-d6ce-4844-8281-f0231c46921b' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod lvm
		insmod ext2
		set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
		else
		  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
		fi
		echo	'Chargement de Linux 4.15.0-36-generic…'
	        linux	/boot/vmlinuz-4.15.0-36-generic root=/dev/mapper/ubuntu--vg-root ro  quiet splash $vt_handoff
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.15.0-36-generic
	}
	menuentry 'Ubuntu, with Linux 4.15.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-36-generic-recovery-8bd5d638-d6ce-4844-8281-f0231c46921b' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod lvm
		insmod ext2
		set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
		else
		  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
		fi
		echo	'Chargement de Linux 4.15.0-36-generic…'
	        linux	/boot/vmlinuz-4.15.0-36-generic root=/dev/mapper/ubuntu--vg-root ro recovery nomodeset 
		echo	'Chargement du disque mémoire initial…'
		initrd	/boot/initrd.img-4.15.0-36-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/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
	insmod part_msdos
	insmod lvm
	insmod ext2
	set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
	else
	  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
	fi
	knetbsd	/boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
	insmod part_msdos
	insmod lvm
	insmod ext2
	set root='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvmid/BobH2x-docJ-Gsbw-zjDn-hlum-6GvX-sBlxRc/lfFyqT-ZVER-kM5z-9ey5-mywp-5tU0-a6gmsV'  8bd5d638-d6ce-4844-8281-f0231c46921b
	else
	  search --no-floppy --fs-uuid --set=root 8bd5d638-d6ce-4844-8281-f0231c46921b
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

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

Dernière modification par marc61 (Le 03/02/2019, à 12:49)

Hors ligne

#6 Le 03/02/2019, à 04:51

marc61

Re : menu de démarrage gru gnub 2.02

et pour l'autre le voici,


# 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_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
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"

Dernière modification par marc61 (Le 03/02/2019, à 12:48)

Hors ligne

#7 Le 03/02/2019, à 06:42

xubu1957

Re : menu de démarrage gru gnub 2.02

Bonjour,

Pour ajouter toi-même les balises code à tes précédents messages #5 et #6 :                       Merci                        wink
               

  • Cliquer sur  le lien « Modifier » en bas à droite du message

  • Sélectionner le texte

  • Cliquer sur le <> de l'éditeur de message

1530289742.png

comme indiqué dans le : Retour utilisable de commande

Dernière modification par xubu1957 (Le 03/02/2019, à 17:18)


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Résolu] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

En ligne

#8 Le 03/02/2019, à 12:51

marc61

Re : menu de démarrage gru gnub 2.02

salut xubu 1957


oui ses fait désolé pour la boulette  voila ses réparé et la prochaine bas je le fait directement

Hors ligne

#9 Le 03/02/2019, à 12:54

marc61

Re : menu de démarrage gru gnub 2.02

Bonjour a toute et tous

ah je reste connecter si quelle qu'un a la solution a mon problème , et merci de votre soutien ses super

Hors ligne

#10 Le 03/02/2019, à 14:53

jamesbad000

Re : menu de démarrage gru gnub 2.02

Après analyse du code j'arrive à la conclusion que dans ton cas comme le miens, le problème est lié à la présence du répertoire boot dans un volume LVM.
Et plus généralement dans toute situation ou /boot est situé dans un emplacement pour lequel grub n'a pas de support en écriture. (Et peut-être que cette condition n'existe que dans le cadre d'un boot en mode UEFI)

Grub étant alors dans l'incapacité d'aller inscrire son flag "recordfail" dans /boot/grub/grubenv, qui permet de forcer l'affichage du menu après un échec de lancement du kernel, et ainsi permettre de choisir un démarrage en mode dépannage par exemple...

Bref on peut corriger le problème de façon plus définitive en allant modifier /etc/grub.d/00_header :
Il faut mettre en commentaire les lignes ci-dessous

# -fda #if [ "$recordfail_broken" = 1 ]; then
# -fda #  cat << EOF
# -fda #if lsefi; then
# -fda #  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
# -fda #  if [ x\$feature_timeout_style = xy ] ; then
# -fda #    set timeout_style=menu
# -fda #  fi
# -fda #fi
# -fda #EOF
# -fda #fi

Ce bout de code était déjà là avant la mise à jour de grub (les fichiers dans /etc/grub.d ne sont pas impactés par les mises à jour de grub), mais a probablement été activé par la correction d'un bug au niveau de la commande "grub-probe --target=abstraction" qui ne retournait vraisemblablement pas ce qu'elle aurait dû dans le cas d'un /boot dans LVM...

edit: après modif du fichier /etc/grub.d/00_header il faut faire

sudo update-grub

Dernière modification par jamesbad000 (Le 03/02/2019, à 14:56)


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#11 Le 03/02/2019, à 15:16

marc61

Re : menu de démarrage gru gnub 2.02

salut jamesbad000

merci pour ta reponse
et bien le problème se que je ni connais pas grand chose la dedans voir meme rien comparer a toi
alors es-que tu peut me dire quoi faire mais par étape car sinon sa va etre la cata hihihi    merci

Hors ligne

#12 Le 03/02/2019, à 16:20

jamesbad000

Re : menu de démarrage gru gnub 2.02

Ok on commence par faire une copie de sauvagarde

cp  /etc/grub.d/00_header ~

ensuite lancer l'éditeur

sudo nano /etc/grub.d/00_header

Pour naviguer dans les texte utiliser les touches flèches (droite,gauche,haut,bas)
répérer le bloc de ligne indiqué dans mon message précédent (sans le # -fda # que j'ai ajouté)
et ajouter un # au début de chaque lignes. Attention à ne pas en oublier ni en modifier d'autres

- ensuite utiliser la combinaison de touche ctrl x pour sortir.
- confirmer l'enregistrement en répondant "o" à la demande d'enregistrement (ou répondre "n" si tu pense avoir modifié des choses que tu n'aurais pas du, pour pouvoir recommencer à 0)

ensuite envoyer le retour de

cat /etc/grub.d/00_header

Dernière modification par jamesbad000 (Le 03/02/2019, à 16:24)


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#13 Le 03/02/2019, à 17:04

marc61

Re : menu de démarrage gru gnub 2.02

ok jamesbad000

sa me parait pas bien compliqué donc je vais tenté mais av, une pt'i question
une fois sa fait et donc enregistré, je sort ok, et la pour voir si ses bon j'éteint mon ordi et le rallume
mais si j'ai fait une boulet que je n'aurais pas vue, esque mon ordi va redemare ?
je reste en ligne car je fait en meme temps cette modification

Hors ligne

#14 Le 03/02/2019, à 17:06

marc61

Re : menu de démarrage gru gnub 2.02

ah une question quant tu parle de l'éditeur, ses l'éditeur texte ou le terminal ?

Hors ligne

#15 Le 03/02/2019, à 17:16

jamesbad000

Re : menu de démarrage gru gnub 2.02

une fois sa fait et donc enregistré, je sort ok, et la pour voir si ses bon j'éteint mon ordi et le rallume

Non tu attends que j'ai vérifié tes modifs.

Dernière modification par jamesbad000 (Le 03/02/2019, à 17:17)


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#16 Le 03/02/2019, à 17:44

marc61

Re : menu de démarrage gru gnub 2.02

ok  donc j'ai fait la modife et j'ai enregistré le fichier sur le bureau

donc voici ce que j'ai fait

#if [ "$recordfail_broken" = 1 ]; then
#  cat << EOF
#if lsefi; then
#  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
#  if [ x\$feature_timeout_style = xy ] ; then
#    set timeout_style=menu
#  fi
#fi
#EOF
#fi

Dernière modification par marc61 (Le 03/02/2019, à 17:44)

Hors ligne

#17 Le 03/02/2019, à 17:45

marc61

Re : menu de démarrage gru gnub 2.02

a chaque fois que j'ai ajouter le # sa changais de couleurs et devenue bleu

Hors ligne

#18 Le 03/02/2019, à 17:53

jamesbad000

Re : menu de démarrage gru gnub 2.02

Ca a l'air correcte.

Un petit coup de

sudo update-grub

pour mettre à jour le menu. Tu m'envois le résultat, et tu peux tenter de redémarrer dans la foulée


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#19 Le 03/02/2019, à 17:55

marc61

Re : menu de démarrage gru gnub 2.02

et tu fait sa comment le "


sudo update - grub

Dernière modification par marc61 (Le 03/02/2019, à 17:58)

Hors ligne

#20 Le 03/02/2019, à 18:02

jamesbad000

Re : menu de démarrage gru gnub 2.02

ah ! j'avais pas percuté la dessus

ok  donc j'ai fait la modife et j'ai enregistré le fichier sur le bureau

Non ce n'est pas bon. il suffisait de faire entrée pour enregistrer le fichier à son emplacement d'origine.

Donnes le retour complet (ligne de commande comprise de )

cat /etc/grub.d/00_header

comme je l'avais demandé et non un extrait à partir de l'éditeur, qui ne permet pas de voir si tu as enregistré correctement.


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#21 Le 03/02/2019, à 18:15

marc61

Re : menu de démarrage gru gnub 2.02

ok donc voici le fichier
et pour l'instant je nes pas essayez de l'enregistré

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
grub_lang=`echo $LANG | cut -d . -f 1`
grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
quick_boot="1"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "$pkgdatadir/grub-mkconfig_lib"

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

cat << EOF
if [ -s \$prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
EOF
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
   set default="${GRUB_DEFAULT_BUTTON}"
elif [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
else
    cat <<EOF
if [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
fi
cat <<EOF

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
}
EOF

if [ "$quick_boot" = 1 ]; then
    cat <<EOF
function recordfail {
  set recordfail=1
EOF

  check_writable () {
    abstractions="$(grub-probe --target=abstraction "${grubdir}")"
    for abstraction in $abstractions; do
      case "$abstraction" in
        diskfilter | lvm)
          cat <<EOF
  # GRUB lacks write support for $abstraction, so recordfail support is disabled.
EOF
          return 1
          ;;
      esac
    done

    FS="$(grub-probe --target=fs "${grubdir}")"
    case "$FS" in
      btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs)
	cat <<EOF
  # GRUB lacks write support for $FS, so recordfail support is disabled.
EOF
	return 1
	;;
    esac

    cat <<EOF
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
EOF
  }

  if ! check_writable; then
    recordfail_broken=1
  fi

  cat <<EOF
}
EOF
fi

cat <<EOF
function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
# If all_video.mod isn't available load all modules available
# with versions prior to introduction of all_video.mod
cat <<EOF
  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
EOF
fi
cat <<EOF
}

EOF

serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    if [ xserial = "x$x" ]; then
	serial=1;
    fi
    if [ xgfxterm = "x$x" ]; then
	gfxterm=1;
    fi
done

if [ "x$serial" = x1 ]; then
    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
	grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
	GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
fi

if [ "x$gfxterm" = x1 ]; then
    if [ -n "$GRUB_FONT" ] ; then
       # Make the font accessible
       prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`
    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
    else
	for dir in "${pkgdatadir}" "`echo '/boot/grub' | sed "s,//*,/,g"`" /usr/share/grub ; do
	    for basename in unicode unifont ascii; do
		path="${dir}/${basename}.pf2"
		if is_path_readable_by_grub "${path}" > /dev/null ; then
		    font_path="${path}"
		else
		    continue
		fi
		break 2
	    done
	done
	if [ -n "${font_path}" ] ; then
    cat << EOF
if [ x\$feature_default_font_path = xy ] ; then
   font=unicode
else
EOF
                # Make the font accessible
		prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"`
    cat << EOF
    font="`make_system_path_relative_to_its_root "${font_path}"`"
fi

if loadfont \$font ; then
EOF
	    else
    cat << EOF
if loadfont unicode ; then
EOF
	    fi
	fi

    cat << EOF
  set gfxmode=${GRUB_GFXMODE}
  load_video
  insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] &&  [ "x${LANG}" != "x" ]; then
  cat << EOF
  set locale_dir=\$prefix/locale
  set lang=${grub_lang}
  insmod gettext
EOF
fi

cat <<EOF
fi
EOF
fi

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_input ${GRUB_TERMINAL_INPUT}
EOF
  ;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_output ${GRUB_TERMINAL_OUTPUT}
EOF
  ;;
esac

if [ "x$gfxterm" = x1 ]; then
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
	&& is_path_readable_by_grub "$GRUB_THEME"; then
	gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2

	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
	cat << EOF
insmod gfxmenu
EOF
	themedir="`dirname "$GRUB_THEME"`"
	for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
	    if [ -f "$x" ]; then
		cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
	    fi
	done
	if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
	    cat << EOF
insmod jpeg
EOF
	fi
	if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
	    cat << EOF
insmod png
EOF
	fi
	if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
	    cat << EOF
insmod tga
EOF
	fi
	    
	cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
export theme
EOF
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
	gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
	case "$GRUB_BACKGROUND" in 
	    *.png)         reader=png ;;
	    *.tga)         reader=tga ;;
	    *.jpg|*.jpeg)  reader=jpeg ;;
	    *)             gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
	esac
	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
	cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
EOF
    fi
fi

make_timeout ()
{
    cat << EOF
if [ "\${recordfail}" = 1 ] ; then
  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
else
EOF
    if [ "x${3}" != "x" ] ; then
	timeout="${2}"
	style="${3}"
    elif [ "x${1}" != "x" ] && \
	 ([ "$quick_boot" = 1 ] || [ "x${1}" != "x0" ]) ; then
	# Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
	timeout="${1}"
	if [ "x${2}" != "x0" ] ; then
	    grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")"
	fi
	if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
	    style="hidden"
	    verbose=
	else
	    style="countdown"
	    verbose=" --verbose"
	fi
    else
	# No hidden timeout, so treat as GRUB_TIMEOUT_STYLE=menu
	timeout="${2}"
	style="menu"
    fi
    cat << EOF
  if [ x\$feature_timeout_style = xy ] ; then
    set timeout_style=${style}
    set timeout=${timeout}
EOF
    if [ "x${style}" = "xmenu" ] ; then
	cat << EOF
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=${timeout}
EOF
    else
	cat << EOF
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep${verbose} --interruptible ${timeout} ; then
    set timeout=0
EOF
    fi
    cat << EOF
  fi
fi
EOF
#if [ "$recordfail_broken" = 1 ]; then
#  cat << EOF
#if lsefi; then
#  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
#  if [ x\$feature_timeout_style = xy ] ; then
#    set timeout_style=menu
#  fi
#fi
#EOF
#fi
}

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
EOF
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
echo else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
echo fi
else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then
    cat <<EOF
cmosclean $GRUB_BUTTON_CMOS_ADDRESS
EOF
fi

# Play an initial tune
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
  echo "play ${GRUB_INIT_TUNE}"
fi

if [ "x${GRUB_BADRAM}" != "x" ] ; then
  echo "badram ${GRUB_BADRAM}"
fi

Hors ligne

#22 Le 03/02/2019, à 18:26

jamesbad000

Re : menu de démarrage gru gnub 2.02

bah. Tu ne suis pas mes instructions et du coup je ne pas être certain que c'est enregistré au bon endroit.
Donc si tu es dans l'éditeur comme je le comprends, tu enregistres sans indiquer d'emplacement, et ensuite tu me donnes le retour de

cat /etc/grub.d/00_header

c'est à dire un copié collé du terminal de commande incluant la commande ci-dessus, et son résultat complet jusqu'à la dernière ligne du terminal (l'invite de commande suivante).


L'espace et le temps sont les modes par lesquels nous pensons, et non les conditions dans lesquelles nous vivons. (Signé Albert)

Hors ligne

#23 Le 03/02/2019, à 18:57

marc61

Re : menu de démarrage gru gnub 2.02

alors non il n'es pas enregistré la ou il doit etre car quant je veux l'enregistre donc a sa place l'éditeur me dit que je n'es pas l'autorisation de le faire
ses pour sa que je les enregistré sur le bureau

bon après ses peut etre aussi du a l'éditeur bon alors voila j'ai supprimé celui que javais enregistré sur le bureau et donc recommencer la modif,
mais quant je fait ctrl x, il n'enregistre pas


#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
grub_lang=`echo $LANG | cut -d . -f 1`
grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
quick_boot="1"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "$pkgdatadir/grub-mkconfig_lib"

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

cat << EOF
if [ -s \$prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
EOF
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
   set default="${GRUB_DEFAULT_BUTTON}"
elif [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
else
    cat <<EOF
if [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
fi
cat <<EOF

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
}
EOF

if [ "$quick_boot" = 1 ]; then
    cat <<EOF
function recordfail {
  set recordfail=1
EOF

  check_writable () {
    abstractions="$(grub-probe --target=abstraction "${grubdir}")"
    for abstraction in $abstractions; do
      case "$abstraction" in
        diskfilter | lvm)
          cat <<EOF
  # GRUB lacks write support for $abstraction, so recordfail support is disabled.
EOF
          return 1
          ;;
      esac
    done

    FS="$(grub-probe --target=fs "${grubdir}")"
    case "$FS" in
      btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs)
	cat <<EOF
  # GRUB lacks write support for $FS, so recordfail support is disabled.
EOF
	return 1
	;;
    esac

    cat <<EOF
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
EOF
  }

  if ! check_writable; then
    recordfail_broken=1
  fi

  cat <<EOF
}
EOF
fi

cat <<EOF
function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
# If all_video.mod isn't available load all modules available
# with versions prior to introduction of all_video.mod
cat <<EOF
  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
EOF
fi
cat <<EOF
}

EOF

serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    if [ xserial = "x$x" ]; then
	serial=1;
    fi
    if [ xgfxterm = "x$x" ]; then
	gfxterm=1;
    fi
done

if [ "x$serial" = x1 ]; then
    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
	grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
	GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
fi

if [ "x$gfxterm" = x1 ]; then
    if [ -n "$GRUB_FONT" ] ; then
       # Make the font accessible
       prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`
    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
    else
	for dir in "${pkgdatadir}" "`echo '/boot/grub' | sed "s,//*,/,g"`" /usr/share/grub ; do
	    for basename in unicode unifont ascii; do
		path="${dir}/${basename}.pf2"
		if is_path_readable_by_grub "${path}" > /dev/null ; then
		    font_path="${path}"
		else
		    continue
		fi
		break 2
	    done
	done
	if [ -n "${font_path}" ] ; then
    cat << EOF
if [ x\$feature_default_font_path = xy ] ; then
   font=unicode
else
EOF
                # Make the font accessible
		prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"`
    cat << EOF
    font="`make_system_path_relative_to_its_root "${font_path}"`"
fi

if loadfont \$font ; then
EOF
	    else
    cat << EOF
if loadfont unicode ; then
EOF
	    fi
	fi

    cat << EOF
  set gfxmode=${GRUB_GFXMODE}
  load_video
  insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] &&  [ "x${LANG}" != "x" ]; then
  cat << EOF
  set locale_dir=\$prefix/locale
  set lang=${grub_lang}
  insmod gettext
EOF
fi

cat <<EOF
fi
EOF
fi

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_input ${GRUB_TERMINAL_INPUT}
EOF
  ;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_output ${GRUB_TERMINAL_OUTPUT}
EOF
  ;;
esac

if [ "x$gfxterm" = x1 ]; then
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
	&& is_path_readable_by_grub "$GRUB_THEME"; then
	gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2

	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
	cat << EOF
insmod gfxmenu
EOF
	themedir="`dirname "$GRUB_THEME"`"
	for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
	    if [ -f "$x" ]; then
		cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
	    fi
	done
	if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
	    cat << EOF
insmod jpeg
EOF
	fi
	if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
	    cat << EOF
insmod png
EOF
	fi
	if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
	    cat << EOF
insmod tga
EOF
	fi
	    
	cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
export theme
EOF
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
	gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
	case "$GRUB_BACKGROUND" in 
	    *.png)         reader=png ;;
	    *.tga)         reader=tga ;;
	    *.jpg|*.jpeg)  reader=jpeg ;;
	    *)             gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
	esac
	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
	cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
EOF
    fi
fi

make_timeout ()
{
    cat << EOF
if [ "\${recordfail}" = 1 ] ; then
  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
else
EOF
    if [ "x${3}" != "x" ] ; then
	timeout="${2}"
	style="${3}"
    elif [ "x${1}" != "x" ] && \
	 ([ "$quick_boot" = 1 ] || [ "x${1}" != "x0" ]) ; then
	# Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
	timeout="${1}"
	if [ "x${2}" != "x0" ] ; then
	    grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")"
	fi
	if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
	    style="hidden"
	    verbose=
	else
	    style="countdown"
	    verbose=" --verbose"
	fi
    else
	# No hidden timeout, so treat as GRUB_TIMEOUT_STYLE=menu
	timeout="${2}"
	style="menu"
    fi
    cat << EOF
  if [ x\$feature_timeout_style = xy ] ; then
    set timeout_style=${style}
    set timeout=${timeout}
EOF
    if [ "x${style}" = "xmenu" ] ; then
	cat << EOF
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=${timeout}
EOF
    else
	cat << EOF
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep${verbose} --interruptible ${timeout} ; then
    set timeout=0
EOF
    fi
    cat << EOF
  fi
fi
EOF
#if [ "$recordfail_broken" = 1 ]; then
#  cat << EOF
#if lsefi; then
#  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
#  if [ x\$feature_timeout_style = xy ] ; then
#    set timeout_style=menu
#  fi
#fi
#EOF
#fi
}

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
EOF
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
echo else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
echo fi
else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then
    cat <<EOF
cmosclean $GRUB_BUTTON_CMOS_ADDRESS
EOF
fi

# Play an initial tune
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
  echo "play ${GRUB_INIT_TUNE}"
fi

if [ "x${GRUB_BADRAM}" != "x" ] ; then
  echo "badram ${GRUB_BADRAM}"
fi

Hors ligne

#24 Le 03/02/2019, à 18:57

marc61

Re : menu de démarrage gru gnub 2.02

il est complet
il ne manque rien

Hors ligne

#25 Le 03/02/2019, à 18:58

marc61

Re : menu de démarrage gru gnub 2.02

l'éditeur ses " gedit "

Hors ligne