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 01/11/2021, à 11:04

freewee

Grub GPT multiboot [résolu]

Bonjour
Je suis en multiboot GPT, avec Windows 7, Windows10, Ubuntu 18.04 (utilisé principalement, GRUB installé sur cette partition), et une autre partition avec une autre version linux, actuellement Ubuntu 20.04.Tout ce petit monde cohabite sans problème, mais devant le manque de place , je suis passé à un SSD plus grand. Comme il reste un peu de place, j' ai décidé de l' affecter à une nouvelle partition Ubuntu.
Mon projet était d' utiliser la partition secondaire, Ubuntu 20.04, de la recopier sur la place libre du SSD, ou d' utiliser une image de cette partition, pour tenter des test d' upgrade vers les nouvelles versions (et résoudre certains problèmes!).
Pas de problème de boot, je démarre en 18.04, j' actualise le GRUB, (j' ai vérifié le fstab de la nouvelle partition Ubuntu, elle est actualisée), tous semble normal au niveau de mon GRUB, mais ça ne fonctionne pas!
J' ai un accès normal au démarrage à ma partition Ubuntu 18.04, mes partitions Windows, mais je n' ai plus accès à ma partition 20.04 initiale, j' accède juste à la partition que j' ai recopiée...
Dans le GRUB, les 3 partitions Ubuntu apparaissent, avec leur chemin specifique (sda6 sda7(grub) sda10), mais que je choisisse sda6 ou sda10, le démarrage pointe vers sda10.
Par hasard, j' ai essayé un "boot repair", mais au moment de purger le grub, il me dit que le grub est toujours présent et la procédure s' interrompt!
J' accède quand même a ma partition 20.04 initiale en utilisant supergrub2disk, mais ce n' est pas pratique!
Seul moyen de retrouver un démarrage correct c' est d' effacer la dernière partition créée!
Donc avant de tenter de nouveau l' aventure, avez vous des conseils à me donner, en l' occurrence est il possible d'utiliser une partition Ubuntu déjà existante (sans avoir à réinstaller l'OS et tout ce qui est installé dessus!!!) pour la recopier et l' intégrer dans mon multiboot??
Merci

Dernière modification par freewee (Le 06/11/2021, à 23:21)

Hors ligne

#2 Le 01/11/2021, à 11:59

Qid

Re : Grub GPT multiboot [résolu]

Trop de baratin tue le baratin... D'autant que tu parles de 2 disques durs mais que de sda... Bref nous poster ici un bootinfo aurait été tellement plus simple pour t'aider wink


"GNU/Linux c'est que du bon mais M$ Windows ce n'est pas si mal"
Référent technique Ubuntu d'un Groupe d'Utilisateur du Libre
plus d'info sur mon profil

Hors ligne

#3 Le 01/11/2021, à 16:17

Babdu89

Re : Grub GPT multiboot [résolu]

Bonjour.

Post#1, on lit ceci;

Mon projet était d' utiliser la partition secondaire, Ubuntu 20.04, de la recopier sur la place libre du SSD, ou d' utiliser une image de cette partition, pour tenter des test d' upgrade vers les nouvelles versions (et résoudre certains problèmes!).
Pas de problème de boot, je démarre en 18.04, j' actualise le GRUB, (j' ai vérifié le fstab de la nouvelle partition Ubuntu, elle est actualisée), tous semble normal au niveau de mon GRUB, mais ça ne fonctionne pas!

Pas de problème de boot, je démarre en 18.04, j' actualise le GRUB,
(j' ai vérifié le fstab de la nouvelle partition Ubuntu, elle est actualisée),


De mon coté. Pour faire couramment ce que tu as fait (je copie mes systèmes tout installé de disque à disque.)

Tu as actualisé/corrigé l'UUID de la partition de la copie dans son fstab. OK!.

Comme tu n'as pas réinstallé grub dans la copie de la 20.04 sur le SSD (çà ce fait facilement en session live avec boot-repair).

Ça ne peut pas marcher, car dans le fichier de configuration de grub de la 20.04 copié, (/boot/grub/grub.cfg)
C'est l'UUID de la partition de la 20.04 d'origine qui y figure. Ce n'est pas celui de la partition qui reçoit la copie.
Comme l'UUID de cette partition n'est pas identique à celui du fichier corrigé dans le fstab de la copie, çà ne peut pas démarrer.

Tu peux vérifier çà, en regardant le contenu du fstab et du grub.cfg de la copie. l'UUID de la partition doit être le même.
Il ne suffit pas de reporter/corriger l'UUID de la partition de la copie dans le fstab, il faut aussi corriger  l'UUID dans le grub.cfg de la copie. Il n'y a qu'une réinstallation de grub dans la copie qui le fasse.

En même temps, çà permet d'avoir un fichier grub.cfg à jour, pour un éventuel démarrage de la machine en choisissant le grub de la copie pour faire démarrer la machine par défaut.

Après réinstallation de grub dans la copie. Lorsque la 20.04 copiée démarrera, ne pas oublier de faire la mise à jour du grub de la 18.04,
car là aussi, c'est l'UUID de la 20.04 d'origine, qui figure dans le menuentry de la copie de la 20.04, puisque pour faire les mises à jour de grub, pour les Linux, le système va chercher les informations dans le fichiers grub.cfg des Linux installés.   

Tu peux aussi vérifier avant de faire les modif, dans le fichier /boot/grub/grub.cfg de la 18.04. Dans leur menuentry tu vas voir que pour la 20.04 originale et la 20.04 copié, c'est l'UUID de la partition où est installé la 20.04 originale qui figure pour les deux menuentry. C'est çà qu'il faut corriger pour que çà démarre.

@+.   Babdu89   .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#4 Le 01/11/2021, à 16:41

Babdu89

Re : Grub GPT multiboot [résolu]

Post#1, on lit aussi;

Pas de problème de boot, je démarre en 18.04, j' actualise le GRUB, (j' ai vérifié le fstab de la nouvelle partition Ubuntu, elle est actualisée), tous semble normal au niveau de mon GRUB, mais ça ne fonctionne pas!
    J' ai un accès normal au démarrage à ma partition Ubuntu 18.04, mes partitions Windows, mais je n' ai plus accès à ma partition 20.04 initiale, j' accède juste à la partition que j' ai recopiée...

Et bien justement non, c'est bien la partition initiale de la 20.04 qui démarre, ce n'est pas la copie.
Moi aussi je suis fait avoir au début de mes manips, j'ai cru çà aussi.
Tu verras çà en regardant dans les menuentry du fichier grub.cfg de la 18.04.
Explication dans mon post précédent.

Le fait que dans l'originale et la copie, c'est l'UUID de la partition de l'originale qui figure dans leur fichier grub.cfg respectif, suffit à lancer l'originale puisque le système trouve concordance d'UUID de partition fstab et grub.cfg dans l'originale.

@+.   Babdu89   .

Dernière modification par Babdu89 (Le 01/11/2021, à 16:52)


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#5 Le 01/11/2021, à 16:44

freewee

Re : Grub GPT multiboot [résolu]

Qid a écrit :

Trop de baratin tue le baratin... D'autant que tu parles de 2 disques durs mais que de sda... Bref nous poster ici un bootinfo aurait été tellement plus simple pour t'aider wink

Bonjour
Euh non je ne parle pas de 2 disques, tous les OS sont installés sur un seul disque! je suis retourné actuellement sur une configuration qui fonctionne sans la troisième partition Ubuntu !
Merci

Hors ligne

#6 Le 01/11/2021, à 16:53

freewee

Re : Grub GPT multiboot [résolu]

Merci Babdu89!
Les explications détaillées devraient me permettre d' y arriver!
Mes recherches google retombent invariablement sur des banalités, mais là, chapeau, c' est précis et adapté à ma recherche; je ne crois pas avoir le temps de m' y remettre tout de suite, mais je te tiens au courant dès que c' est fait!
Encore un grand merci! smile

Hors ligne

#7 Le 01/11/2021, à 17:08

Babdu89

Re : Grub GPT multiboot [résolu]

Alors, pour bidouiller souvent en copiant mes systèmes.
En regardant comment fonctionne grub au démarrage.
Grub n'a que faire de;
/dev/sda1 /dev/sda2  &&&
msdos1  msdos2   &&&
Ubuntu
Ubuntu copie
Tout ceci pour les systèmes Linux installés.

Seul l'UUID de la partition à lancer l'intéresse.
Et lorsque l'UUID est le même dans fstab et grub.cfg. du Linux installé, il y a concordance.
Ça démarre le système installé dans la partition.

@+.   Babdu89   .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#8 Le 01/11/2021, à 17:29

Qid

Re : Grub GPT multiboot [résolu]

freewee a écrit :
Qid a écrit :

Trop de baratin tue le baratin... D'autant que tu parles de 2 disques durs mais que de sda... Bref nous poster ici un bootinfo aurait été tellement plus simple pour t'aider wink

Bonjour
Euh non je ne parle pas de 2 disques, tous les OS sont installés sur un seul disque! je suis retourné actuellement sur une configuration qui fonctionne sans la troisième partition Ubuntu !

Si tu pars d'un disque que tu copies intégralement vers un autre et que tu enlève celui d'origine je ne vois pas pourquoi et comment il y aurait un souci... Je maintiens qu'un bootinfo serait une bonne chose pour clarifier la situation...


"GNU/Linux c'est que du bon mais M$ Windows ce n'est pas si mal"
Référent technique Ubuntu d'un Groupe d'Utilisateur du Libre
plus d'info sur mon profil

Hors ligne

#9 Le 01/11/2021, à 17:43

Babdu89

Re : Grub GPT multiboot [résolu]

Oui! . +1 pour un boot info
Mais la dernière version donne que des fichiers grub.cfg allégés des installations en multi boot, mais indique les UUID des partitions d'installation, de même que pour les fstab.
Ça permettra de voir les UUID des partitions d'installation.

Ça permettra aussi de confirmer où pas mon diagnostique, et les manips à faire avec boot-repair.

@+.    Babdu89   .

Dernière modification par Babdu89 (Le 01/11/2021, à 17:43)


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#10 Le 01/11/2021, à 18:17

freewee

Re : Grub GPT multiboot [résolu]

Juste une info: je n' ai pas vraiment copié mon premier disque, J' ai remis mes partitions dans l' ordre préconisé par W10 (ça marchait bien avant, mais autant faire des choses propres sur le nouveau disque, j' ai fait en sorte d' avoir une partition de récupération Windows fonctionnelle, une partition msr même si Ubuntu ne s' en occupe pas,enfin diverses petites modifications), tout a fonctionné sans problème... C' est la tentative d' intégrer un troisième Ubuntu sur un espace libre qui m' a posé problème!

Hors ligne

#11 Le 01/11/2021, à 19:04

freewee

Re : Grub GPT multiboot [résolu]

J' ai eu un peu de temps car le temps est très moche!
Je pense que c' est bon!
Il y a eu une grosse une erreur de ma part au début (enfin une omission): j' ai bien vérifié fstab dans ma partition copiée, mais je n' avais pas fait attention au fait que ma partition copiée à gardé le même UUID que la partition originale; dans ma tête l'UUID était attribué aléatoirement au moment de la création de la partition...
Donc j' ai attribué un nouvel UUID à la partition copiée avec Gparted, puis corrigé le fstab. Cette fois ci le grub pointait toujours vers la partition originale (alors qu' avant, avec ma bêtise, il pointait toujours vers la partition copiée); un boot repair sur la partition copiée, et maintenant j' accède à toute mes partitions...
Il me reste a réinstaller le Grub au niveau de ma partition "principale" et ça devrait aller.
Encore un grand merci pour votre coopération efficace!!! Si le sujet passe en résolu, c' est que c' est bon!!
Dominique

Hors ligne

#12 Le 01/11/2021, à 19:20

Qid

Re : Grub GPT multiboot [résolu]

roll ... Bon moi j'abandonne parce-que pour moi l'action qui a été faite n'est toujours pas clair :
On parlait d'un transfert de partitions d'un ancien disque à dégager vers un nouveau... Je ne vois toujours pas dans cette situation comment il peut y avoir 2 partitions qui rentrent en conflit...


"GNU/Linux c'est que du bon mais M$ Windows ce n'est pas si mal"
Référent technique Ubuntu d'un Groupe d'Utilisateur du Libre
plus d'info sur mon profil

Hors ligne

#13 Le 01/11/2021, à 23:16

Babdu89

Re : Grub GPT multiboot [résolu]

Post#11, on lit;

Il y a eu une grosse une erreur de ma part au début (enfin une omission): j' ai bien vérifié fstab dans ma partition copiée, mais je n' avais pas fait attention au fait que ma partition copiée à gardé le même UUID que la partition originale; dans ma tête l'UUID était attribué aléatoirement au moment de la création de la partition...

Alors;
Si on créer une nouvelle partition avec gparted, il créer un nouvel UUID.

Si on copie une partition avec Gparted, il garde le même UUID. La partition avec l'originale et la partition de la copie ont le même UUID.

Donc j' ai attribué un nouvel UUID à la partition copiée avec Gparted, puis corrigé le fstab. Cette fois ci le grub pointait toujours vers la partition originale ==> OK

