Résolu le 26-04-19 [résolu]Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Assistance Générale spécifique à LMDE
Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

Dernier message de la page précédente :

oui, j'ai bien « /boot/grub/grub.cfg »
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

Code : Tout sélectionner

diff /etc/grub.d/00_header. /etc/grub.d/00_header.old

Code : Tout sélectionner

19a20,21
> transform="s,x,x,"
> 
21,22c23,25
< exec_prefix="/usr"
< datarootdir="/usr/share"
---
> exec_prefix="${prefix}"
> datarootdir="${prefix}/share"
> locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
24,28d26
< grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
< quick_boot="0"
< 
< export TEXTDOMAIN=grub
< export TEXTDOMAINDIR="${datarootdir}/locale"
41c39
< if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi
---
> if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
49d46
<   set have_grubenv=true
57,61d53
< elif [ "\${next_entry}" ] ; then
<    set default="\${next_entry}"
<    set next_entry=
<    save_env next_entry
<    set boot_once=true
68,75c60
< 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                                                                                                                                                         
---                                                                                                                                                          
> set default="${GRUB_DEFAULT}"      

Les fichiers arrivent...
                                                                                                                        
79,87d63                                                                                                                                                     
<                                                                                                                                                            
< if [ x"\${feature_menuentry_id}" = xy ]; then                                                                                                              
<   menuentry_id_option="--id"                                                                                                                               
< else                                                                                                                                                       
<   menuentry_id_option=""                                                                                                                                   
< fi                                                                                                                                                         
<                                                                                                                                                            
< export menuentry_id_option                                                                                                                                 
<                                                                                                                                                            
102d77                                                                                                                                                       
< EOF                                                                                                                                                        
104,126d78                                                                                                                                                   
< if [ "$quick_boot" = 1 ]; then                                                                                                                             
<     cat <<EOF                                                                                                                                              
< function recordfail {
<   set recordfail=1
< EOF
<     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
<       ;;
<       *)
<       cat <<EOF
<   if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
< EOF
<     esac
<     cat <<EOF
< }
< EOF
< fi
< 
< cat <<EOF
134,147c86,91
< # 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
---
>     # Insert all available backends; GRUB will use the most appropriate.
>     have_video=0;
>     for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
>       have_video=1;
>       cat <<EOF
>   insmod ${backend}
148a93,96
>     done
>     if [ x$have_video = x0 ]; then
>       echo "true"
>     fi
166a115,118
>     if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
>       echo "Serial terminal not available on this platform." >&2 ; exit 1
>     fi
> 
168c120
<       grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
---
>       grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
175,212c127,128
<     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
---
>     # Make the font accessible
>     prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`
215c131,132
<   set gfxmode=${GRUB_GFXMODE}
---
> if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
> set gfxmode=1024x768
221c138,139
< if [ "x${LANG}" != "xC" ] &&  [ "x${LANG}" != "x" ]; then
---
> if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
>     prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/  /"
223c141
<   set locale_dir=\$prefix/locale
---
>   set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
259,260c177
<       gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2
< 
---
>       echo "Found theme: $GRUB_THEME" >&2
291d207
< export theme
295c211
<       gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
---
>       echo "Found background: $GRUB_BACKGROUND" >&2
300c216
<           *)             gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
---
>           *)             echo "Unsupported image format" >&2; exit 1 ;;
312,326c228
<     cat << EOF
< if [ "\${recordfail}" = 1 ] ; then
<   set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}
< 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${1}" != "x" ] ; then
328d229
<           style="hidden"
331d231
<           style="countdown"
334,344d233
<     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
346,349c235,237
<   # Fallback normal timeout code in case the timeout_style feature is
<   # unavailable.
<   else
<     set timeout=${timeout}
---
> if sleep$verbose --interruptible ${1} ; then
>   set timeout=${2}
> fi
353,356c241
<   # Fallback hidden-timeout code in case the timeout_style feature is
<   # unavailable.
<   elif sleep${verbose} --interruptible ${timeout} ; then
<     set timeout=0
---
> set timeout=${2}
359,362d243
<     cat << EOF
<   fi
< fi
< EOF
369c250
< make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
---
> make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}"
371c252
< make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
---
> make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
374c255
< make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
---
> make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" 
Les fichiers arrivent...

Voila:
00_header=

Code : Tout sélectionner

#! /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="0"

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

. "${datarootdir}/grub/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
    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
	;;
      *)
	cat <<EOF
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
EOF
    esac
    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:--1}
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 [ "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
le 00-header.old=

Code : Tout sélectionner

#! /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/>.

transform="s,x,x,"

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d . -f 1`

