logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 28-05-2024 00:13:34

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

[Résolu] Dual boot Debian vs Ubuntu

Bonsoir,
J'ai installé une debian 12.5 sur une ubuntu 24.04.
Tout c'est bien passé jusqu'à ce que je veuille booter sur ubuntu :

erreur : mauvaise signature du "shime"
erreur : le noyau doit d'abord être chargée


Du coup, j'aimerais bien pouvoir rebooter sous ubuntu, mais je ne sais pas comment faire.
Edit : la résolution a été de prendre ma référence de la partition "efi" et son emplacement.

Dernière modification par ceric (28-05-2024 23:36:20)


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#2 28-05-2024 13:08:50

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

up.

Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#3 28-05-2024 13:21:27

mister_g
Membre
Distrib. : debian sid
Noyau : Linux 6.8.11
(G)UI : fluxbox
Inscription : 20-07-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

humm, je ne risque pas de t'aider .... et je ne dois pas être le seul dans ce cas.
il y a eu une discussion sur un sujet similaire il y a au moins un mois.
raleur a résolu le souci. des modifs a faire sur grub de mémoire.
je regarde si je la retrouve

Hors ligne

#4 28-05-2024 13:25:18

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

@mister_g, merci pour ton message.
Je cherche également mais je ne trouve pas.

Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#5 28-05-2024 13:27:12

mister_g
Membre
Distrib. : debian sid
Noyau : Linux 6.8.11
(G)UI : fluxbox
Inscription : 20-07-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

la : https://debian-facile.org/viewtopic.php?id=34310

ce n'est pas pile ton souci mais ca peut t'aider.
le plus utile commence page 2
et c'était en janvier .... le temps passe trop vite !!

Hors ligne

#6 28-05-2024 15:57:09

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

Re bonjour Ceric

Pour les sachants j'avais eu un problème similaire.
Raleur (encore lui ) m'avait aidé https://debian-facile.org/viewtopic.php?id=34386

Je ne suis pas un expert mais les infos qui peuvent aidés les sachants.

-Version debian

cat /etc/debian_version


- sur quel grub tu accèdes au démarrage
Bleu c'est debian noir ubuntu.
Les 2 entrées debian et ubuntu appaissent?
-Bios legacy ou uefi
->Si uefi, désactive secureboot dans le bios

Je pense (à confirmer par les pro?) que la solution est au #14 de la discussion cité au dessus en modifiant debian par ubuntu:

raleur a écrit :

- Ne pas utiliser la détection par os-prober pour ajouter Debian au menu de GRUB d'Ubuntu mais créer manuellement une entrée de menu qui va charger (chainloader) le "shim" de Debian (signé avec une clé de Microsoft, donc devrait être reconnu par le GRUB d'Ubuntu). À ajouter dans le fichier /etc/grub.d/40_custom :
menuentry 'Debian boot menu' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  A8C7-C568
        else
          search --no-floppy --fs-uuid --set=root A8C7-C568
        fi
        chainloader /EFI/debian/shimx64.efi
}


(oui, j'ai presque tout pompé sur l'entrée de menu pour Windows dans grub.cfg)
et exécuter update-grub pour l'intégrer à grub.cfg.

Dernière modification par wardidi (28-05-2024 17:48:42)

Hors ligne

#7 28-05-2024 16:36:27

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

@wardidi:

cat /etc/debian_version
12.5


J'arrive sur le grub de debian.
Donc si je te suis je mets :

menuentry 'Ubuntu  boot menu' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-e>
        else
          search --no-floppy --fs-uuid --set=root A8C7-C568
        fi
        chainloader /EFI/Ubuntu/shimx64.efi
}

Dernière modification par ceric (28-05-2024 16:41:16)


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#8 28-05-2024 16:43:21

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

Et pour finir

sudo update-grub


C'est bien ça?

Dernière modification par ceric (28-05-2024 16:44:12)


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#9 28-05-2024 16:47:43

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

Autre chose :

lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                        
├─sda1
│    ext4   1.0         13b37e14-3b20-46e0-a755-2dbda8c67e67                
├─sda2
│    vfat   FAT32       88A3-5090                                 1G     1% /boot/efi
├─sda3
│    swap   1           684277be-58ab-47bb-9bdd-190ba26aebd9                [SWAP]
├─sda4
│    ext4   1.0         2128b2b4-3df9-4b75-b12c-22852b6a4ee5                
├─sda5
│    ext4   1.0         29b9c2c0-fb43-4442-932d-f201311b0707   25,5G    25% /
├─sda6
│    swap   1           c48bb603-a20a-492f-a095-fb89b095dc32                [SWAP]
└─sda7
     ext4   1.0         e36923db-455f-439d-889f-f7a03ca54c27  128,2G     0% /home
 


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#10 28-05-2024 16:54:43

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-21-amd64
Found initrd image: /boot/initrd.img-6.1.0-21-amd64
Found linux image: /boot/vmlinuz-6.1.0-18-amd64
Found initrd image: /boot/initrd.img-6.1.0-18-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Ubuntu 24.04 LTS (24.04) on /dev/sda1
Adding boot menu entry for UEFI Firmware Settings ...
erreur : syntax error.
erreur : Incorrect command.
erreur : syntax error.
Erreur de syntaxe à la ligne 309
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#11 28-05-2024 17:44:52

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