(alors qu' avant, avec ma bêtise, il pointait toujours vers la partition copiée); ==> oui, si tu démarres depuis le menuentry de la copie dans le menu grub de la 18.04 avec un grub à jour

Mais;
Le problème est que tu as deux installations identiques qui ont les mêmes UUID de partition, çà peut poser des soucis par le suite, les deux systèmes se marchent sur les pieds

@+.   Babdu89   .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#14 Le 01/11/2021, à 23:24

Qid

Re : Grub GPT multiboot [résolu]

Babdu89 a écrit :

Le problème est que tu as deux installations identiques qui ont les mêmes UUID de partition, çà peut poser des soucis par le suite, les deux systèmes se marchent sur les pieds

Comment il s'est retrouvé dans cette situation !?...


"GNU/Linux c'est que du bon mais M$ Windows ce n'est pas si mal"
Référent technique Ubuntu d'un Groupe d'Utilisateur du Libre
plus d'info sur mon profil

Hors ligne

#15 Le 02/11/2021, à 01:21

geole

Re : Grub GPT multiboot [résolu]

freewee a écrit :

Il y a eu une grosse une erreur de ma part au début (enfin une omission): j' ai bien vérifié fstab dans ma partition copiée, mais je n' avais pas fait attention au fait que ma partition copiée à gardé le même UUID que la partition originale; dans ma tête l'UUID était attribué aléatoirement au moment de la création de la partition...

Bonsoir
L'idéal étant de copier une partition dans un espace vierge.
A mon avis si tu copies une partition dans une partition existante, comme elle devient automatiquement du même format que la partition source, elle récupère aussi  son UUID. Il n'y a donc pas lieu de bidouiller le fichier /etc/fstab
Cette bidouille n'est à faire qu'après la copie après avoir modifié le UUID de l'une des partitions LORSQUE les deux disques sont présents simultanément.

Dernière modification par geole (Le 02/11/2021, à 01:28)


Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne

#16 Le 02/11/2021, à 10:10

Babdu89

Re : Grub GPT multiboot [résolu]

Bonjour.

Il y a plusieurs manières de copier partitions/partition système.

Une partition c'est un système de fichiers avec ses propriétés, format,UUID &&&. Plus des données écrites dans la partition. Ces données peuvent être un système installé.

La copie de partition système peut être faite de plusieurs manières;
En commande avec dd , cp
En graphique avec Gparted par exemple.

Particularité d'une partition contenant un système que l'on doit faire démarrer. Sous Linux c'est l'UUID de la partition qui contient le système qui est recherché au démarrage par le boot loader (ici grub).

La concordance de l'UUID ce trouve dans l'information trouvée sur la partition; UUID de la partition qui contient le système et dans les fichiers fstab et grub.cfg. Pour que le système démarre il faut que ces trois UUID soient identiques.

Pour les copies de systèmes, ma préférence va à la commande cp. On copie les données d'une partition dans une autre partition créée pour se faire. Çà permet de changer facilement la taille des partitions cibles, plus grande ou plus petite que la partition d'origine. La taille des données du système installé étant la limite à respecter.
La copie avec Gparted ne permet pas directement de changer la taille de la partition à copier, il faut le faire avant ou après.

Exemple;
Copie avec la commande cp.
Je veux copier un système installé dans une partition de 100 Go. Les données du systèmes occupent 30 GO.
Je veux copier le système dans une partition de 50 GO.
Avec Gparted création de la partition de 50 Go. Il y a donc un nouvel UUID créé.
Avec cp, je copie les données de la partition de 100 Go dans la partition de 50 Go.
Dans la copie du système de la partition de 50 Go, on a l'UUID de la partition de 100 GO dans le fstab et grub.cfg
Donc une différence d'UUID de partition; nouvel UUID de partition (50 GO) et UUID de la partition de 100 Go copié dans les données de la partition de 50 GO.
Ça ne peut pas démarrer, il n'y a pas concordance des trois UUID.
1) Dans le système copier de la partition de 50 Go, dans le fichier fstab, il faut changer l'UUID de la partition de 100 GO pour celui de la partition de 50 Go. On le fait manuellement.
2) Dans le système copier de la partition de 50 Go, dans le fichier grub.cfg il faut changer l'UUID de la partition de 100 GO pour celui de la partition de 50 Go. Il n'y a que la réinstallation de grub dans le système de la partition de 50 Go qui fait çà correctement.
On a donc à ce moment la concordance des trois UUID.
Le système copié dans la partition de 50 Go peut donc démarrer.

@+.   Babdu89   .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#17 Le 02/11/2021, à 10:19

Qid

Re : Grub GPT multiboot [résolu]

Babdu89 a écrit :

Pour les copies de systèmes, ma préférence va à la commande cp. On copie les données d'une partition dans une autre partition créée pour se faire. Çà permet de changer facilement la taille des partitions cibles, plus grande ou plus petite que la partition d'origine. La taille des données du système installé étant la limite à respecter.

Ouais m'enfin comme tu l'as bien détaillé dans le reste de ton post c'est quand même un beau bazar à gérer après quand on ne maîtrise pas ce que l'on fait...


"GNU/Linux c'est que du bon mais M$ Windows ce n'est pas si mal"
Référent technique Ubuntu d'un Groupe d'Utilisateur du Libre
plus d'info sur mon profil

Hors ligne

#18 Le 02/11/2021, à 11:22

geole

Re : Grub GPT multiboot [résolu]

Bonjour.
Lorsqu'on veut remplacer un disque par un disque plus grand, cette procédure peut être faite.
1) Brancher le second disque ( soit en interne, soit en USB )
2) Dupliquer le premier disque avec ddrescue ou par la commande dd s'il est resté en très bon état.
3) Changer les étiquettes des partitions de l'un des disques. Eventuellement retailler les partitions   
4) rebooter après avoir
    Soit remplacé le disque interne par le disque externe.
    Soit avoir vérifié que le nouveau disque est branché sur un connecteur SATA ayant un numéro inférieur à l'ancien disque.
5)  Vérifier avec la command blkid qu'on a bien booté sur le nouveau disque en comparant les étiquettes ou  avec la commande fdisk en comparant la taille des disques.
6) Réparer la table de partition pour lui faire connaitre la vraie taille du disque. ( il me semble que la proposition est automatique)


Nota. Lorsque c'est un ajout de disque. Il serait dommages de dupliquer toutes les partitions alors qu'il n'y en aurait qu'une à déplacer.

Dernière modification par geole (Le 02/11/2021, à 11:29)


Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne

#19 Le 02/11/2021, à 12:32

Babdu89

Re : Grub GPT multiboot [résolu]

geoe a écrit;
2) Dupliquer le premier disque avec ddrescue ou par la commande dd s'il est resté en très bon état.

À confirmer?.

Il me semble qu'avec dd et ddrescue, on copie de disque à disque octet a octet, on clone vraiment le disque.

Exemple; Une partition ayant beaucoup servi, au pire avec des erreurs d'écriture. À un moment, elle aura été pleine de données. (Partition de 10 Go pleine 9,90 Go de données). À mesure de l'usage on en supprime des données, lorsqu'on la copie elle ne contient plus que 6 Go de données utilisables.

Rappel; Lorsque l'on supprime des données, on ne supprime pas les écritures dans les secteurs, mais les table d'allocation qui permettent de retrouver les données utilisable des fichiers.
On va copier sur le nouveau disque tous les octets erreurs comprises, données supprimées donc 9,90 Go

Avec cp, sur le nouveau disque on ne copie que les données qui servent à faire fonctionner le système, ou les données utilisable au moment de la copie. (6 Go), c'est une des raisons qui me font préférer cp a dd. Et avec cp c'est plus rapide qu'avec dd.

Remarque, la commande cp n'est vraiment utilisable que pour copier des partitions de format Ext, çà ne convient pas du tout pour copier les partition Windows.

@+.   Babdu89  .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#20 Le 02/11/2021, à 13:05

geole

Re : Grub GPT multiboot [résolu]

Bonjour
Babdu89
Sur le fond  tu as raison mais tu dis que pour du  ntfs il y a problème.
- Si le disque est devenu trop petit, il y a des chances que les partitions soient pleines  à 90% et pas à 10%
Donc le gain par la commande cp ne sera pas si évidant.
- la commande  dd plante à la rencontre du premier secteur illisible.
- La commande ddrescue, ne copie aucun des secteurs illisibles. En conséquences, on utilisera les très bons secteurs du nouveau disque avec  les données que ces secteurs contiennent (probablement des zéros). Il n'y a pas de perte d'espace disque.

Hors sujet, Tu seras peut-être intéressé par ce script qui copie la partition ubuntu en cours d'exécution pour avoir une version moins -1. Spécialement le renommage des UUID ce qui permet de l'utiliser en secours si besoin.

###
##  Script de copie du logiciel Ubuntu qui est dans la partition SDC4. Ce script s'exécute en mode ROOT
LABEL=DupliUbuntu   # Label de la partition de sortie
if [ $UID != 0 ]; then
echo -e "\n\a\E[31mVous devez être l'utilisateur root pour exécuter ce script.\E[0m\nPour devenir root, veuillez frapper les deux mots de la ligne ci-dessous.\n\E[0m\E[34;47msudo -i\E[0m\navant de faire le 'coller'. Vous pourrez alors relancer le script.\n"
else
TRACE="\n\a\E[31mON Y VA POUR: \E[0m" 
echo -e $TRACE "copier le logiciel Ubuntu qui est dans le SSD" && sleep 6 && echo "Début de sauvetage $(date)" > DATE
udisksctl mount -b /dev/disk/by-label/$LABEL ## Montage de la partition où sauver.
rm /media/$USER/$LABEL/etc/fstab /media/$USER/$LABEL/boot/grub/grub.cfg 
########## Commande première fois afin d'avoir tous les répertoires dont /proc nécessaire pour boot-repair et /home/a/.cache nécessaire pour mozilla
#### sudo rsync -o -g -r -u -l -p -h -x -v --times --stats --delete-before --exclude={ '/mnt' , '/media' , '/home/*/[^.]*' } /  /media/$USER/$LABEL
## Puisqu'il faut créer la partition, il me semble simple d'udifiser gparted pour dupliquer la partition émettrice  puis de modifier le uuid de la partition réceptrice plutôt que de créer une partition vide....

#### Commande pour les fois suivantes.
echo -e $TRACE épurer le logiciel && sleep 6
apt autoremove --purge

echo -e $TRACE transférer le logiciel  && sleep 6
rsync -o -g -r -u -l -p -A -h -x --times --stats  --delete-before --exclude  /proc --exclude /sys --exclude /pts --exclude *.log --exclude .Trash* --exclude /mnt --exclude /media --exclude swapfile --exclude /home --exclude /root/.cache --exclude /var/log/journal --exclude /tmp  --exclude /var/tmp --exclude /run  /  /media/$USER/$LABEL

echo -e $TRACE transférer  le home && sleep 6
rsync  -o -g -r -u -l -p -A -h -x --times --stats  --delete-after --exclude a/.cache/mozilla  --exclude a/[^.]* /home  /media/$USER/$LABEL

echo -e $TRACE générer le nouveau noyau && sleep 6
# récupérer le UUID du systeme installé dans le SSD
UUIDbad=$(echo $(sed '/^[ \t]*$/d;/^[ \t]*#/d' /etc/fstab| grep -m 1 UUID | cut -c6-41))&& echo $UUIDbad
#récupérer le UUID du disque dur
UUIDgood=$(echo $(lsblk -fe7 | grep "$LABEL")| cut -d" " -f4)  && echo $UUIDgood
#Mettre à jour son fichier fstab et son fichier grub.cfg
cp -v /media/$USER/$LABEL/etc/fstab /media/$USER/$LABEL/etc/fstab.REF
cp -v /media/$USER/$LABEL/boot/grub/grub.cfg /media/$USER/$LABEL/boot/grub/grub.cfg.REF
sed -i "s/$UUIDbad/$UUIDgood/" /media/$USER/$LABEL/etc/fstab
sed -i "s/$UUIDbad/$UUIDgood/g" /media/$USER/$LABEL/boot/grub/grub.cfg
chmod -x /media/$USER/$LABEL/etc/grub.d/30_os-prober
#Mettre à jour son sa structure de boot # et son noyau
mount -t proc   /proc /media/$USER/$LABEL/proc && mount -t sysfs  /sys /media/$USER/$LABEL/sys
mount --bind    /dev  /media/$USER/$LABEL/dev  && mount --bind    /run /media/$USER/$LABEL/run
chroot /media/$USER/$LABEL update-grub
###chroot /media/$USER/$LABEL update-initramfs -u -k all
umount -v /media/$USER/$LABEL/{run,dev,sys,proc} 
# On a fini la mise à jour de la duplication. Il faut la faire connaitre de la structure de boot
update-grub

echo -e $TRACE mettre à jour le logiciel && sleep 6
apt update
apt upgrade
apt full-upgrade