. "${datarootdir}/grub/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=640x480 ; 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
  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}"
else
   set default="${GRUB_DEFAULT}"
fi
EOF
else
    cat <<EOF
set default="${GRUB_DEFAULT}"
EOF
fi
cat <<EOF
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 load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
    # Insert all available backends; GRUB will use the most appropriate.
    have_video=0;
    for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
	have_video=1;
	cat <<EOF
  insmod ${backend}
EOF
    done
    if [ x$have_video = x0 ]; then
	echo "true"
    fi
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 ! test -e "${GRUB_PREFIX}/serial.mod" ; then
	echo "Serial terminal not available on this platform." >&2 ; exit 1
    fi

    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
	grub_warn "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
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT_PATH}"`

    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT_PATH}"` ; then
set gfxmode=1024x768
  load_video
  insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
    prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/  /"
  cat << EOF
  set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
  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
	echo "Found theme: $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`
EOF
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
	echo "Found background: $GRUB_BACKGROUND" >&2
	case "$GRUB_BACKGROUND" in 
	    *.png)         reader=png ;;
	    *.tga)         reader=tga ;;
	    *.jpg|*.jpeg)  reader=jpeg ;;
	    *)             echo "Unsupported image format" >&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 ()
{
    if [ "x${1}" != "x" ] ; then
	if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
	    verbose=
	else
	    verbose=" --verbose"
	fi
	cat << EOF
if sleep$verbose --interruptible ${1} ; then
  set timeout=${2}
fi
EOF
    else
	cat << EOF
set timeout=${2}
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}"
echo else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
echo fi
else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
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
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Avatar du membre
WarLocG
Messages : 96
Enregistré le : mer. 20 avr. 2016 18:39
Localisation : Belgique

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par WarLocG »

Ok, a la lecture du diff j'ai confirmation que c'est ton vieux 00_header.old qui fout le boxon.

Il contient des variables qui n'existent plus car ont été remplacée, et du coup valent vide, c'est le cas du GRUB_PREFIX (avec le fameux video.lst) et du GRUB_FONT_PATH (ayant été remplacé par GRUB_FONT).

En virant, ton 00_header.old du dossier /etc/grub.d/ tu pourras également virer video.lst à la racine qui était requis par 00_header.old.
Modifié en dernier par WarLocG le mar. 21 mars 2017 01:23, modifié 1 fois.

Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

WarLocG a écrit : J'ai vu ou ca plante, on peut pas le louper :) Ca ne va pas au dela de /etc/grub.d/00_header et tu as même un 00_header.old. Pourrais-tu faire diff sur tes deux fichiers /etc/grub.d/00_header et 00_header.old pour qu'on apercois les changements et également nous coller ces fichiers 00_header pour voir si il y a quelque chose de chelou la dedans ?
C'est d'ailleurs dans le .old qu'il plante.

Alors comme patch temporaire (j'aimerais quand savoir ce qu'il y a dans ton 00_header.old pour planter ton update-grub), tu pourrais deja tester en isolant ce fichier 00_header.old (le déplacer ailleurs, par exemple sur ton Bureau.) Vérifier si update-grub passe et pendant ce temps la je vais chercher mes scalpels :D
00_header.old déplacé, puis update-grub...Et ça fonctionne :D

Code : Tout sélectionner