Avant cette manipulation, j avais évoqué  l arrêt du secureboot (et attendre l'avis des pro..)
Si tu as toujours l'entrée ubuntu dans le grub, desactive le SB et tente l'entrée ubuntu.

Hors ligne

#12 28-05-2024 17:50:07

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

wardidi a écrit :

Avant cette manipulation, j avais évoqué  l arrêt du secureboot (et attendre l'avis des pro..)
Si tu as toujours l'entrée ubuntu dans le grub, desactive le SB et tente l'entrée ubuntu.


Merci, j'ai désactivé le secureboot et j'ai pu booter de nouveau sur ma partition ubuntu. cool


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#13 28-05-2024 18:09:45

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

Yes. Ma première aide (presque) reussie

Si tu veux activer le secureboot, il faut que le grub debian reconnaisse la signature du noyau ubuntu(qui est actuellement signé avec une clé ubuntu et non une clé debian)

C'est le but de la manœuvre que tu as essayé mais il doit y avoir une subtilité qui me dépasse. Il vaut mieux attendre l'aide des pro.

Dernière modification par wardidi (28-05-2024 18:10:26)

Hors ligne

#14 28-05-2024 18:38:54

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

ceric a écrit :

sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-21-amd64
Found initrd image: /boot/initrd.img-6.1.0-21-amd64
Found linux image: /boot/vmlinuz-6.1.0-18-amd64
Found initrd image: /boot/initrd.img-6.1.0-18-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Ubuntu 24.04 LTS (24.04) on /dev/sda1
Adding boot menu entry for UEFI Firmware Settings ...
erreur : syntax error.
erreur : Incorrect command.
erreur : syntax error.
Erreur de syntaxe à la ligne 309
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.



Je crois comprendre. os-prober est rentré en conflit avec l'ajout manuel de l'entrée ubuntu. Il faut le désactiver

1/ désactive SB
2/

[code]sudo nano /etc/grub.d/40_custom[/code]


3/

menuentry 'Ubuntu  boot menu' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-e>
        else
          search --no-floppy --fs-uuid --set=root A8C7-C568
        fi
        chainloader /EFI/Ubuntu/shimx64.efi
}
 


4/desactiver os-prober

 sudo nano /etc/default/grub
#GRUB_DISABLE_OS_PROBER=false
 


5/integrer ubuntu boot menu à grub.cfg avec

sudo update-grub



L'entrée du ubuntu du grub debian devrait te renvoyer vers celui ubuntu où tu choisis de démarrer ubuntu y compris avec le secureboot activer. Chaque grub devrait avoir la bonne signature pour leur propre os.


Je pense que tu peux le tenter sans grand risque.

Dernière modification par wardidi (28-05-2024 18:40:12)

Hors ligne

#15 28-05-2024 18:41:40

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

Les commandes ont d'ores et déjà été exécutées, Merci. wink
@Wardidi, est-ce que je peux laisser désactivé le secureboot ou est-ce que je cours un risque?

Dernière modification par ceric (28-05-2024 18:49:13)


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#16 28-05-2024 19:14:49

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

ceric a écrit :

Les commandes ont d'ores et déjà été exécutées, Merci. wink


Si tu parles des commandes du #14,
Tu dois pouvoir démarrer debian et Ubuntu avec secureboot activé  et donc pourquoi s'en passer?

https://wiki.debian.org/fr/SecureBoot

Hors ligne

#17 28-05-2024 19:26:19

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

J'ai une autre question : comment supprimer l'erreur de la ligne 309?

Dernière modification par ceric (28-05-2024 20:38:02)


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#18 28-05-2024 19:56:21

dezix
Membre
Distrib. : Debian stable
Noyau : Linux amd64 (stable)
(G)UI : XFCE4
Inscription : 19-02-2018

Re : [Résolu] Dual boot Debian vs Ubuntu

Salut !

Si tu passes la commande du #17 le fichier ne sera plus exécutable (script) donc ça risque d'avoir le même effet que de le supprimer.

Sur mon poste de travail, les scripts contenus dans /etc/grub.d/ sont tous exécutables.

Hors ligne

#19 28-05-2024 19:56:50

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

@wardidi, j'ai remis le secureboot et je ne peux plus booter sur ubuntu.

Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#20 28-05-2024 19:58:36

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

Pas certain de comprendre ce que tu dis et fais

As tu exécuté la procédure de 1 à 5 au#14?

Si oui et que tu as toujours l'erreur alors je passe la main.. je n'ai fais que reporter la solution qui a fonctionné pour moi et ne pourrais t'aider plus.
Mais je ne pense pas qu'il s agisse d'un problème de permission.

Hors ligne

#21 28-05-2024 20:10:42

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

wardidi a écrit :

Pas certain de comprendre ce que tu dis et fais

As tu exécuté la procédure de 1 à 5 au#14?

Si oui et que tu as toujours l'erreur alors je passe la main.. je n'ai fais que reporter la solution qui a fonctionné pour moi et ne pourrais t'aider plus.
Mais je ne pense pas qu'il s agisse d'un problème de permission.


Oui j'ai exécuté la procédure de 1 à 5.


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#22 28-05-2024 20:33:11

wardidi
Adhérent(e)
Lieu : Bretagne
Distrib. : DF 12.4
Noyau : 6.1.0-13-amd64
Inscription : 28-11-2022

Re : [Résolu] Dual boot Debian vs Ubuntu

Désolé.  Ça a marché  pour moi.
Je ne doute pas que quelqu'un de plus compétent te vienne en aide bientôt.
En attendant tu peux utiliser Ubuntu sans secureboot
(Ou comme moi ne plus l'utiliser et preferer debian:cool:)
Édit.
Éditer grub pour voir la ligne 309 devrait permettre au aidant d'y voir plus clair

Dernière modification par wardidi (28-05-2024 20:38:50)

Hors ligne

#23 28-05-2024 20:50:11

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu


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"

. "$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 [ \$grub_platform = efi ]; 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


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#24 28-05-2024 20:51:35

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu


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"

. "$pkgdatadir/grub-mkconfig_lib"

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

CLASS="--class gnu-linux --class gnu --class os --class xen"
SUPPORTED_INITS="sysvinit:/lib/sysvinit/init systemd:/lib/systemd/systemd upstart:/sbin/upstart"

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    # We can't cope with devices loop-mounted from files here.
    case ${GRUB_DEVICE} in
      /dev/*) ;;
      *) exit 0 ;;
    esac
  ;;
esac

# Default to disabling partition uuid support to maintian compatibility with
# older kernels.
GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true}

# btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
# and mounting btrfs requires user space scanning, so force UUID in this case.
if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] ) \
    || ( [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
  && [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ] ) \
    || ( ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
  && ! test -e "/dev/disk/by-partuuid/${GRUB_DEVICE_PARTUUID}" ) \
    || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \
    || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ]; then
  LINUX_ROOT_DEVICE=PARTUUID=${GRUB_DEVICE_PARTUUID}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
  GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
fi
if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
  GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
fi

case x"$GRUB_FS" in
    xbtrfs)
  rootsubvol="`make_system_path_relative_to_its_root /`"
  rootsubvol="${rootsubvol#/}"
  if [ "x${rootsubvol}" != x ]; then
      GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
  fi;;
    xzfs)
  rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
  bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
  LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
  ;;
esac

title_correction_code=

linux_entry ()
{
  linux_entry_xsm "$@" false
  linux_entry_xsm "$@" true
}
linux_entry_xsm ()
{
  os="$1"
  version="$2"
  xen_version="$3"
  type="$4"
  args="$5"
  xen_args="$6"
  xsm="$7"
  # If user wants to enable XSM support, make sure there's
  # corresponding policy file.
  if ${xsm} ; then
      xenpolicy="xenpolicy-$xen_version"
      if test ! -e "${xen_dirname}/${xenpolicy}" ; then
    return
      fi
      xen_args="$xen_args flask=enforcing"
      xen_version="$(gettext_printf "%s (XSM enabled)" "$xen_version")"
      # xen_version is used for messages only; actual file is xen_basename
  fi
  if [ -z "$boot_device_id" ]; then
      boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
  fi
  if [ x$type != xsimple ] ; then
      if [ x$type = xrecovery ] ; then
    title="$(gettext_printf "%s, with Xen %s and Linux %s (%s)" "${os}" "${xen_version}" "${version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
      elif [ "${type#init-}" != "$type" ] ; then
    title="$(gettext_printf "%s, with Xen %s and Linux %s (%s)" "${os}" "${xen_version}" "${version}" "${type#init-}")"
      else
    title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")"
      fi
      replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
      if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
         quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
         title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
         grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
      fi
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  else
      title="$(gettext_printf "%s, with Xen hypervisor" "${os}")"
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  fi
  if [ x$type != xrecovery ] ; then
      save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
  fi

  if [ -z "${prepare_boot_cache}" ]; then
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
  fi
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
  xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
  lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
  sed "s/^/$submenu_indentation/" << EOF
  echo  '$(echo "$xmessage" | grub_quote)'
        if [ "\$grub_platform" = "pc" -o "\$grub_platform" = "" ]; then
            xen_rm_opts=
        else
            xen_rm_opts="no-real-mode edd=off"
        fi
  ${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
  echo  '$(echo "$lmessage" | grub_quote)'
  ${module_loader}  ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
  if test -n "${initrd}" ; then
    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
    message="$(gettext_printf "Loading initial ramdisk ...")"
    initrd_path=
    for i in ${initrd}; do
       initrd_path="${initrd_path} ${rel_dirname}/${i}"
    done
    sed "s/^/$submenu_indentation/" << EOF
  echo  '$(echo "$message" | grub_quote)'
  ${module_loader}  --nounzip   $(echo $initrd_path)
EOF
  fi
  if ${xsm} && test -n "${xenpolicy}" ; then
    message="$(gettext_printf "Loading XSM policy ...")"
    sed "s/^/$submenu_indentation/" << EOF
  echo  '$(echo "$message" | grub_quote)'
  ${module_loader}     ${rel_dirname}/${xenpolicy}
EOF
  fi
  sed "s/^/$submenu_indentation/" << EOF
}
EOF
}

linux_list=
for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
    if grub_file_is_not_garbage "$i"; then
      basename=$(basename $i)
  version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
  dirname=$(dirname $i)
  config=
  for j in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
      if test -e "${j}" ; then
    config="${j}"
    break
      fi
  done
        if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then linux_list="$linux_list $i" ; fi
    fi
done
if [ "x${linux_list}" = "x" ] ; then
    exit 0
fi

file_is_not_xen_garbage () {
    case "$1" in
  */xen-syms-*)
      return 1;;
  */xenpolicy-*)
      return 1;;
  */*.config)
      return 1;;
  *)
      return 0;;
    esac
}

xen_list=
for i in /boot/xen*; do
    if grub_file_is_not_garbage "$i" && file_is_not_xen_garbage "$i" ; then xen_list="$xen_list $i" ; fi
done
prepare_boot_cache=
boot_device_id=

title_correction_code=

machine=`uname -m`

case "$machine" in
    i?86) GENKERNEL_ARCH="x86" ;;
    mips|mips64) GENKERNEL_ARCH="mips" ;;
    mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
    arm*) GENKERNEL_ARCH="arm" ;;
    *) GENKERNEL_ARCH="$machine" ;;
esac

# Extra indentation to add to menu entries in a submenu. We're not in a submenu
# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
submenu_indentation=""

is_top_level=true

while [ "x${xen_list}" != "x" ] ; do
    list="${linux_list}"
    current_xen=`version_find_latest $xen_list`
    xen_basename=`basename ${current_xen}`
    xen_dirname=`dirname ${current_xen}`
    rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname`
    xen_version=`echo $xen_basename | sed -e "s,.gz$,,g;s,^xen-,,g"`
    if [ -z "$boot_device_id" ]; then
  boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
    fi
    if [ "x$is_top_level" != xtrue ]; then
  echo "  submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
    fi
    if ($grub_file --is-arm64-efi $current_xen); then
  xen_loader="xen_hypervisor"
  module_loader="xen_module"
    else
  if ($grub_file --is-x86-multiboot2 $current_xen); then
      xen_loader="multiboot2"
      module_loader="module2"
  else
      xen_loader="multiboot"
      module_loader="module"
        fi
    fi

    initrd_early=
    for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
             ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
       if test -e "${xen_dirname}/${i}" ; then
          initrd_early="${initrd_early} ${i}"
       fi
    done

    while [ "x$list" != "x" ] ; do
  linux=`version_find_latest $list`
  gettext_printf "Found linux image: %s\n" "$linux" >&2
  basename=`basename $linux`
  dirname=`dirname $linux`
  rel_dirname=`make_system_path_relative_to_its_root $dirname`
  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

  initrd_real=
  for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
     "initrd-${version}" "initramfs-${version}.img" \
     "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
     "initrd-${alt_version}" "initramfs-${alt_version}.img" \
     "initramfs-genkernel-${version}" \
     "initramfs-genkernel-${alt_version}" \
     "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
     "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" ; do
      if test -e "${dirname}/${i}" ; then
    initrd_real="$i"
    break
      fi
  done

  initrd=
  if test -n "${initrd_early}" || test -n "${initrd_real}"; then
      initrd="${initrd_early} ${initrd_real}"

      initrd_display=
      for i in ${initrd}; do
    initrd_display="${initrd_display} ${dirname}/${i}"
      done
      gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
  fi

  if test -z "${initrd_real}"; then
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
      if [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] \
    || [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ]; then

    linux_root_device_thisversion=${GRUB_DEVICE}
      else
    linux_root_device_thisversion=PARTUUID=${GRUB_DEVICE_PARTUUID}
      fi
  fi

  # The GRUB_DISABLE_SUBMENU option used to be different than others since it was
  # mentioned in the documentation that has to be set to 'y' instead of 'true' to
  # enable it. This caused a lot of confusion to users that set the option to 'y',
  # 'yes' or 'true'. This was fixed but all of these values must be supported now.
  if [ "x${GRUB_DISABLE_SUBMENU}" = xyes ] || [ "x${GRUB_DISABLE_SUBMENU}" = xy ]; then
      GRUB_DISABLE_SUBMENU="true"
  fi

  if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
      linux_entry "${OS}" "${version}" "${xen_version}" simple \
    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"

      submenu_indentation="$grub_tab$grub_tab"
   
      if [ -z "$boot_device_id" ]; then
    boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
      fi
            # TRANSLATORS: %s is replaced with an OS name
      echo "submenu '$(gettext_printf "Advanced options for %s (with Xen hypervisor)" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
  echo "  submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
     is_top_level=false
  fi

  linux_entry "${OS}" "${version}" "${xen_version}" advanced \
      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
  for supported_init in ${SUPPORTED_INITS}; do
      init_path="${supported_init#*:}"
      if [ -x "${init_path}" ] && [ "$(readlink -f /sbin/init)" != "$(readlink -f "${init_path}")" ]; then
    linux_entry "${OS}" "${version}" "${xen_version}" "init-${supported_init%%:*}" \
        "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} init=${init_path}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"

      fi
  done
  if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
      linux_entry "${OS}" "${version}" "${xen_version}" recovery \
    "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
  fi

  list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
    done
    if [ x"$is_top_level" != xtrue ]; then
  echo '  }'
    fi
    xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
# add a closing '}' for the submenu command.
if [ x"$is_top_level" != xtrue ]; then
  echo '}'
fi

echo "$title_correction_code"


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

#25 28-05-2024 20:53:41

ceric
Membre
Lieu : Pyrénées Atlantiques
Distrib. : Debian 12 Bookworm
Noyau : Linux 6.1.0-xx-amd64
(G)UI : GNOME Shell
Inscription : 22-04-2014

Re : [Résolu] Dual boot Debian vs Ubuntu

# 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=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
GRUB_DISABLE_OS_PROBER=false

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


Elitedesk 800 G2 (dual boot ubuntu Noble Numbat vs debian Bookworm)

Hors ligne

Pied de page des forums