echo -e $TRACE compter && sleep 6
echo -e "\n\tDécompte des fichiers ubuntu en sortie :"; for i in /media/$USER/$LABEL/*; do echo -n "$i : " ; find "$i" | wc -l; done | sort -n -k3 | column -t | tail
udisksctl unmount -b  /dev/disk/by-label/$LABEL
echo -e "\n\tDécompte des fichiers ubuntu en entrée :"; for i in /*; do echo -n "$i : " ; find "$i" | wc -l; done | sort -n -k3 | column -t | tail
echo "Fin   de sauvetage $(date)" >> DATE
cat DATE
sleep 150
exit
fi

Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne

#21 Le 02/11/2021, à 18:54

Babdu89

Re : Grub GPT multiboot [résolu]

Concernant la commande cp.

geole a écrit;
Sur le fond  tu as raison mais tu dis que pour du  ntfs il y a problème.

En fait çà concerne la copie des données de la partition Windows, ce n'est pas un problème de taille, mais un problème d'écriture.

Réponse au Hs;
Si çà permet de remplacer avantageusement l'outil  Systemback qui à fonctionné jusque la 18.04 en bidouillant.
Une des options de cet outil, en session live faisait en graphique ce que je fait en commande.
Création de la partition cible recevant la copie du système.
Copie des données dans la partition cible, remplacement de l'UUID dans le fstab de la copie, et réinstallation de grub dans la copie, au final on redémarrait sur la copie. On pouvait copier un système installé dans une seule partition dans plusieurs partitions, et inversement. Il fonctionnait aussi en mode UEFI.
Ça c'était génial, dommage l'outil n'a pas été maintenu. J'en suis revenu aux commandes.

Je vais tester le script., merci.

@+.   Babdu89   .


J'ai découvert Ubuntu avec la 07.10.... Et alors?!...  Depuis je regarde de temps en temps si Windows marche toujours....

Hors ligne

#22 Le 04/11/2021, à 18:07

freewee

Re : Grub GPT multiboot [résolu]

Bonjour
Bon j' accède de nouveau à mon ordi!
Je vois qu' il y a eu des posts dont je n' ai pas eu connaissance (le forum bugue un peu de ce côté, la case de suivi est pourtant cochée!)
Mais je n' avance malheureusement pas depuis la dernière fois:
Ma partition principale Ubuntu 18.04 est sda7,j ' ai copié ma partition Ubuntu 20.04 sda6 sur sda10 (j' ai copié directement la partition sur un espace vierge de mon SSD), changé l' UUID de sda10 qui avait le même UUID que sda6, corrigé le fstab de sda10, puis fait un boot repair en choisissant sda10 comme installation du Grub.
A partir de là, j' ai eu un accès correct aux diverses partition à partir du menu de démarrage...Cela semblait correct, mais j' ai voulu réinstaller le Grub sur ma partition principale (sda7):pas de possibilité de faire un boot repair, il me dit que le grub est encore présent... Dans le doute j' ai essayé de réinstaller le grub sur sda6, ça a fonctionné, mais mais je me suis retrouvé comme auparavant, mes entrées de démarrages sda6 et sda10 pointant toujours vers la même partition. J' ai péniblement réussi à faire un boot repair en réinstallant grub sur sda10, et je retrouve des entrées de démarrage correctes, mais le boot info montre des erreurs sur sda6 et sda10...
Je suis un peu coincé, actuellement ça marche correctement au niveau du démarrage, je pourrais m' en contenter mais j' aimerai récupérer le Grub sur ma partion principale, les autres partitions Ubuntu étant pour moi des partitions de test et vouées parfois à destruction!!!

Merci

boot-repair-4ppa130                                              [20211104_1621]

============================== Boot Info Summary ===============================

 => Windows Vista is installed in the MBR of /dev/sda.
 => Windows Vista is installed in the MBR of /dev/sdb.
 => Windows 7/8/2012 is installed in the MBR of /dev/sdc.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 8/2012: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bkpbootx64.efi /efi/Boot/bootx64.efi 
                       /efi/Boot/fbx64.efi /efi/Boot/grubx64.efi 
                       /efi/Boot/mmx64.efi /efi/ubuntu/grubx64.efi 
                       /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi 
                       /efi/ubuntu/grub.cfg /efi/Microsoft/Boot/bootmgfw.efi 
                       /efi/Microsoft/Boot/bootmgr.efi 
                       /efi/Microsoft/Boot/memtest.efi

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 8 or 10
    Boot files:        /boot.ini /bootmgr /Boot/BCD 
                       /Windows/System32/winload.exe /ntldr /NTDETECT.COM

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda5: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /boot.ini /bootmgr /Boot/BCD 
                       /Windows/System32/winload.exe /ntldr /NTDETECT.COM

sda6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99-2.00)
    Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                       sda6 and looks at sector 272227256 of the same hard 
                       drive for core.img, but core.img can not be found at 
                       this location.
    Operating System:  Ubuntu 20.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                       /boot/grub/i386-pc/core.img

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 18.04.6 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sda8: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda9: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda10: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99-2.00)
    Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                       sda10 and looks at sector 272227256 of the same hard 
                       drive for core.img, but core.img can not be found at 
                       this location.
    Operating System:  Ubuntu 20.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb2: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Unknown
    Boot sector info:  According to the info in the boot sector, sdb3 has 
                       3092697087 sectors, but according to the info from 
                       fdisk, it has 7387664383 sectors.
    Operating System:  
    Boot files:        

sdc1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista: NTFS
    Boot sector info:  According to the info in the boot sector, sdc1 starts 
                       at sector 128. But according to the info from fdisk, 
                       sdc1 starts at sector 2176.
    Operating System:  
    Boot files:        


================================ 5 OS detected =================================

OS#1:   L'OS actuellement utilisé - Ubuntu 20.04.3 LTS CurrentSession on sda10
OS#2:   Ubuntu 20.04.3 LTS on sda6
OS#3:   Ubuntu 18.04.6 LTS on sda7
OS#4:   Windows 8 or 10 on sda3
OS#5:   Windows 7 on sda5

============================ Architecture/Host Info ============================

CPU architecture: 64-bit
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.11.0-38-generic root=UUID=7ccae5b6-356f-404a-a675-80c410b5127a ro quiet splash vt.handoff=7


===================================== UEFI =====================================

BIOS is EFI-compatible, and is setup in EFI-mode for this installed-session.

efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0009,0008,0006
Boot0000* Windows Boot Manager	HD(1,GPT,9dc874be-9ef6-4e13-cc09-cb5f2feabf46,0x800,0x32fcd)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....x...............
Boot0001* ubuntu	HD(1,GPT,9dc874be-9ef6-4e13-cc09-cb5f2feabf46,0x800,0x32fcd)/File(\EFI\ubuntu\shimx64.efi)
Boot0006* Disque dur 	BBS(HD,,0x0)AMGOAMNO........o.C.T.1.0.0.0.M.X.5.0.0.S.S.D.1....................A...........................>..Gd-.;.A..MQ..L.0.2.0.5.4.E.A.D.2.5.9.6. . . . . . . . ......AMBOAMNO........o.W.D.C. .W.D.4.0.0.3.F.R.Y.Z.-.0.1.F.0.D.B.0....................A...........................>..Gd-.;.A..MQ..L.1.V.8.G.H.7.G.H. . . . . . . . . . . . ......AMBOAMNO........o.S.T.2.0.0.0.D.M.0.0.1.-.1.C.H.1.6.4....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .1.Z.3.E.J.S.2.W......AMBO
Boot0008* Lecteur CD/DVD 	BBS(CDROM,,0x0)AMGOAMNO........o.H.L.-.D.T.-.S.T. .B.D.-.R.E. . .B.H.1.0.L.S.3.8....................A...........................>..Gd-.;.A..MQ..L.8.K.B.3.T.C.1.B.5.0. .3. . . . . . . . ......AMBOAMNO........g.A.S.U.S. . . . .D.R.W.-.2.2.B.3.L.........................rN.D+..,.\...........8..Gd-.;.A..MQ..L.A.S.U.S. . . . .D.R.W.-.2.2.B.3.L......AMBO
Boot0009* ubuntu	HD(1,GPT,9dc874be-9ef6-4e13-cc09-cb5f2feabf46,0x800,0x32fcd)/File(EFI\Ubuntu\grubx64.efi)

728124f6ec8e22fbdbe7034812c81b95   sda1/Boot/bkpbootx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda1/Boot/bootx64.efi
85fa9d77b929ec4231aba29476574eb6   sda1/Boot/fbx64.efi
fa1bf1a7f90a852abe0bdbd089b7f1b0   sda1/Boot/grubx64.efi
469e608783843a701d172242f016c79c   sda1/Boot/mmx64.efi
fa1bf1a7f90a852abe0bdbd089b7f1b0   sda1/ubuntu/grubx64.efi
469e608783843a701d172242f016c79c   sda1/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95   sda1/ubuntu/shimx64.efi
8fda2a56aff1746c1f368d62b5b207de   sda1/Microsoft/Boot/bootmgfw.efi
6bef967eb485059dd8263a7c7f416e4b   sda1/Microsoft/Boot/bootmgr.efi
a45be5e890a5f38f61c05a8bb68fb341   sdb1/ubuntu/grubx64.efi
6e94c3d33194c89bd327bfaa5871e294   sdb1/ubuntu/shimx64.efi
728124f6ec8e22fbdbe7034812c81b95   sdb3/ubuntu/shimx64.efi


============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda	: is-GPT,	no-BIOSboot,	has---ESP, 	not-usb,	not-mmc, has-os,	2048 sectors * 512 bytes
sdc	: notGPT,	no-BIOSboot,	has-noESP, 	not-usb,	not-mmc, no-os,	2048 sectors * 512 bytes
sdb	: is-GPT,	no-BIOSboot,	has-noESP, 	not-usb,	not-mmc, no-os,	63 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

sda10	: is-os,	64, apt-get,	signed grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sdc1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	not-far
sda3	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda4	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda5	: is-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda6	: is-os,	64, apt-get,	grub-pc ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sda7	: is-os,	64, apt-get,	signed grub-efi ,	grub2,	grub-install,	grubenv-ok,	update-grub,	farbios
sda8	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sda9	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sdb1	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios
sdb3	: no-os,	32, nopakmgr,	no-docgrub,	nogrub,	nogrubinstall,	no-grubenv,	noupdategrub,	farbios

Partitions info (2/3): _________________________________________________________

sda10	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sdc1	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda1	: is---ESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda3	: isnotESP,	part-has-no-fstab,	ntldr,	haswinload,	no-recov-nor-hid,	bootmgr,	is-winboot
sda4	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	recovery-or-hidden,	no-bmgr,	notwinboot
sda5	: isnotESP,	part-has-no-fstab,	ntldr,	haswinload,	no-recov-nor-hid,	bootmgr,	is-winboot
sda6	: isnotESP,	fstab-without-efi,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda7	: isnotESP,	fstab-has-goodEFI,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda8	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sda9	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sdb1	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot
sdb3	: isnotESP,	part-has-no-fstab,	no-nt,	no-winload,	no-recov-nor-hid,	no-bmgr,	notwinboot

Partitions info (3/3): _________________________________________________________

sda10	: not-sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	customized,	sda
sdc1	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sdc
sda1	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sda3	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sda4	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sda5	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sda6	: not-sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	std-grub.d,	sda
sda7	: not-sepboot,	with-boot,	fstab-without-boot,	not-sep-usr,	with--usr,	fstab-without-usr,	customized,	sda
sda8	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sda9	: maybesepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sda
sdb1	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sdb
sdb3	: not-sepboot,	no-boot,	part-has-no-fstab,	not-sep-usr,	no---usr,	part-has-no-fstab,	std-grub.d,	sdb

fdisk -l (filtered): ___________________________________________________________

Disk sdc: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk identifier: 0xe77190db
      Boot Start        End    Sectors  Size Id Type
sdc1        2176 3907029103 3907026928  1.8T  7 HPFS/NTFS/exFAT
Disk sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 7C9703EA-3F0E-4BE1-35AD-0D11DA3EEBEC
           Start        End   Sectors   Size Type
sda1        2048     210892    208845   102M EFI System
sda2      212992     245759     32768    16M Microsoft reserved
sda3      245760  270716927 270471168   129G Microsoft basic data
sda4   270716928  271831039   1114112   544M Windows recovery environment
sda5   271831040  482566143 210735104 100.5G Microsoft basic data
sda6   482566144  791470079 308903936 147.3G Linux filesystem
sda7   791470080 1221408353 429938274   205G Linux filesystem
sda8  1221410816 1324494847 103084032  49.2G Microsoft basic data
sda9  1324494848 1635235839 310740992 148.2G Linux filesystem
sda10 1644617728 1953519615 308901888 147.3G Linux filesystem
Disk sdb: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk identifier: F6E634F8-2490-482B-AD8A-DBD6373AC47C
          Start        End    Sectors   Size Type
sdb1         63  409591807  409591745 195.3G Microsoft basic data
sdb2  409591808  426369023   16777216     8G Microsoft basic data
sdb3  426369024 7814033407 7387664384   3.5T Microsoft basic data

parted -lm (filtered): _________________________________________________________

sda:1000GB:scsi:512:4096:gpt:ATA CT1000MX500SSD1:;
1:1049kB:108MB:107MB:fat32:Basic data partition:boot, esp;
2:109MB:126MB:16.8MB::Basic data partition:msftres;
3:126MB:139GB:138GB:ntfs:Basic data partition:msftdata;
4:139GB:139GB:570MB:ntfs:Basic data partition:hidden, diag;
5:139GB:247GB:108GB:ntfs:Basic data partition:msftdata;
6:247GB:405GB:158GB:ext4:Basic data partition:;
7:405GB:625GB:220GB:ext4:Basic data partition:;
8:625GB:678GB:52.8GB:ntfs:Basic data partition:msftdata;
9:678GB:837GB:159GB:ext4:Basic data partition:;
10:842GB:1000GB:158GB:ext4:Basic data partition:;
sdb:4001GB:scsi:512:4096:gpt:ATA WDC WD4003FRYZ-0:;
1:32.3kB:210GB:210GB:ntfs:Basic data partition:msftdata;
2:210GB:218GB:8590MB:linux-swap(v1):Basic data partition:msftdata;
3:218GB:4001GB:3782GB:ntfs:Basic data partition:msftdata;
sdc:2000GB:scsi:512:4096:msdos:ATA ST2000DM001-1CH1:;
1:1114kB:2000GB:2000GB:ntfs::;

blkid (filtered): ______________________________________________________________

NAME    FSTYPE   UUID                                 PARTUUID                             LABEL        PARTLABEL
sda                                                                                                     
├─sda1  vfat     B856-14BC                            9dc874be-9ef6-4e13-cc09-cb5f2feabf46              Basic data partition
├─sda2                                                28b9404f-1cc0-496e-e64c-e6122bd0c525              Basic data partition
├─sda3  ntfs     32041EC6041E8CCB                     741853f1-5ab3-41f9-f87a-27607a12412a Windows 10   Basic data partition
├─sda4  ntfs     7C58B41458B3CB62                     8883a427-56a8-45e9-0f3d-a933759acec2              Basic data partition
├─sda5  ntfs     32041EC6041E8CCB                     7d1c530a-a317-45bf-6f08-93cc56a4a75e Windows 7    Basic data partition
├─sda6  ext4     d3b05b86-8e5c-4a51-8f84-a895b1b270e0 bb8b185c-e812-455a-47e4-b1d5f321047f Ubuntu2      Basic data partition
├─sda7  ext4     38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe f5d598f7-e955-4efe-1ad2-45e93ffabc43 Ubuntu       Basic data partition
├─sda8  ntfs     54389D64389D45C0                     dbdb8219-012d-468a-5676-8fa68955db4a Sauvegarde   Basic data partition
├─sda9  ext4     6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 ef2187b9-c18b-4b9c-4c1f-fefd99837429 Sauve Ubuntu Basic data partition
└─sda10 ext4     7ccae5b6-356f-404a-a675-80c410b5127a d1c4898c-5700-4245-77c7-16e8564cab98 Ubuntu3      Basic data partition
sdb                                                                                                     
├─sdb1  ntfs     547DEDAA662F04DD                     db09f672-d8a1-493d-f2ff-f096eca6e904              Basic data partition
├─sdb2  swap     ceac2dbb-995a-47aa-b607-6704b8d0e75b ea1b6ff2-e1c8-4dbe-6884-1e2297a2814a              Basic data partition
└─sdb3  ntfs     6FA4FF2D0F65CBCB                     07ababbc-002c-4b6f-f6ca-481640efb717              Basic data partition
sdc                                                                                                     
└─sdc1  ntfs     06BC4B74BC4B5D75                     e77190db-01                          Disque local 

df (filtered): _________________________________________________________________

                   Avail Use% Mounted on
sda10              85.8G  36% /
sda3               60.8G  53% /mnt/boot-sav/sda3
sda4               88.4M  84% /mnt/boot-sav/sda4
sda5               30.3G  70% /mnt/boot-sav/sda5
sda6               85.8G  36% /mnt/boot-sav/sda6
sda7                 93G  49% /mnt/38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
sda8               34.3G  30% /mnt/boot-sav/sda8
sda9               82.8G  38% /mnt/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92
sdb1              168.1G  14% /mnt/01D57C460BFD1CF0
sdb3                1.7T  51% /mnt/7EA009AAA00969CB
sdc1              509.9G  73% /mnt/boot-sav/sdc1

Mount options: __________________________________________________________________

sda10             rw,relatime,errors=remount-ro
sda3              rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda4              rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda5              rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda6              rw,relatime
sda7              rw,nosuid,nodev,relatime
sda8              rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda9              rw,nosuid,nodev,relatime
sdb1              rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdb3              rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdc1              rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096

===================== sda1/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid 7ccae5b6-356f-404a-a675-80c410b5127a root hd0,gpt10 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

=========================== sda3/boot.ini (filtered) ===========================

; This boot.ini was automatically generated by NeoSmart Technologies' BootGrabber.exe
; Use EasyBCD from http://neosmart.net/dl.php?id=1 to manage your bootloader

[boot loader]
timeout=15
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP on G:\" /fastdetect

=========================== sda5/boot.ini (filtered) ===========================

; This boot.ini was automatically generated by NeoSmart Technologies' BootGrabber.exe
; Use EasyBCD from http://neosmart.net/dl.php?id=1 to manage your bootloader

[boot loader]
timeout=15
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP on G:\" /fastdetect

====================== sda6/boot/grub/grub.cfg (filtered) ======================

Ubuntu   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-37-generic   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Windows Boot Manager (sur sda3)   osprober-efi-B856-14BC
Ubuntu 18.04.6 LTS (18.04) (sur sda6)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu (sur sda6)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-161-generic (sur sda6)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-156-generic (sur sda6)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-154-generic (sur sda6)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
### END /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_uefi-firmware ###

========================== sda6/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb4 during installation
UUID=d3b05b86-8e5c-4a51-8f84-a895b1b270e0 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda1 during installation
UUID=ceac2dbb-995a-47aa-b607-6704b8d0e75b none            swap    sw              0       0
/dev/disk/by-uuid/547DEDAA662F04DD /mnt/01D57C460BFD1CF0 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/6FA4FF2D0F65CBCB /mnt/7EA009AAA00969CB auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe /mnt/38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 /mnt/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 auto nosuid,nodev,nofail,x-gvfs-show 0 0

======================= sda6/etc/default/grub (filtered) =======================

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=""

==================== sda6: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
 256,234828949 = 275,130052608  boot/grub/grub.cfg                             1
 252,239734650 = 270,840352768  boot/grub/i386-pc/core.img                     1
 250,832027435 = 269,328838656  boot/vmlinuz                                   2
 274,614902496 = 294,865506304  boot/vmlinuz-5.11.0-37-generic                 1
 250,832027435 = 269,328838656  boot/vmlinuz-5.11.0-38-generic                 2
 274,614902496 = 294,865506304  boot/vmlinuz.old                               1
 268,019527435 = 287,783776256  boot/initrd.img                                4
 266,068096161 = 285,688442880  boot/initrd.img-5.11.0-37-generic              7
 268,019527435 = 287,783776256  boot/initrd.img-5.11.0-38-generic              4
 267,972652435 = 287,733444608  boot/initrd.img-5.11.0-38-generic.old-dkms     4
 266,068096161 = 285,688442880  boot/initrd.img.old                            7

===================== sda6: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root 18151 août  12 11:18 10_linux
-rwxr-xr-x 1 root root 42359 janv. 13  2021 10_linux_zfs
-rwxr-xr-x 1 root root 12894 juil. 31  2020 20_linux_xen
-rwxr-xr-x 1 root root 12059 juil. 31  2020 30_os-prober
-rwxr-xr-x 1 root root  1424 juil. 31  2020 30_uefi-firmware
-rwxr-xr-x 1 root root   214 juil. 31  2020 40_custom
-rwxr-xr-x 1 root root   216 juil. 31  2020 41_custom

====================== sda7/boot/grub/grub.cfg (filtered) ======================

Ubuntu   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu 20.04.3 LTS (20.04) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Windows Boot Manager (sur sda1)   osprober-efi-B856-14BC
Ubuntu 20.04.3 LTS (20.04) (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
### END /etc/grub.d/30_os-prober_proxy ###
Ubuntu, avec Linux 4.15.0-161-generic   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-156-generic   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu 20.04.3 LTS (20.04) (sur sda6) (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-38-generic (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-37-generic (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda6) (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-38-generic (sur sda6) (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-37-generic (sur sda6) (sur sda10)   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu 20.04.3 LTS (20.04) (sur sda10) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu 20.04.3 LTS (20.04) (sur sda6) (sur sda10) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu (sur sda6) (sur sda10) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic (sur sda6) (sur sda10) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-37-generic (sur sda6) (sur sda10) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-37-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0

========================== sda7/etc/fstab (filtered) ===========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdc1 during installation
UUID=38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe /               ext4    errors=remount-ro 0       1
/dev/disk/by-uuid/6FA4FF2D0F65CBCB /mnt/7EA009AAA00969CB auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/547DEDAA662F04DD /mnt/01D57C460BFD1CF0 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/ceac2dbb-995a-47aa-b607-6704b8d0e75b none swap sw 0 0
/dev/disk/by-uuid/B856-14BC /mnt/B856-14BC auto nosuid,nodev,nofail 0 0
UUID=B856-14BC	/boot/efi	vfat	defaults	0	1
/dev/disk/by-uuid/54389D64389D45C0 /mnt/54389D64389D45C0 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 /mnt/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 auto nosuid,nodev,nofail,x-gvfs-show 0 0

======================= sda7/etc/default/grub (filtered) =======================

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=""
GRUB_GFXMODE="1024x768"
GRUB_THEME="/boot/grub/themes/Grau/theme.txt"

==================== sda7: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
 485,529140472 = 521,332944896  boot/grub/grub.cfg                             1
 461,320819855 = 495,339458560  boot/vmlinuz-4.15.0-156-generic                5
 466,666526794 = 501,079367680  boot/vmlinuz-4.15.0-161-generic                5
 466,666526794 = 501,079367680  vmlinuz                                        5
 461,320819855 = 495,339458560  vmlinuz.old                                    5
 485,714756012 = 521,532248064  boot/initrd.img-4.15.0-156-generic             2
 485,683506012 = 521,498693632  boot/initrd.img-4.15.0-156-generic.old-dkms    2
 485,902259827 = 521,733578752  boot/initrd.img-4.15.0-161-generic             1
 485,863197327 = 521,691635712  boot/initrd.img-4.15.0-161-generic.old-dkms    1
 485,902259827 = 521,733578752  initrd.img                                     1
 485,714756012 = 521,532248064  initrd.img.old                                 2

===================== sda7: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root   710 nov.   4 15:36 10_linux_proxy
-rwxr-xr-x 1 root root  4955 nov.   4 15:36 30_os-prober_proxy
-rwxr-xr-x 1 root root   710 nov.   4 15:36 31_linux_proxy
-rwxr-xr-x 1 root root 11298 févr. 24  2021 34_linux_xen
-rwxr-xr-x 1 root root   369 nov.   4 15:36 35_custom_proxy
-rwxr-xr-x 1 root root  4955 nov.   4 15:36 36_os-prober_proxy
-rwxr-xr-x 1 root root  4955 nov.   4 15:36 37_os-prober_proxy
-rwxr-xr-x 1 root root  1418 févr. 24  2021 38_uefi-firmware
-rwxr-xr-x 1 root root   214 févr. 24  2021 40_custom
-rwxr-xr-x 1 root root   216 févr. 24  2021 41_custom
drwxr-xr-x 4 root root  4096 oct.  26 20:37 backup
drwxr-xr-x 2 root root  4096 oct.  26 20:37 bin
drwxr-xr-x 2 root root  4096 nov.   4 15:36 proxifiedScripts

======================== sda7/etc/grub.d/31_linux_proxy ========================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/linux' | /etc/grub.d/bin/grubcfg_proxy "-*
-#text
-'Ubuntu'~26b50f8a3f19a09a8e207955f51a82ec~
+'SUBMENU' as 'Options avancées pour Ubuntu'{+'Options avancées pour Ubuntu'/*, +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 4.15.0-161-generic'~9779c0ce0dca7370ac091d20e72c66f9~, +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 4.15.0-161-generic (recovery mode)'~d0ada20885a0d38e50b2cc1b8357b4a3~, +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 4.15.0-156-generic'~683f3335e9b111301301236a8a29890f~, +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 4.15.0-156-generic (recovery mode)'~f2d60cb3620750e5c7db3d4f0702e562~}
"

========================= sda7/etc/grub.d/34_linux_xen =========================

#! /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"
. "$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
# 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_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
    || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
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 ()
{
  os="$1"
  version="$2"
  xen_version="$3"
  type="$4"
  args="$5"
  xen_args="$6"
  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
	multiboot	${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
	echo	'$(echo "$lmessage" | grub_quote)'
	module	${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 ...")"
    sed "s/^/$submenu_indentation/" << EOF
	echo	'$(echo "$message" | grub_quote)'
	module	--nounzip   ${rel_dirname}/${initrd}
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_sym () {
    case "$1" in
	*/xen-syms-*)
	    return 1;;
	*)
	    return 0;;
    esac
}
xen_list=
for i in /boot/xen*; do
    if grub_file_is_not_garbage "$i" && file_is_not_sym "$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
    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=
	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="$i"
		break
	    fi
	done
	if test -n "${initrd}" ; then
	    gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
	else
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
	    linux_root_device_thisversion=${GRUB_DEVICE}
	fi
	if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; 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"