Création du fichier de configuration GRUB…
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Image Linux trouvée : /boot/vmlinuz-3.16.0-4-amd64
Image mémoire initiale trouvée : /boot/initrd.img-3.16.0-4-amd64
Image Linux trouvée : /boot/vmlinuz-3.16.0-0.bpo.4-amd64
Image mémoire initiale trouvée : /boot/initrd.img-3.16.0-0.bpo.4-amd64
Image Linux trouvée : /boot/vmlinuz-3.2.0-4-amd64
Image mémoire initiale trouvée : /boot/initrd.img-3.2.0-4-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
fait
As tu un explication pour ce fichier .old, de pourquoi il était pris en compte?
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Avatar du membre
WarLocG
Messages : 96
Enregistré le : mer. 20 avr. 2016 18:39
Localisation : Belgique

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par WarLocG »

Hourra :D
As tu un explication pour ce fichier .old, de pourquoi il était pris en compte?
Parce qu'il se trouve dans /etc/grub.d/ et qu'il doit y avoir un script en amont qui lit tous les fichiers présent dans ce dossier.

Finalement, plus qu'a éditer le sujet et le mettre en résolu :)
Modifié en dernier par WarLocG le mar. 21 mars 2017 01:28, modifié 1 fois.

Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

oui, ça d'accord. mais sa présence ici, elle est due a quoi? suite a la suppression du dual ubuntu?

video.lst : viré...

Merci beaucoup WarLocG ;)
Modifié en dernier par alain le mar. 21 mars 2017 01:30, modifié 1 fois.
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Avatar du membre
WarLocG
Messages : 96
Enregistré le : mer. 20 avr. 2016 18:39
Localisation : Belgique

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par WarLocG »

oui, ça d'accord. mais sa présence ici, elle est due a quoi? suite a la suppression du dual ubuntu?
Probablement. Tu avais un système ubuntu dont tu as changé les source.lst et dist-upgrade depuis ?

Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

WarLocG a écrit :Probablement. Tu avais un système ubuntu dont tu as changé les source.lst et dist-upgrade depuis ?
Oui j'ai fait c'est sur, mais y a bien longtemps... ça serait donc ça :o

Je reboote et te dis quoi...

Nickel ! ;) Un immense merci WarLocG.
Je ne pensais pas la sauver celle la... :D

Je pense que je peux mettre en résolu? qu'en penses tu?
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Avatar du membre
WarLocG
Messages : 96
Enregistré le : mer. 20 avr. 2016 18:39
Localisation : Belgique

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par WarLocG »

oui la c'est résolu, a moins que tu repartes mettre un 00_trolol avec du script chelou dans /etc/grub.d/ pour faire durer le plaisir :lol:

Avatar du membre
alain
Administrateur du site
Messages : 14701
Enregistré le : dim. 11 oct. 2015 23:41
Localisation : Chelles
Contact :

Re: Error! Bad return status for module build on kernel: 3.16.0-4-amd64 (x86_64)

Message par alain »

lol :lol: Non fini les 00_trolol avec du script chelou dans /etc/grub.d/. :lol:

Au prochain dual que je vire je saurai ou regarder si ça tousse :D

(c'est pourtant pas la première fois que j'en vire un, j'avais pas eu ce trololo les fois précédentes...)

Donc Résolu grâce à WarLocG et remerciements à Mpat et Tyrry pour leurs aides en irc et ici ;)
PC are like air conditioning, they becomes useless when you open Windows (L.T)
PC1 : CM : ASRock 990FX | CPU: AMD FX 8350-8 cores, 4 GHz | RAM: 16 Go DDR3 1600 MHz | CG: ATI RX 580-8 Go | OS : LM 20.3 Uma Xfce 4.16 | K: 5.4
PC2
:Core2 Quad Q9650 @ 3 GHz | CG: Nvidia GTX 650TI | OS: LM 21.3 Xfce 4.18| K: 6.5
PC3 :Core i7-2600 @ 3,5 GHz | CG: ATI HD 4650 | OS: Emmade5 Xfce 4.18.0 | K: 6.1
PC4 : AMD Ryzen 5 3500X 4GHz | CG: GTX 970 | Ram : 8GB |OS : Debian 10.5 | K: 5.10
In a world without walls and fences, who needs windows and gates?

Répondre