======================= sda7/etc/grub.d/35_custom_proxy ========================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "+*
+#text
-'Windows UEFI bootmgfw.efi'~3c21ff564e9f7e184f72a74d2c4945d4~
-'Windows Boot UEFI loader'~f0da49c7b63e6e600cee227a620b3caf~
-'Windows Boot UEFI fbx64.efi'~8fcc4c10d47c95e7362efefeffdf7e9d~
-'EFI/ubuntu/mmx64.efi'~7201845a0688db1255aad2cfbc3bff59~
"

====================== sda7/etc/grub.d/36_os-prober_proxy ======================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "-*
-'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'~1fc812b728cea25717e2c18abdd27e36~
+'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'{+'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/*, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu (sur /dev/sda10)'~2b30e37c2a1ecaba34e77c6ce84c3827~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda10)'~2b30e37c2a1ecaba34e77c6ce84c3827~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda10)'~4647332c96a4adc55dc1a20633d2c7ff~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda10)'~ed9bd49462d201d7049e7287177b1203~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda10)'~916b64333d310c5f34a2e04e57a163e1~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10)'~eba3b3e0a6f58ba3b96fa9a3c02047a5~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6) (sur /dev/sda10)'~87319e2dcf72e6737b1d002f57a76d3a~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10)'~eab6063d54e9f86b3668d2618258a3c4~}
+#text
-'Windows Boot Manager (sur /dev/sda1)'~b70a83b46850c1b0da7f32e189226d58~
-'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'~6bc2f13a0e3fca8a54cfbc3512935e2e~
-'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'{-'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/*, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~ as 'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~ as 'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~ as 'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~}
"

====================== sda7/etc/grub.d/37_os-prober_proxy ======================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "-*
-'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'~1fc812b728cea25717e2c18abdd27e36~
-'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'{-'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/*, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu (sur /dev/sda10)'~2b30e37c2a1ecaba34e77c6ce84c3827~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda10)'~2b30e37c2a1ecaba34e77c6ce84c3827~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda10)'~4647332c96a4adc55dc1a20633d2c7ff~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda10)'~ed9bd49462d201d7049e7287177b1203~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda10)'~916b64333d310c5f34a2e04e57a163e1~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6) (sur /dev/sda10)'~281113910126abe369179693c085238b~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10)'~eba3b3e0a6f58ba3b96fa9a3c02047a5~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6) (sur /dev/sda10)'~87319e2dcf72e6737b1d002f57a76d3a~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10)'~eab6063d54e9f86b3668d2618258a3c4~}
-#text
-'Windows Boot Manager (sur /dev/sda1)'~b70a83b46850c1b0da7f32e189226d58~
-'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'~6bc2f13a0e3fca8a54cfbc3512935e2e~
+'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'{+'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/*, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~ as 'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~ as 'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~ as 'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~ as 'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6) (sur /dev/sda10) (sur /dev/sda6)', +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~}
"

======================= sda7/etc/grub.d/38_uefi-firmware =======================

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2012  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"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
. "${datarootdir}/grub/grub-mkconfig_lib"
efi_vars_dir=/sys/firmware/efi/vars
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
if [ -e "$OsIndications" ] && \
   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
  LABEL="System setup"
  gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
  onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
  cat << EOF
menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
	fwsetup
}
EOF
fi

===================== sda10/boot/grub/grub.cfg (filtered) ======================

Ubuntu 18.04.6 LTS (18.04) (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
### END /etc/grub.d/30_os-prober_proxy ###
Windows Boot Manager (sur sda1)   osprober-efi-B856-14BC
Ubuntu 20.04.3 LTS (20.04) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu3   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-37-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-37-generic   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-161-generic (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-156-generic (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe

========================== sda10/etc/fstab (filtered) ==========================

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb4 during installation
UUID=7ccae5b6-356f-404a-a675-80c410b5127a /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda1 during installation
UUID=ceac2dbb-995a-47aa-b607-6704b8d0e75b none            swap    sw              0       0
/dev/disk/by-uuid/547DEDAA662F04DD /mnt/01D57C460BFD1CF0 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/6FA4FF2D0F65CBCB /mnt/7EA009AAA00969CB auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe /mnt/38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 /mnt/6d7ab604-fd1c-41e2-87b6-3fc3b3949e92 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=B856-14BC  /boot/efi       vfat    defaults      0       1

====================== sda10/etc/default/grub (filtered) =======================

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=""

=================== sda10: Location of files loaded by Grub ====================

           GiB - GB             File                                 Fragment(s)
 822,580448151 = 883,239030784  boot/grub/grub.cfg                             3
 804,941402435 = 864,299249664  boot/vmlinuz                                   2
 828,724277496 = 889,835917312  boot/vmlinuz-5.11.0-37-generic                 1
 804,941402435 = 864,299249664  boot/vmlinuz-5.11.0-38-generic                 2
 828,724277496 = 889,835917312  boot/vmlinuz.old                               1
 846,105613708 = 908,498984960  boot/initrd.img                                4
 846,144527435 = 908,540768256  boot/initrd.img-5.11.0-37-generic              4
 846,105613708 = 908,498984960  boot/initrd.img-5.11.0-38-generic              4
 823,545494080 = 884,275240960  boot/initrd.img-5.11.0-38-generic.old-dkms     2
 846,144527435 = 908,540768256  boot/initrd.img.old                            4

===================== sda10: ls -l /etc/grub.d/ (filtered) =====================

-rwxr-xr-x 1 root root   706 nov.   4 16:12 10_linux_proxy
-rwxr-xr-x 1 root root  2263 nov.   4 16:12 30_os-prober_proxy
-rwxr-xr-x 1 root root 42359 août  12 11:18 31_linux_zfs
-rwxr-xr-x 1 root root 12894 août  12 11:18 32_linux_xen
-rwxr-xr-x 1 root root  2264 nov.   4 16:12 33_os-prober_proxy
-rwxr-xr-x 1 root root   719 nov.   4 16:12 34_linux_proxy
-rwxr-xr-x 1 root root  3300 nov.   4 16:12 35_os-prober_proxy
-rwxr-xr-x 1 root root  1424 août  12 11:18 36_uefi-firmware
-rwxr-xr-x 1 root root   214 août  12 11:18 40_custom
-rwxr-xr-x 1 root root   216 août  12 11:18 41_custom
drwxr-xr-x 4 root root  4096 nov.   4 16:11 backup
drwxr-xr-x 2 root root  4096 nov.   4 16:11 bin
drwxr-xr-x 2 root root  4096 nov.   4 16:12 proxifiedScripts

======================== sda10/etc/grub.d/31_linux_zfs =========================

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2019 Canonical Ltd.
#
# 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"
datarootdir="/usr/share"
ubuntu_recovery="1"
quiet_boot="1"
quick_boot="1"
gfxpayload_dynamic="1"
vt_handoff="1"
. "${pkgdatadir}/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
set -u
## Skip early if zfs utils isn't installed (instead of failing on first zpool list)
if ! `which zfs >/dev/null 2>&1`; then
    exit 0
fi
imported_pools=""
MNTDIR="$(mktemp -d ${TMPDIR:-/tmp}/zfsmnt.XXXXXX)"
ZFSTMP="$(mktemp -d ${TMPDIR:-/tmp}/zfstmp.XXXXXX)"
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
RC=0
on_exit() {
    # Restore initial zpool import state
    for pool in ${imported_pools}; do
        zpool export "${pool}"
    done
    mountpoint -q "${MNTDIR}"  && umount "${MNTDIR}" || true
    rmdir "${MNTDIR}"
    rm -rf "${ZFSTMP}"
    exit "${RC}"
}
trap on_exit EXIT INT QUIT ABRT PIPE TERM
# List ONLINE and DEGRADED pools
import_pools() {
    # We have to ignore zpool import output, as potentially multiple / will be available,
    # and we need to autodetect all zpools this way with their real mountpoints.
    local initial_pools="$(zpool list | awk '{if (NR>1) print $1}')"
    local all_pools=""
    local imported_pools=""
    local err=""
    set +e
    err="$(zpool import -f -a -o cachefile=none -o readonly=on -N 2>&1)"
    # Only print stderr if the command returned an error
    # (it can echo "No zpool to import" with success, which we don't want)
    if [ $? -ne 0 ]; then
        echo "Some pools couldn't be imported and will be ignored:\n${err}" >&2
    fi
    set -e
    all_pools="$(zpool list | awk '{if (NR>1) print $1}')"
    for pool in ${all_pools}; do
        if echo "${initial_pools}" | grep -wq "${pool}"; then
            continue
        fi
        imported_pools="${imported_pools} ${pool}"
    done
    echo "${imported_pools}"
}
# List all the dataset with a root mountpoint
get_root_datasets() {
    local pools="$(zpool list | awk '{if (NR>1) print $1}')"
    for p in ${pools}; do
        local rel_pool_root=$(zpool get -H altroot ${p} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root="/"
        fi
        zfs list -H -o name,canmount,mountpoint -t filesystem | grep -E '^'"${p}"'(\s|/[[:print:]]*\s)(on|noauto)\s'"${rel_pool_root}"'$' | awk '{print $1}'
    done
}
# find if given datasets can be mounted for directory and return its path (snapshot or real path)
# $1 is our current dataset name
# $2 directory path we look for (cannot contains /)
# $3 is the temporary mount directory to use
# $4 is the optional snapshot name
# return path for directory (which can be a mountpoint)
validate_system_dataset() {
    local dataset="$1"
    local directory="$2"
    local mntdir="$3"
    local snapshot_name="$4"
    local mount_path="${mntdir}/${directory}"
    if ! zfs list "${dataset}" >/dev/null 2>&1; then
        return
    fi
    if ! mount -o noatime,zfsutil -t zfs "${dataset}" "${mount_path}"; then
        grub_warn "Failed to find a valid directory '${directory}' for dataset '${dataset}@${snapshot_name}'. Ignoring"
        return
    fi
    local candidate_path="${mount_path}"
    if [ -n "${snapshot_name}" ]; then
        # WORKAROUND a bug https://github.com/zfsonlinux/zfs/issues/9958
        # Reading the content of a snapshot fails if it is not the first mount
        # for a given dataset
        first_mntdir=$(awk '{if ($1 == "'${dataset}'") {print $2; exit;}}' /proc/mounts)
        if [ "${first_mntdir}" = "/" ]; then
            # prevents // on candidate_path
            first_mntdir=""
        fi
        candidate_path="${first_mntdir}/.zfs/snapshot/${snapshot_name}"
    fi
    if [ -n "$(ls ${candidate_path} 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    else
        mountpoint -q "${mount_path}" && umount "${mount_path}" || true
    fi
}
# Detect system directory relevant to the other, trying to find the ones associated on the current dataset or snapshot/
# System directory should be at most a direct child dataset of main datasets (no recursivity)
# We can fallback trying other zfs pools if no match has been found.
# $1 is our current dataset name (which can have @snapshot name)
# $2 directory path we look for (cannot contains /)
# $3 restrict_to_same_pool (true|false) force looking for dataset with the same basename in the current dataset pool only
# $4 is the temporary mount directory to use
# $5 is the optional etc directory (if not $2 is not etc itself)
# return path for directory (which can be a mountpoint)
get_system_directory() {
    local dataset_path="$1"
    local directory="$2"
    local restrict_to_same_pool="$3"
    local mntdir="$4"
    local etc_dir="$5"
    if [ -z "${etc_dir}" ]; then
        etc_dir="${mntdir}/etc"
    fi
    local candidate_path="${mntdir}/${directory}"
    # 1. Look for /etc/fstab first (which will mount even on top of non empty $directory)
    local mounted_fstab_entry="false"
    if [ -f "${etc_dir}/fstab" ]; then
        mount_args=$(awk '/^[^#].*[ \t]\/'"${directory}"'[ \t]/ {print "-t", $3, $1}' "${etc_dir}/fstab")
        if [ -n "${mount_args}" ]; then
            mounted_fstab_entry="true"
            mount -o noatime ${mount_args} "${candidate_path}" || mounted_fstab_entry="false"
        fi
    fi
    # If directory isn't empty. Only count if coming from /etc/fstab. Will be
    # handled below otherwise as we are interested in potential snapshots.
    if [ "${mounted_fstab_entry}" = "true" -a -n "$(ls ${candidate_path} 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2. Handle zfs case, which can be a snapshots.
    local base_dataset_path="${dataset_path}"
    local snapshot_name=""
    # For snapshots we extract the parent dataset
    if echo "${dataset_path}" | grep -q '@'; then
        base_dataset_path=$(echo "${dataset_path}" | cut -d '@' -f1)
        snapshot_name=$(echo "${dataset_path}" | cut -d '@' -f2)
    fi
    base_dataset_name="${base_dataset_path##*/}"
    base_pool="$(echo "${base_dataset_path}" | cut -d'/' -f1)"
    # 2.a) Look for child dataset included in base dataset, which needs to hold same snapshot if any
    candidate_path=$(validate_system_dataset "${base_dataset_path}/${directory}" "${directory}" "${mntdir}" "${snapshot_name}")
    if [ -n "${candidate_path}" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2.b) Look for current dataset (which is already mounted as /)
    candidate_path="${mntdir}/${directory}"
    if [ -n "${snapshot_name}" ]; then
        # WORKAROUND a bug https://github.com/zfsonlinux/zfs/issues/9958
        # Reading the content of a snapshot fails if it is not the first mount
        # for a given dataset
        first_mntdir=$(awk '{if ($1 == "'${base_dataset_path}'") {print $2; exit;}}' /proc/mounts)
        if [ "${first_mntdir}" = "/" ]; then
            # prevents // on candidate_path
            first_mntdir=""
        fi
        candidate_path="${first_mntdir}/.zfs/snapshot/${snapshot_name}/${directory}"
    fi
    if [ -n "$(ls ${candidate_path} 2>/dev/null)" ]; then
        echo "${candidate_path}"
        return
    fi
    # 2.c) Look for every datasets in every pool which isn't the current dataset which holds:
    # - the same dataset name (last section) than our base_dataset_name
    # - mountpoint=directory
    # - canmount!=off
    all_same_base_dataset_name="$(zfs list -H -t filesystem -o name,canmount | awk '/^[^ ]+\/'"${base_dataset_name}"'[ \t](on|noauto)/ {print $1}') "
    # order by local pool datasets first
    current_pool_same_base_datasets=""
    other_pools_same_base_datasets=""
    root_pool=$(echo "${dataset_path%%/*}")
    for d in ${all_same_base_dataset_name}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        if echo "${cur_dataset_pool}" | grep -wq "${root_pool}" 2>/dev/null ; then
            current_pool_same_base_datasets="${current_pool_same_base_datasets} ${d}"
        else
            other_pools_same_base_datasets="${other_pools_same_base_datasets} ${d}"
        fi
    done
    ordered_same_base_datasets="${current_pool_same_base_datasets} ${other_pools_same_base_datasets}"
    if [ "${restrict_to_same_pool}" = "true" ]; then
        ordered_same_base_datasets="${current_pool_same_base_datasets}"
    fi
    # now, loop over them
    for d in ${ordered_same_base_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        rel_pool_root=$(zpool get -H altroot ${cur_dataset_pool} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root=""
        fi
        # check mountpoint match
        candidate_dataset=$(zfs get -H mountpoint ${d} | grep -E "mountpoint\s${rel_pool_root}/${directory}\s" | awk '{print $1}')
        if [ -z "${candidate_dataset}" ]; then
            continue
        fi
        candidate_path=$(validate_system_dataset "${candidate_dataset}" "${directory}" "${mntdir}" "${snapshot_name}")
        if [ -n "${candidate_path}" ]; then
            echo "${candidate_path}"
            return
        fi
    done
    # 2.d) If we didn't find anything yet: check for persistent datasets corresponding to our mountpoint, with canmount=on without any snapshot associated:
    # Note: we go over previous datasets as well, but this is ok, as we didn't include them before.
    all_mountable_datasets="$(zfs list -t filesystem -o name,canmount | awk  '/^[^ ]+[ \t]+on/ {print $1}')"
    # order by local pool datasets first
    current_pool_datasets=""
    other_pools_datasets=""
    root_pool=$(echo "${dataset_path%%/*}")
    for d in ${all_mountable_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        if echo "${cur_dataset_pool}" | grep -wq "${root_pool}" 2>/dev/null ; then
            current_pool_datasets="${current_pool_datasets} ${d}"
        else
            other_pools_datasets="${other_pools_datasets} ${d}"
        fi
    done
    ordered_datasets="${current_pool_datasets} ${other_pools_datasets}"
    if [ "${restrict_to_same_pool}" = "true" ]; then
        ordered_datasets="${current_pool_datasets}"
    fi
    for d in ${ordered_datasets}; do
        cur_dataset_pool=$(echo "${d%%/*}")
        rel_pool_root=$(zpool get -H altroot ${cur_dataset_pool} | awk '{print $3}')
        if [ "${rel_pool_root}" = "-" ]; then
            rel_pool_root=""
        fi
        # check mountpoint match
        candidate_dataset=$(zfs get -H mountpoint ${d} | grep -E "mountpoint\s${rel_pool_root}/${directory}\s" | awk '{print $1}')
        if [ -z "${candidate_dataset}" ]; then
            continue
        fi
        candidate_path=$(validate_system_dataset "${d}" "${directory}" "${mntdir}" "")
        if [ -n "${candidate_path}" ]; then
            echo "${candidate_path}"
            return
        fi
    done
    grub_warn "Failed to find a valid directory '${directory}' for dataset '${dataset_path}'. Ignoring"
    return
}
# Try our default layout bpool as a prefered layout (fast path)
# This is get_system_directory for boot optimized for our default installation layout
# $1 is our current dataset name (which can have @snapshot name)
# $2 is the temporary mount directory to use
# return path for directory (which can be a mountpoint) if found
try_default_layout_bpool() {
    local root_dataset_path="$1"
    local mntdir="$2"
    dataset_basename="${root_dataset_path##*/}"
    candidate_dataset="bpool/BOOT/${dataset_basename}"
    dataset_properties="$(zfs get -H mountpoint,canmount ${candidate_dataset} | cut -f3 | paste -sd ' ')"
    if [ -z "${dataset_properties}" ]; then
        return
    fi
    rel_pool_root=$(zpool get -H altroot bpool | awk '{print $3}')
    if [ "${rel_pool_root}" = "-" ]; then
        rel_pool_root=""
    fi
    snapshot_name="${dataset_basename##*@}"
    [ "${snapshot_name}" = "${dataset_basename}" ] && snapshot_name=""
    if [ -z "${snapshot_name}" ]; then
        if ! echo "${dataset_properties}" | grep -Eq "${rel_pool_root}/boot (on|noauto)"; then
            return
        fi
    else
        candidate_dataset=$(echo "${candidate_dataset}" | cut -d '@' -f1)
    fi
    validate_system_dataset "${candidate_dataset}" "boot" "${mntdir}" "${snapshot_name}"
}
# Return if secure boot is enabled on that system
is_secure_boot_enabled() {
    if LANG=C mokutil --sb-state 2>/dev/null | grep -qi enabled; then
        echo "true"
        return
    fi
    echo "false"
    return
}
# Given a filesystem or snapshot dataset, returns dataset|machine id|pretty name|last used
# $1 is dataset we want information from
# $2 is the temporary mount directory to use
get_dataset_info() {
    local dataset="$1"
    local mntdir="$2"
    local base_dataset="${dataset}"
    local etc_dir="${mntdir}/etc"
    local is_snapshot="false"
    # For snapshot we extract the parent dataset
    if echo "${dataset}" | grep -q '@'; then
        base_dataset=$(echo "${dataset}" | cut -d '@' -f1)
        is_snapshot="true"
    fi
    mount -o noatime,zfsutil -t zfs "${base_dataset}" "${mntdir}"
    # read machine-id/os-release from /etc
    etc_dir=$(get_system_directory "${dataset}" "etc" "true" "${mntdir}" "")
    if [ -z  "${etc_dir}" ]; then
        grub_warn "Ignoring ${dataset}"
        mountpoint -q "${mntdir}/etc" && umount "${mntdir}/etc" || true
        umount "${mntdir}"
        return
    fi
    machine_id=""
    if [ -f "${etc_dir}/machine-id" ]; then
        machine_id=$(cat "${etc_dir}/machine-id")
    fi
    # We have to use a random temporary id if we don't have any machine-id file or if this one is empty
    # (mostly the case of new installations before first boot).
    # Let's use the dataset name directly for this.
    # Consequence is that all datasets are then separated.
    if [ -z "${machine_id}" ]; then
        machine_id="${dataset}"
    fi
    pretty_name=$(. "${etc_dir}/os-release" && echo "${PRETTY_NAME}")
    mountpoint -q "${mntdir}/etc" && umount "${mntdir}/etc" || true
    # read available kernels from /boot
    boot_dir="$(try_default_layout_bpool "${dataset}" "${mntdir}")"
    if [ -z "${boot_dir}" ]; then
        boot_dir=$(get_system_directory "${dataset}" "boot" "false" "${mntdir}" "${etc_dir}")
    fi
    if [ -z  "${boot_dir}" ]; then
        grub_warn "Ignoring ${dataset}"
        mountpoint -q "${mntdir}/boot" && umount "${mntdir}/boot" || true
        umount "${mntdir}"
        return
    fi
    initrd_list=""
    kernel_list=""
    list=$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')
    while [ "x$list" != "x" ] ; do
        linux=`version_find_latest $list`
        list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
        if ! grub_file_is_not_garbage "${linux}" ; then
            continue
        fi
        # Filters entry if efi/non efi.
        # Note that for now we allow kernel without .efi.signed as those are signed kernel
        # on ubuntu, loaded by the shim.
        case "${linux}" in
            *.efi.signed)
                if [ "$(is_secure_boot_enabled)" = "false" ]; then
                    continue
                fi
            ;;
        esac
        linux_basename=$(basename "${linux}")
        linux_dirname=$(dirname "${linux}")
        version=$(echo "${linux_basename}" | sed -e "s,^[^0-9]*-,,g")
        alt_version=$(echo "${version}" | sed -e "s,\.old$,,g")
        gettext_printf "Found linux image: %s in %s\n" "${linux_basename}" "${dataset}" >&2
        initrd=""
        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 "${linux_dirname}/${i}" ; then
                initrd="$i"
                break
            fi
        done
        if test -z "${initrd}" ; then
            grub_warn "Couldn't find any valid initrd for dataset ${dataset}."
            continue
        fi
        gettext_printf "Found initrd image: %s in %s\n" "${initrd}" "${dataset}" >&2
        rel_linux_dirname=$(make_system_path_relative_to_its_root "${linux_dirname}")
        initrd_list="${initrd_list}|${rel_linux_dirname}/${initrd}"
        kernel_list="${kernel_list}|${rel_linux_dirname}/${linux_basename}"
    done
    initrd_list="${initrd_list#|}"
    kernel_list="${kernel_list#|}"
    initrd_device=$(${grub_probe} --target=device "${boot_dir}" | head -1)
    mountpoint -q "${mntdir}/boot" && umount "${mntdir}/boot" || true
    # We needed to look in / for snapshots on root dataset, umount there before zfs lazily unmount it
    case "${boot_dir}" in /boot/.zfs/snapshot/*)
        umount "${boot_dir}" || true
        ;;
    esac
    # for zsys snapshots: we want to know which kernel we successful last booted with
    last_booted_kernel=$(zfs get -H com.ubuntu.zsys:last-booted-kernel "${dataset}" | awk '{print $3}')
    # snapshot: last_used is dataset creation time
    if [ "${is_snapshot}" = "true" ]; then
        last_used="$(zfs get -pH creation "${dataset}" | awk -F '\t' '{print $3}')"
    # otherwise, last_used is manually marked at boot/shutdown on a root dataset for zsys
    else
        # if current system, take current time
        if zfs mount | awk '/[ \t]+\/$/ {print $1}' | grep -q ${dataset}; then
            last_used=$(date +%s)
        else
            last_used=$(zfs get -H com.ubuntu.zsys:last-used "${dataset}" | awk '{print $3}')
            # case of non zsys, or zsys without annotation, take /etc/machine-id stat (as we mounted with noatime).
            # However, as systems can be relatime, if system is current mounted one, set current time (case of clone + reboot
            # within the same d).
            if [ "${last_used}" = "-" ]; then
                last_used=$(stat --printf="%X" "${mntdir}/etc/os-release")
                if [ -f "${mntdir}/etc/machine-id" ]; then
                    last_used=$(stat --printf="%X" "${mntdir}/etc/machine-id")
                fi
            fi
        fi
    fi
    is_zsys=$(zfs get -H com.ubuntu.zsys:bootfs "${base_dataset}" | awk '{print $3}')
    if [ -n "${initrd_list}" -a -n "${kernel_list}" ]; then
        echo "${dataset}\t${is_zsys}\t${machine_id}\t${pretty_name}\t${last_used}\t${initrd_device}\t${initrd_list}\t${kernel_list}\t${last_booted_kernel}"
    else
        grub_warn "didn't find any valid initrd or kernel."
    fi
    umount "${mntdir}" || true
    # We needed to look in / for snapshots on root dataset, umount the snapshot for etc before zfs lazily unmount it
    case "${etc_dir}" in /.zfs/snapshot/*/etc)
        snapshot_path="$(findmnt -n -o TARGET -T ${etc_dir})"
        umount "${snapshot_path}" || true
        ;;
    esac
}
# Scan available boot options and returns in a formatted list
# $1 is the temporary mount directory to use
bootlist() {
    local mntdir="$1"
    local boot_list=""
    for dataset in $(get_root_datasets); do
        # get information from current root dataset
        boot_list="${boot_list}$(get_dataset_info ${dataset} ${mntdir})\n"
        # get information from snapshots of this root dataset
        for snapshot_dataset in $(zfs list -H -o name -t snapshot "${dataset}"); do
            boot_list="${boot_list}$(get_dataset_info ${snapshot_dataset} ${mntdir})\n"
        done
    done
    echo "${boot_list}"
}
# Order machine ids by last_used from their main entry
get_machines_sorted() {
    local bootlist="$1"
    local machineids="$(echo "${bootlist}" | awk '{print $3}' | sort -u)"
    for machineid in ${machineids}; do
        echo "${bootlist}" | awk 'BEGIN{FS="\t"} $1 !~ /.*@.*/  {print $5, $3}' | sort -nr | grep -E "[^^]\b${machineid}\b" | head -1
    done | sort -nr | awk '{print $2}'
}
# Sort entries by last_used for a given machineid
sort_entries_for_machineid() {
    local bootlist="$1"
    local machineid="$2"
    tab="$(printf '\t')"
    echo "${bootlist}" | grep -E "[^^]\b${machineid}\b" | sort -k5,5r -k1,1 -t "${tab}"
}
# Return main entry index
get_main_entry() {
    local entries="$1"
    echo "${entries}" | awk 'BEGIN{FS="\t"} $1 !~ /.*@.*/  {print}' | head -1
}
# Return specific field at index from entry
get_field_from_entry() {
    local entry="$1"
    local index="$2"
    echo "${entry}" | awk "BEGIN{FS=\"\t\"} {print \$$index}"
}
# Get the main entry metadata
main_entry_meta() {
    local main_entry="$1"
    initrd=$(get_field_from_entry "${main_entry}" 7 | cut -d'|' -f1)
    kernel=$(get_field_from_entry "${main_entry}" 8 | cut -d'|' -f1)
    # Take first element (most recent entry) which is not a snapshot
    echo "${main_entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"} {print \$3, \$2, \"main\", \$4, \$1, \$6, \"$initrd\", \"$kernel\"}"
}
# Get advanced entries metadata
advanced_entries_meta() {
    local main_entry="$1"
    last_used_kernel="$(get_field_from_entry "${main_entry}" 9 )"
    # We must align initrds with kernels.
    # Adds initrds to the stack then pop them 1 by 1 as we process the kernels
    set -- $(get_field_from_entry "${main_entry}" 7 | tr "|" " ")
    for kernel in $(get_field_from_entry "${main_entry}" 8 | tr "|" " "); do
        # get initrd and pop to the next one
        initrd="$1"; shift
        was_last_used_kernel="false"
        kernel_basename=$(basename "${kernel}")
        if [ "${kernel_basename}" = "${last_used_kernel}" ]; then
            was_last_used_kernel="true"
        fi
        echo "${main_entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"}    {print \$3, \$2, \"advanced\", \$4, \$1, \$6, \"$initrd\", \"$kernel\", \"$was_last_used_kernel\"}"
    done
}
# Get history metadata
history_entries_meta() {
    local entries="$1"
    local main_dataset_name="$2"
    local main_dataset_releasename="$3"
    if [ -z "${entries}" ]; then
        return
    fi
    # Traverse snapshots and clones
    echo "${entries}" | while read entry; do
        name=""
        # Compute snapshot/filesystem dataset name
        snap_dataset_name="$(get_field_from_entry "${entry}" 1)"
        snapname="${snap_dataset_name##*@}"
        # If, this is a clone, take what is after main_dataset_name
        if [ "${snapname}" = "${snap_dataset_name}" ]; then
            snapname="${snap_dataset_name##${main_dataset_name}_}"
            # Handle manual user clone (not prefixed by "main_dataset_name")
            snapname="${snapname##*/}"
        fi
        # We keep the snapname only if it is not only a zsys auto snapshot
        if echo "${snapname}" | grep -q "^autozsys_"; then
            snapname=""
        fi
        # We store the release only if it different from main dataset release (snapshot before a release upgrade)
        releasename=$(get_field_from_entry "${entry}" 4)
        if [ "${releasename}" = "${main_dataset_releasename}" ]; then
            releasename=""
        fi
        # Snapshot date
        foo="$(get_field_from_entry "${entry}" 5)"
        snapdate="$(date -d @$(get_field_from_entry "${entry}" 5) "+%x @ %H:%M")"
        # For snapshots/clones the name can have the following formats:
        # 	<DATE>: autozsys, same release
        #   <OLD_RELEASE> on <DATE>: autozsys, different release
        #   <SNAPNAME> on <DATE>: Manual snapshot, same release
        #   <SNAPNAME>, <OLD_RELEASE> on <DATE>: Manual snapshot, different release
        if [ "${snapname}" = "" -a "${releasename}" = "" ]; then
            name="${snapdate}"
        elif [ "${snapname}" = "" -a "${releasename}" != "" ]; then
            name=$(gettext_printf "%s on %s" "${releasename}" "${snapdate}")
        elif [ "${snapname}" != "" -a "${releasename}" = "" ]; then
            name=$(gettext_printf "%s on %s" "${snapname}" "${snapdate}")
        else # snapname != "" && releasename != ""
            name=$(gettext_printf "%s, %s on %s" "${snapname}" "${releasename}" "${snapdate}")
        fi
        # Choose kernel and initrd if the snapshot was booted successfully on a specific kernel before
        # Take latest by default if no match
        initrd=$(get_field_from_entry "${entry}" 7 | cut -d'|' -f1)
        kernel=$(get_field_from_entry "${entry}" 8 | cut -d'|' -f1)
        last_used_kernel="$(get_field_from_entry "${entry}" 9)"
        # We must align initrds with kernels.
        # Adds initrds to the stack then pop them 1 by 1 as we process the kernels
        set -- $(get_field_from_entry "${entry}" 7 | tr "|" " ")
        for k in $(get_field_from_entry "${entry}" 8|tr "|" " "); do
            # get initrd and pop to the next one
            candidate_initrd="$1"; shift
            kernel_basename=$(basename "${k}")
            if [ "${kernel_basename}" = "${last_used_kernel}" ]; then
                kernel="${k}"
                initrd="${candidate_initrd}"
                break
            fi
        done
        echo "${entry}" | awk "BEGIN{ FS=\"\t\"; OFS=\"\t\"}    {print \$3, \$2, \"history\", \"$name\", \$1, \$6, \"$initrd\", \"$kernel\"}"
    done
}
# Generate metadata from a BOOTLIST that will subsequently used to generate
# the final grub menu entries
generate_grub_menu_metadata() {
    local bootlist="$1"
    # Sort machineids by last_used from their main entry
    for machineid in $(get_machines_sorted "${bootlist}"); do
        entries="$(sort_entries_for_machineid "${bootlist}" ${machineid})"
        main_entry="$(get_main_entry "${entries}")"
        if [ -z "$main_entry" ]; then
            continue
        fi
        main_entry_meta "${main_entry}"
        advanced_entries_meta "${main_entry}"
        main_dataset_name="$(get_field_from_entry "${main_entry}" 1)"
        main_dataset_releasename="$(get_field_from_entry "${main_entry}" 4)"
        # grep -v errcode != 0 if there is no match. || true to not fail with -e
        other_entries="$(echo "${entries}" | grep -v "${main_entry}" || true)"
        history_entries_meta "${other_entries}" "${main_dataset_name}" "${main_dataset_releasename}"
    done
}
# Print the configuration part common to all sections
# Note:
#   If 10_linux runs these part will be defined twice in grub configuration
print_menu_prologue() {
    cat << 'EOF'
function gfxmode {
	set gfxpayload="${1}"
EOF
    if [ "${vt_handoff}" = 1 ]; then
        cat << 'EOF'
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=1
	else
		set vt_handoff=
	fi
EOF
    fi
    cat << EOF
}
EOF
    # Use ELILO's generic "efifb" when it's known to be available.
    # FIXME: We need an interface to select vesafb in case efifb can't be used.
    GRUB_GFXPAYLOAD_LINUX="${GRUB_GFXPAYLOAD_LINUX:-}"
    if [ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 0 ]; then
        echo "set linux_gfx_mode=${GRUB_GFXPAYLOAD_LINUX}"
    else
        cat << EOF
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
EOF
    fi
    cat << EOF
export linux_gfx_mode
EOF
}
# Cache for prepare_grub_to_access_device call
# $1: boot_device
# $2: submenu_level
prepare_grub_to_access_device_cached() {
    local boot_device="$1"
    local submenu_level="$2"
    local boot_device_idx="$(echo ${boot_device} | tr '/' '_')"
    cache_file="${ZFSTMP}/$(echo boot_device${boot_device_idx})"
    if [ ! -f "${cache_file}" ]; then
        set +u
        echo "$(prepare_grub_to_access_device "${boot_device}")" > "${cache_file}"
        set -u
        for i in 0 1 2; do
            submenu_indentation="$(printf %${i}s | tr " " "${grub_tab}")"
            sed "s/^/${submenu_indentation}	/" "${cache_file}" > "${cache_file}--${i}"
        done
    fi
    cat "${cache_file}--${submenu_level}"
}
# Print a grub menu entry
zfs_linux_entry () {
    submenu_level="$1"
    title="$2"
    type="$3"
    dataset="$4"
    boot_device="$5"
    initrd="$6"
    kernel="$7"
    kernel_version="$8"
    kernel_additional_args="${9:-}"
    boot_devices="${10:-}"
    submenu_indentation="$(printf %${submenu_level}s | tr " " "${grub_tab}")"
    echo "${submenu_indentation}menuentry '$(echo "${title}" | grub_quote)' ${CLASS} \${menuentry_id_option} 'gnulinux-${dataset}-${kernel_version}' {"
    if [ "${quick_boot}" = 1 ]; then
        echo "${submenu_indentation}	recordfail"
    fi
    if [ "${type}" != "recovery" ] ; then
        GRUB_SAVEDEFAULT=${GRUB_SAVEDEFAULT:-}
        default_entry="$(save_default_entry)"
        if [ -n "${default_entry}" ]; then
            echo "${submenu_indentation}	${default_entry}"
        fi
    fi
    # Use ELILO's generic "efifb" when it's known to be available.
    # FIXME: We need an interface to select vesafb in case efifb can't be used.
    if [ "${GRUB_GFXPAYLOAD_LINUX}" = "" ]; then
        echo "${submenu_indentation}	load_video"
    else
        if [ "${GRUB_GFXPAYLOAD_LINUX}" != "text" ]; then
            echo "${submenu_indentation}	load_video"
        fi
    fi
    if ([ "${ubuntu_recovery}" = 0 ] || [ "${type}" != "recovery" ]) && \
        ([ "${GRUB_GFXPAYLOAD_LINUX}" != "" ] || [ "${gfxpayload_dynamic}" = 1 ]); then
        echo "${submenu_indentation}	gfxmode \${linux_gfx_mode}"
    fi
    echo "${submenu_indentation}	insmod gzio"
    echo "${submenu_indentation}	if [ \"\${grub_platform}\" = xen ]; then insmod xzio; insmod lzopio; fi"
    if [ -n "$boot_devices" ]; then
        for device in ${boot_devices}; do
            echo "${submenu_indentation}	if [ "${boot_device}" = "${device}" ]; then"
            echo "$(prepare_grub_to_access_device_cached "${device}" $(( submenu_level +1 )) )"
            echo "${submenu_indentation}	fi"
        done
    else
        echo "$(prepare_grub_to_access_device_cached "${boot_device}" "${submenu_level}")"
    fi
    if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
        echo "${submenu_indentation}	echo $(gettext_printf "Loading Linux %s ..." ${kernel_version} | grub_quote)"
    fi
    linux_default_args="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
    if [ ${type} = "recovery" ]; then
        linux_default_args="${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
    fi
    echo "${submenu_indentation}	linux	${kernel} root=ZFS=${dataset} ro ${linux_default_args} ${kernel_additional_args}"
    if [ "${quiet_boot}" = 0 ] || [ "${type}" != simple ]; then
        echo "${submenu_indentation}	echo '$(gettext_printf "Loading initial ramdisk ..." | grub_quote)'"
    fi
    echo "${submenu_indentation}	initrd	${initrd}"
    echo "${submenu_indentation}}"
}
# Generate a GRUB Menu from menu meta data
# $1 menu metadata
generate_grub_menu() {
    local menu_metadata="$1"
    local last_section=""
    local main_dataset_name=""
    local main_dataset=""
    local have_zsys=""
    if [ -z "${menu_metadata}" ]; then
        return
    fi
    CLASS="--class gnu-linux --class gnu --class os"
    if [ "${GRUB_DISTRIBUTOR}" = "" ] ; then
        OS=GNU/Linux
    else
        case ${GRUB_DISTRIBUTOR} in
            Ubuntu|Kubuntu)
            OS="${GRUB_DISTRIBUTOR}"
            ;;
            *)
            OS="${GRUB_DISTRIBUTOR} GNU/Linux"
            ;;
        esac
        CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1 | LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
    fi
    if [ -x /lib/recovery-mode/recovery-menu ]; then
        GRUB_CMDLINE_LINUX_RECOVERY=recovery
    else
        GRUB_CMDLINE_LINUX_RECOVERY=single
    fi
    if [ "${ubuntu_recovery}" = 1 ]; then
        GRUB_CMDLINE_LINUX_RECOVERY="${GRUB_CMDLINE_LINUX_RECOVERY} nomodeset"
    fi
    case "$GENKERNEL_ARCH" in
        x86*) GRUB_CMDLINE_LINUX_RECOVERY="$GRUB_CMDLINE_LINUX_RECOVERY dis_ucode_ldr";;
    esac
    if [ "${vt_handoff}" = 1 ]; then
        for word in ${GRUB_CMDLINE_LINUX_DEFAULT}; do
            if [ "${word}" = splash ]; then
                GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} \${vt_handoff}"
            fi
        done
    fi
    print_menu_prologue
    cat<<'EOF'
function zsyshistorymenu {
	# $1: root dataset (eg rpool/ROOT/ubuntu_2zhm07@autozsys_k56fr6)
	# $2: boot device id (eg 411f29ce1557bfed)
	# $3: initrd (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/initrd.img-5.4.0-21-generic)
	# $4: kernel (eg /BOOT/ubuntu_2zhm07@autozsys_k56fr6/vmlinuz-5.4.0-21-generic)
	# $5: kernel_version (eg 5.4.0-21-generic)
	set root_dataset="${1}"
	set boot_device="${2}"
	set initrd="${3}"
	set kernel="${4}"
	set kversion="${5}"
EOF
    boot_devices=$(echo "${menu_metadata}" | cut -d"$(printf '\t')" -f6 | sort -u)
    title=$(gettext_printf "Revert system only")
    zfs_linux_entry 1 "${title}" "simple" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' '' "${boot_devices}"
    title="$(gettext_printf "Revert system and user data")"
    zfs_linux_entry 1 "${title}" "simple" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' 'zsys-revert=userdata' "${boot_devices}"
    GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
    if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
        title="$(gettext_printf "Revert system only (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
        zfs_linux_entry 1 "${title}" "recovery" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' '' "${boot_devices}"
        title="$(gettext_printf "Revert system and user data (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
        zfs_linux_entry 1 "${title}" "recovery" '${root_dataset}' '${boot_device}' '${initrd}' '${kernel}' '${kversion}' 'zsys-revert=userdata' "${boot_devices}"
    fi
echo "}"
echo
    # IFS is set to TAB (ASCII 0x09)
    echo "${menu_metadata}" |
    {
        at_least_one_entry=0
        have_zsys="$(which zsysd || true)"
        while IFS="$(printf '\t')" read -r machineid iszsys section name dataset device initrd kernel opt; do
            # Disable history for non zsys system or if systems is a zsys one and zsys isn't installed.
            # In pure zfs systems, we identified multiple issues due to the mount generator
            # in upstream zfs which makes it incompatible. Don't show history for now.
            if [ "${section}" = "history" ]; then
                if [ "${iszsys}" != "yes" ] || [ "${iszsys}" = "yes" -a -z "${have_zsys}" ]; then
                    continue
                fi
            fi
            if [ "${last_section}" != "${section}" -a -n "${last_section}" ]; then
                # Close previous section wrapper
                if [ "${last_section}" != "main" ]; then
                    echo "}"    # Add grub_tabs
                    at_least_one_entry=0
                fi
            fi
            case "${section}" in
                main)
                    title="${name}"
                    main_dataset_name="${name}"
                    main_dataset="${dataset}"
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    zfs_linux_entry 0 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    at_least_one_entry=1
                ;;
                advanced)
                    # normal and recovery entries for a given kernel
                    if [ "${last_section}" != "${section}" ]; then
                        echo "submenu '$(gettext_printf "Advanced options for %s" "${main_dataset_name}" | grub_quote)' \${menuentry_id_option} 'gnulinux-advanced-${main_dataset}' {"
                    fi
                    last_booted_kernel_marker=""
                    if [ "${opt}" = "true" ]; then
                        last_booted_kernel_marker="* "
                    fi
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    title="$(gettext_printf "%s%s, with Linux %s" "${last_booted_kernel_marker}" "${name}" "${kernel_version}")"
                    zfs_linux_entry 1 "${title}" "advanced" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    GRUB_DISABLE_RECOVERY=${GRUB_DISABLE_RECOVERY:-}
                    if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
                        title="$(gettext_printf "%s%s, with Linux %s (%s)" "${last_booted_kernel_marker}" "${name}" "${kernel_version}" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
                        zfs_linux_entry 1 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                    fi
                    at_least_one_entry=1
                ;;
                history)
                    # Revert to a snapshot
                    # revert system, revert system and user data and associated recovery entries
                    if [ "${last_section}" != "${section}" ]; then
                        echo "submenu '$(gettext_printf "History for %s" "${main_dataset_name}" | grub_quote)' \${menuentry_id_option} 'gnulinux-history-${main_dataset}' {"
                    fi
                    if [ "${iszsys}" = "yes" ]; then
                        title="$(gettext_printf "Revert to %s" "${name}" | grub_quote)"
                    else
                        title="$(gettext_printf "Boot on %s" "${name}" | grub_quote)"
                    fi
                    echo "	submenu '${title}' \${menuentry_id_option} 'gnulinux-history-${dataset}' {"
                    kernel_version=$(basename "${kernel}" | sed -e "s,^[^0-9]*-,,g")
                    # Zsys only: let revert system without destroying snapshots
                    if [ "${iszsys}" = "yes" ]; then
                        echo "${grub_tab}${grub_tab}zsyshistorymenu" \"${dataset}\" \"${device}\" \"${initrd}\" \"${kernel}\" \"${kernel_version}\"
                    # Non-zsys: boot temporarly on snapshots or rollback (destroying intermediate snapshots)
                    else
                        title="$(gettext_printf "One time boot")"
                        zfs_linux_entry 2 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                        GRUB_DISABLE_RECOVERY="${GRUB_DISABLE_RECOVERY:-}"
                        if [ "${GRUB_DISABLE_RECOVERY}" != "true" ]; then
                            title="$(gettext_printf "One time boot (%s)" "$(gettext "${GRUB_RECOVERY_TITLE}")")"
                            zfs_linux_entry 2 "${title}" "recovery" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}"
                        fi
                        title="$(gettext_printf "Revert system (all intermediate snapshots will be destroyed)")"
                        zfs_linux_entry 2 "${title}" "simple" "${dataset}" "${device}" "${initrd}" "${kernel}" "${kernel_version}" "rollback=yes"
                    fi
                    echo "	}"
                    at_least_one_entry=1
                ;;
                *)
                    grub_warn "unknown section: ${section}. Ignoring entry ${name} for ${dataset}"
                ;;
            esac
            last_section="${section}"
        done
        if [ "${at_least_one_entry}" -eq 1 ]; then
            echo "}"
        fi
    }
}
# don't add trailing newline of variable is empty
# $1: content to write
# $2: destination file
trailing_newline_if_not_empty() {
    content="$1"
    dest="$2"
    if [ -z "${content}" ]; then
        rm -f "${dest}"
        touch "${dest}"
        return
    fi
    echo "${content}" > "${dest}"
}
GRUB_LINUX_ZFS_TEST="${GRUB_LINUX_ZFS_TEST:-}"
case "${GRUB_LINUX_ZFS_TEST}" in
    bootlist)
        # Import all available pools on the system and return imported list
        imported_pools=$(import_pools)
        boot_list="$(bootlist ${MNTDIR})"
        trailing_newline_if_not_empty "${boot_list}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    metamenu)
        boot_list="$(cat ${GRUB_LINUX_ZFS_TEST_INPUT})"
        menu_metadata="$(generate_grub_menu_metadata "${boot_list}")"
        trailing_newline_if_not_empty "${menu_metadata}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    grubmenu)
        menu_metadata="$(cat ${GRUB_LINUX_ZFS_TEST_INPUT})"
        grub_menu=$(generate_grub_menu "${menu_metadata}")
        trailing_newline_if_not_empty "${grub_menu}" "${GRUB_LINUX_ZFS_TEST_OUTPUT}"
        break
    ;;
    *)
        # Import all available pools on the system and return imported list
        imported_pools=$(import_pools)
        # Generate the complete list of boot entries
        boot_list="$(bootlist ${MNTDIR})"
        # Create boot menu meta data from the list of boot entries
        menu_metadata="$(generate_grub_menu_metadata "${boot_list}")"
        # Create boot menu meta data from the list of boot entries
        grub_menu="$(generate_grub_menu "${menu_metadata}")"
        if [ -n "${grub_menu}" ]; then
            # We want the trailing newline as a marker will be added
            echo "${grub_menu}"
        fi
    ;;
esac

======================== sda10/etc/grub.d/32_linux_xen =========================

#! /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"
. "$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 ()
{
  os="$1"
  version="$2"
  xen_version="$3"
  type="$4"
  args="$5"
  xen_args="$6"
  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
  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_sym () {
    case "$1" in
	*/xen-syms-*)
	    return 1;;
	*)
	    return 0;;
    esac
}
xen_list=
for i in /boot/xen*; do
    if grub_file_is_not_garbage "$i" && file_is_not_sym "$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
	if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; 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"

===================== sda10/etc/grub.d/33_os-prober_proxy ======================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "-*
-#text
-'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'{-'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/*, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~, -'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~}
-'Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'~2b159d10fee73ef38f17e8fc7cb671b7~
-'SUBMENU' as 'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'{-'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/*, -'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu (sur /dev/sda7)'~6b0c33529dad702f7e48c6ab1cf6e003~, -'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-161-generic (sur /dev/sda7)'~6b0c33529dad702f7e48c6ab1cf6e003~, -'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-161-generic (recovery mode) (sur /dev/sda7)'~9258b56ea86bda00a489be0578b02549~, -'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-156-generic (sur /dev/sda7)'~eaa7ef6f005a58a9ea4e8b365f0b8fd7~, -'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-156-generic (recovery mode) (sur /dev/sda7)'~f3985bae3831619fc2fdb1904fd01fe2~}
+'Windows Boot Manager (sur /dev/sda1)'~b70a83b46850c1b0da7f32e189226d58~
+'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'~6bc2f13a0e3fca8a54cfbc3512935e2e~
"

======================= sda10/etc/grub.d/34_linux_proxy ========================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/linux' | /etc/grub.d/bin/grubcfg_proxy "+'Ubuntu'~c6caf3e8597f1004e5df563c2411af3d~ as 'Ubuntu3'
-*
-#text
-'SUBMENU' as 'Options avancées pour Ubuntu'{-'Options avancées pour Ubuntu'/*, -'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-38-generic'~b547330d3a08ee9135131e3d656f471e~, -'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode)'~01b96c9e7426329480b376f84f851324~, -'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-37-generic'~7bbd5cc9b3246496cd535f1331fb0df1~, -'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode)'~f1d8a7c447098bf3706ec75e2f76968b~}
"

===================== sda10/etc/grub.d/35_os-prober_proxy ======================

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
sh -c 'echo "### BEGIN /etc/grub.d/proxifiedScripts/os-prober ###";
"/etc/grub.d/proxifiedScripts/os-prober";
echo "### END /etc/grub.d/proxifiedScripts/os-prober ###";
echo "### BEGIN /etc/grub.d/proxifiedScripts/linux ###";
"/etc/grub.d/proxifiedScripts/linux";
echo "### END /etc/grub.d/proxifiedScripts/linux ###";' | /etc/grub.d/bin/grubcfg_proxy "-*
-#text
-'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/*
-'Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'~2b159d10fee73ef38f17e8fc7cb671b7~
-'Windows Boot Manager (sur /dev/sda1)'~b70a83b46850c1b0da7f32e189226d58~
-'Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'~6bc2f13a0e3fca8a54cfbc3512935e2e~
+'SUBMENU' as 'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'{+'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (sur /dev/sda6)'~36b3a3d4678f8e0cb5d86ed8ab9fd6da~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode) (sur /dev/sda6)'~de2ca328bc3785c05ad37d98906539e8~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (sur /dev/sda6)'~fb2fcdf548fb8829014391281fe4a0f8~, +'Options avancées pour Ubuntu 20.04.3 LTS (20.04) (sur /dev/sda6)'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode) (sur /dev/sda6)'~28136a36780d9aa4e1f66aa905f1df1b~}
+'SUBMENU' as 'Options avancées pour Ubuntu'{+'Options avancées pour Ubuntu'/* from '/etc/grub.d/proxifiedScripts/linux', +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-38-generic'~b547330d3a08ee9135131e3d656f471e~ from '/etc/grub.d/proxifiedScripts/linux', +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-38-generic (recovery mode)'~01b96c9e7426329480b376f84f851324~ from '/etc/grub.d/proxifiedScripts/linux', +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-37-generic'~7bbd5cc9b3246496cd535f1331fb0df1~ from '/etc/grub.d/proxifiedScripts/linux', +'Options avancées pour Ubuntu'/'Ubuntu, avec Linux 5.11.0-37-generic (recovery mode)'~f1d8a7c447098bf3706ec75e2f76968b~ from '/etc/grub.d/proxifiedScripts/linux'}
+'SUBMENU' as 'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'{+'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/*, +'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu (sur /dev/sda7)'~6b0c33529dad702f7e48c6ab1cf6e003~, +'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-161-generic (sur /dev/sda7)'~6b0c33529dad702f7e48c6ab1cf6e003~, +'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-161-generic (recovery mode) (sur /dev/sda7)'~9258b56ea86bda00a489be0578b02549~, +'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-156-generic (sur /dev/sda7)'~eaa7ef6f005a58a9ea4e8b365f0b8fd7~, +'Options avancées pour Ubuntu 18.04.6 LTS (18.04) (sur /dev/sda7)'/'Ubuntu, avec Linux 4.15.0-156-generic (recovery mode) (sur /dev/sda7)'~f3985bae3831619fc2fdb1904fd01fe2~}
" multi

====================== sda10/etc/grub.d/36_uefi-firmware =======================

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2012  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"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
. "${datarootdir}/grub/grub-mkconfig_lib"
efi_vars_dir=/sys/firmware/efi/vars
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
if [ -e "$OsIndications" ] && \
   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
  LABEL="UEFI Firmware Settings"
  gettext_printf "Adding boot menu entry for UEFI Firmware Settings\n" >&2
  onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
  cat << EOF
menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
	fwsetup
}
EOF
fi


======================== Unknown MBRs/Boot Sectors/etc =========================


/dev/sdb2: unknown GPT attributes
8000000000000000
Unknown BootLoader on sdb1

00000000  eb 52 90 4e 54 46 53 20  20 20 20 00 02 08 00 00  |.R.NTFS    .....|
00000010  00 00 00 00 00 f8 00 00  3f 00 ff 00 3f 00 00 00  |........?...?...|
00000020  00 00 00 00 80 00 80 00  c0 df 69 18 00 00 00 00  |..........i.....|
00000030  04 00 00 00 00 00 00 00  11 27 00 00 00 00 00 00  |.........'......|
00000040  f6 00 00 00 01 00 00 00  dd 04 2f 66 aa ed 7d 54  |........../f..}T|
00000050  b2 b4 9a 43 0e 1f be 71  7c ac 22 c0 74 0b 56 b4  |...C...q|.".t.V.|
00000060  0e bb 07 00 cd 10 5e eb  f0 32 e4 cd 16 cd 19 eb  |......^..2......|
00000070  fe 54 68 69 73 20 69 73  20 6e 6f 74 20 61 20 62  |.This is not a b|
00000080  6f 6f 74 61 62 6c 65 20  64 69 73 6b 2e 20 50 6c  |ootable disk. Pl|
00000090  65 61 73 65 20 69 6e 73  65 72 74 20 61 20 62 6f  |ease insert a bo|
000000a0  6f 74 61 62 6c 65 20 66  6c 6f 70 70 79 20 61 6e  |otable floppy an|
000000b0  64 0d 0a 70 72 65 73 73  20 61 6e 79 20 6b 65 79  |d..press any key|
000000c0  20 74 6f 20 74 72 79 20  61 67 61 69 6e 20 2e 2e  | to try again ..|
000000d0  2e 20 0d 0a 00 00 00 00  00 00 00 00 00 00 00 00  |. ..............|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200

Unknown BootLoader on sdb3

00000000  eb 52 90 4e 54 46 53 20  20 20 20 00 02 08 00 00  |.R.NTFS    .....|
00000010  00 00 00 00 00 f8 00 00  3f 00 ff 00 00 e0 69 19  |........?.....i.|
00000020  00 00 00 00 80 00 80 00  ff cf 56 b8 01 00 00 00  |..........V.....|
00000030  04 00 00 00 00 00 00 00  7f 08 ee 0d 00 00 00 00  |................|
00000040  f6 00 00 00 01 00 00 00  cb cb 65 0f 2d ff a4 6f  |..........e.-..o|
00000050  92 3e 3d cf 0e 1f be 71  7c ac 22 c0 74 0b 56 b4  |.>=....q|.".t.V.|
00000060  0e bb 07 00 cd 10 5e eb  f0 32 e4 cd 16 cd 19 eb  |......^..2......|
00000070  fe 54 68 69 73 20 69 73  20 6e 6f 74 20 61 20 62  |.This is not a b|
00000080  6f 6f 74 61 62 6c 65 20  64 69 73 6b 2e 20 50 6c  |ootable disk. Pl|
00000090  65 61 73 65 20 69 6e 73  65 72 74 20 61 20 62 6f  |ease insert a bo|
000000a0  6f 74 61 62 6c 65 20 66  6c 6f 70 70 79 20 61 6e  |otable floppy an|
000000b0  64 0d 0a 70 72 65 73 73  20 61 6e 79 20 6b 65 79  |d..press any key|
000000c0  20 74 6f 20 74 72 79 20  61 67 61 69 6e 20 2e 2e  | to try again ..|
000000d0  2e 20 0d 0a 00 00 00 00  00 00 00 00 00 00 00 00  |. ..............|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200


========= Devices which don't seem to have a corresponding hard drive ==========

sdd 

Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would purge (in order to sign-grub) and reinstall the grub-efi-amd64-signed of
sda10,
using the following options:        sda1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s  use-standard-efi-file  restore-efi-backups  

Final advice in case of suggested repair: ______________________________________


Please do not forget to make your UEFI firmware boot on the L'OS actuellement utilisé - Ubuntu 20.04.3 LTS CurrentSession entry (sda1/efi/****/shim****.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.

If your UEFI firmware does not allow to change the boot order, change the default boot entry of the Windows bootloader.
For example you can boot into Windows, then type the following command in an admin command prompt:
bcdedit /set {bootmgr} path \EFI\****\shim****.efi (**** will be updated in the final message)

Hors ligne

#23 Le 04/11/2021, à 18:11

xubu1957

Re : Grub GPT multiboot [résolu]

Bonjour,

freewee a écrit :

Je vois qu' il y a eu des posts dont je n' ai pas eu connaissance (le forum bugue un peu de ce côté, la case de suivi est pourtant cochée!)

Pour info > [Résolu (Gmail)] "Discussions suivies" n'envoient plus de mail.


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

Hors ligne

#24 Le 04/11/2021, à 18:18

freewee

Re : Grub GPT multiboot [résolu]

Merci xubu1957, cette fois ci j' ai reçu une notification!!! lol

Hors ligne

#25 Le 04/11/2021, à 18:43

geole

Re : Grub GPT multiboot [résolu]

Bonjour
Quelques extraits

================================ 5 OS detected =================================
OS#1:   L'OS actuellement utilisé - Ubuntu 20.04.3 LTS CurrentSession on sda10
OS#2:   Ubuntu 20.04.3 LTS on sda6
OS#3:   Ubuntu 18.04.6 LTS on sda7

Tu réussis à booter sur SDA10
Tu devrais alors pouvoir choisir ton O.S. principal (SDA7) puis réinstaller le grub

sudo grub-install /dev/sda

Puis le mettre à jour

sudo update-grub

*
Puis il  y aura du ménage à faire afin que le fichier /boot/grub/grub.cfg ne devienne pas monstrueux.
1) Booter  sur sda6 et dire qu'il n'est pas l'O.S. principal et régénérer son grub (sans recherche des autres).

sudo chmod  -x /etc/grub.d/30_os-prober
sudo update-grub

2) Booter  sur sda10 et dire qu'il n'est pas l'O.S. principal et régénérer son grub (sans recherche des autres).

sudo chmod  -x /etc/grub.d/30_os-prober
sudo update-grub

3) Booter  sur sda7 et dire qu'il est  l'O.S. principal et régénérer son grub  (avec recherche des autres qui ont été épurés).

sudo chmod  +x /etc/grub.d/30_os-prober
sudo update-grub

NOTA: Tout est correct: Les UUID et les SDAx sont en bien en phase
blkid (filtered): _________________________________
NAME    FSTYPE   UUID
├─sda6  ext4     d3b05b86-8e5c-4a51-8f84-a895b1b270e0                              
├─sda7  ext4     38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe   
└─sda10 ext4     7ccae5b6-356f-404a-a675-80c410b5127a

===================== sda10/boot/grub/grub.cfg (filtered) ======================
Ubuntu 18.04.6 LTS (18.04) (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu 20.04.3 LTS (20.04) (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu3  7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-37-generic (sur sda6)   d3b05b86-8e5c-4a51-8f84-a895b1b270e0
Ubuntu, avec Linux 5.11.0-38-generic   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu, avec Linux 5.11.0-37-generic   7ccae5b6-356f-404a-a675-80c410b5127a
Ubuntu (sur sda7)  38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-161-generic (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe
Ubuntu, avec Linux 4.15.0-156-generic (sur sda7)   38c41f08-7fa6-4ccb-aa86-812bdfb8fdbe

Dernière modification par geole (Le 04/11/2021, à 19:24)


Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne