#26 Le 28/10/2021, à 08:15
- Qid
Re : [résolu] Récupération de grub par KDE neon
====================== sda8/boot/grub/grub.cfg (filtered) ====================== Neon 20.04 [P8] 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d Kubuntu 21.10 [P9] aa9a050e-bf13-494c-8762-5f05012ddb85 ### END /etc/grub.d/30_os-prober_proxy ### Kubuntu RESCUE [P12] 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b Windows BM [P2] osprober-efi-F2B4-5224
====================== sda9/boot/grub/grub.cfg (filtered) ====================== Kubuntu 21.04 [GPT9] aa9a050e-bf13-494c-8762-5f05012ddb85 KDE neon User Edition 5.22 (20.04) (sur sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d Neon 20.04 [P8] (sur sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d Kubuntu Rescue [GPT12] 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b Windows [GPT2] osprober-efi-F2B4-5224 ### END /etc/grub.d/30_os-prober_proxy ### ### END /etc/grub.d/30_uefi-firmware ###
Donc il faut que l'uefi pointe sur sda8 et non sda9...
"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
#27 Le 28/10/2021, à 08:35
- freex
Re : [résolu] Récupération de grub par KDE neon
...mais il ne pointe pas sur sda8? :
efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,000F,000C,0012,0000
Boot0000 Windows Boot Manager
Boot0001* neon
Boot000C* Hard Drive
Boot000F* ubuntu
Boot0012* ubuntu
Soit quelle serait la ligne à modifier et dans quel fichier sur la partition EFI ?
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#28 Le 28/10/2021, à 09:00
- FrancisFDZ
Re : [résolu] Récupération de grub par KDE neon
J'ai cru comprendre qu'on pouvait créer plusieurs fichiers de boot dans la partition "efi". Si c'est bien ça, la question devient : comment choisir le fichier de boot (grub ou autre) par défaut
Donc il faut que l'uefi pointe sur sda8 et non sda9...
C'est à peu près ce que j'avais compris (je reconnais, je n'ai pas tout compris)
[Edit] La solution serait-elle dans l'article que j'ai déniché en #7 notamment le paragraphe
efibootmgr- Cet outil Linux peut ajuster l'ordre de démarrage. Commencez par taper sudo efibootmgr seul pour voir les options. Notez le numéro ( Boot####) associé à l' entrée ubuntu (soit ici "KDE Plasma") et l'ordre de démarrage actuel (sur la logne BootOrder). Vous pouvez ensuite entrer un nouvel ordre de démarrage avec l' entrée ubuntu (ou "KDE Plasma") en haut en utilisant l' option "-o". Par exemple, si l'ordre de démarrage actuel est 0000 0003 ubuntu0007 0004 et 0007, vous devez taper sudo efibootmgr -o 0007,0000,0003,0004 pour ajuster l'ordre de démarrage.
[/Edit]
Dernière modification par FrancisFDZ (Le 28/10/2021, à 09:16)
-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]
Hors ligne
#29 Le 28/10/2021, à 10:09
- Qid
Re : [résolu] Récupération de grub par KDE neon
...mais il ne pointe pas sur sda8? :
efibootmgr BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0001,000F,000C,0012,0000 Boot0000 Windows Boot Manager Boot0001* neon Boot000C* Hard Drive Boot000F* ubuntu Boot0012* ubuntu
Ah si... Mais le mieux serait de dégager les autres options de la séquence de boot pour être sûr qu'il ne saute pas la première et la seconde pour en réalité démarrer sur la 3ieme...
"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
#30 Le 28/10/2021, à 12:25
- nany
Re : [résolu] Récupération de grub par KDE neon
efibootmgr BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0001,000F,000C,0012,0000 Boot0000 Windows Boot Manager Boot0001* neon Boot000C* Hard Drive Boot000F* ubuntu Boot0012* ubuntu
Le 0013 n'y est plus car j'avais testé via NEON la commande précédente suggérée et cela n'avait pas fontionné. Je me suis dit que peut-être fallait-il la lancer dans Kubuntu. Sur cet OS, une erreur est apparue (un truc comme "pas d'entré pour 0013"), du coup j'ai enlevé le 0013 de la commande et je l'ai relancée via NEON.
Si je comprends bien, la commande avait renvoyé une erreur et tu avais donc redémarré alors que l’ordre n’avait pas été changé.
Pour être sûr, maintenant que l’ordre est correct, redémarre à nouveau et dis nous ce qu’il en est pour le menu de GRUB.
Hors ligne
#31 Le 29/10/2021, à 08:21
- freex
Re : [résolu] Récupération de grub par KDE neon
freex a écrit :efibootmgr BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0001,000F,000C,0012,0000 Boot0000 Windows Boot Manager Boot0001* neon Boot000C* Hard Drive Boot000F* ubuntu Boot0012* ubuntu
Le 0013 n'y est plus car j'avais testé via NEON la commande précédente suggérée et cela n'avait pas fontionné. Je me suis dit que peut-être fallait-il la lancer dans Kubuntu. Sur cet OS, une erreur est apparue (un truc comme "pas d'entré pour 0013"), du coup j'ai enlevé le 0013 de la commande et je l'ai relancée via NEON.
Si je comprends bien, la commande avait renvoyé une erreur et tu avais donc redémarré alors que l’ordre n’avait pas été changé.
Pour être sûr, maintenant que l’ordre est correct, redémarre à nouveau et dis nous ce qu’il en est pour le menu de GRUB.
Toutes ces manipulations n'ont servi à rien, c'est le grub de Kubuntu qui prend le dessus à tout les coups
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#32 Le 29/10/2021, à 08:28
- FrancisFDZ
Re : [résolu] Récupération de grub par KDE neon
As tu testé (voir #28)
efibootmanager -o
Ça devrait renvoyer la liste des différents boot possibles, dans "l'ordre d’entrée en scène"
Dernière modification par FrancisFDZ (Le 29/10/2021, à 08:29)
-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]
Hors ligne
#33 Le 29/10/2021, à 08:44
- freex
Re : [résolu] Récupération de grub par KDE neon
As tu testé (voir #28)
efibootmanager -o
Ça devrait renvoyer la liste des différents boot possibles, dans "l'ordre d’entrée en scène"
efibootmanager -o
efibootmanager: command not found
:~$ efiboot
efibootdump efibootmgr
:~$ efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,000F,000C,0012,0000
Boot0000 Windows Boot Manager
Boot0001* neon
Boot000C* Hard Drive
Boot000F* ubuntu
Boot0012* ubuntu
:~$ efibootmgr -o
efibootmgr: option requires an argument -- 'o'
efibootmgr version 17
usage: efibootmgr [options]
-a | --active sets bootnum active
-A | --inactive sets bootnum inactive
-b | --bootnum XXXX modify BootXXXX (hex)
-B | --delete-bootnum delete bootnum
-c | --create create new variable bootnum and add to bootorder
-C | --create-only create new variable bootnum and do not add to bootorder
-D | --remove-dups remove duplicate values from BootOrder
-d | --disk disk (defaults to /dev/sda) containing loader
-r | --driver Operate on Driver variables, not Boot Variables.
-e | --edd [1|3|-1] force EDD 1.0 or 3.0 creation variables, or guess
-E | --device num EDD 1.0 device number (defaults to 0x80)
-g | --gpt force disk with invalid PMBR to be treated as GPT
-i | --iface name create a netboot entry for the named interface
-l | --loader name (defaults to "\EFI\ubuntu\grub.efi")
-L | --label label Boot manager display label (defaults to "Linux")
-m | --mirror-below-4G t|f mirror memory below 4GB
-M | --mirror-above-4G X percentage memory to mirror above 4GB
-n | --bootnext XXXX set BootNext to XXXX (hex)
-N | --delete-bootnext delete BootNext
-o | --bootorder XXXX,YYYY,ZZZZ,... explicitly set BootOrder (hex)
-O | --delete-bootorder delete BootOrder
-p | --part part partition containing loader (defaults to 1 on partitioned devices)
-q | --quiet be quiet
-t | --timeout seconds set boot manager timeout waiting for user input.
-T | --delete-timeout delete Timeout.
-u | --unicode | --UCS-2 handle extra args as UCS-2 (default is ASCII)
-v | --verbose print additional information
-V | --version return version and exit
-w | --write-signature write unique sig to MBR if needed
-y | --sysprep Operate on SysPrep variables, not Boot Variables.
-@ | --append-binary-args file append extra args from file (use "-" for stdin)
-h | --help show help/usage
:~$
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#34 Le 29/10/2021, à 08:52
- nany
Re : [résolu] Récupération de grub par KDE neon
@FrancisFDZ : tu as un train de retard.
Ceci dit, je ne vois pas d’où peut venir le problème.
Je vais relire le dernier boot-info plus en détail, sait-on jamais.
Hors ligne
#35 Le 29/10/2021, à 09:08
- nany
Re : [résolu] Récupération de grub par KDE neon
Je pense avoir trouvé.
…
… 728124f6ec8e22fbdbe7034812c81b95 sda2/neon/shimx64.efi … 728124f6ec8e22fbdbe7034812c81b95 sda2/ubuntu/shimx64.efi …
Les deux fichiers ont la même empreinte donc celui de neon est probablement une copie de celui de Kubuntu.
Dans neon, donne le retour de :
sudo grub-install -v
Hors ligne
#36 Le 29/10/2021, à 09:43
- FrancisFDZ
Re : [résolu] Récupération de grub par KDE neon
@nany :
@FrancisFDZ : tu as un train de retard.
En effet, j'avais loupé ça (nb : ta remarque est un peu vexante pour un ancien cheminot )
Cependant, je n'ai pas vu la réponse à cette demande avant #33 (à moins que ce ne soit la faute de mon ophtalmo )
Et on a bien la réponse claire (en #33) : le boot "neon" a bien été validé et est le boot courant.
-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]
Hors ligne
#37 Le 29/10/2021, à 09:48
- nany
Re : [résolu] Récupération de grub par KDE neon
Cependant, je n'ai pas vu la réponse à cette demande avant #33 (à moins que ce ne soit la faute de mon ophtalmo )
Messages #19, #20 et #24.
Change d’ophtalmo !
Hors ligne
#38 Le 29/10/2021, à 10:06
- FrancisFDZ
Re : [résolu] Récupération de grub par KDE neon
[HS}
La lecture rapide, c'est pas mon truc ! Je vois que je ne maitrise pas la lecture en diagonale !
[Edit] coté ophtalmo, ça risque d'être la cata(racte)strophe !
Et changer d'ophtalmo, vu le délai pour obtenir un RV, pas question ! [/Edit]
[/HS]
Dernière modification par FrancisFDZ (Le 29/10/2021, à 10:13)
-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]
Hors ligne
#39 Le 29/10/2021, à 10:20
- Qid
Re : [résolu] Récupération de grub par KDE neon
Je pense avoir trouvé.
freex a écrit :…
… 728124f6ec8e22fbdbe7034812c81b95 sda2/neon/shimx64.efi … 728124f6ec8e22fbdbe7034812c81b95 sda2/ubuntu/shimx64.efi …
Les deux fichiers ont la même empreinte donc celui de neon est probablement une copie de celui de Kubuntu.
Ouais bah tien... J'en profiterai bien pour redemander ce qu'est clairement KDE néon par rapport à kubuntu parce-que j'ai un peu de mal à comprendre pourquoi plusieurs discussions fleurissent au sujet du premier sur notre forum alors qu'on est bien face à une autre distribution dont le support n'est pas officiellement reconnu par canonical et donc ubuntu-fr...
"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
#40 Le 29/10/2021, à 11:10
- freex
Re : [résolu] Récupération de grub par KDE neon
Ouais bah tien... J'en profiterai bien pour redemander ce qu'est clairement KDE néon par rapport à kubuntu parce-que j'ai un peu de mal à comprendre pourquoi plusieurs discussions fleurissent au sujet du premier sur notre forum alors qu'on est bien face à une autre distribution dont le support n'est pas officiellement reconnu par canonical et donc ubuntu-fr...
KDE Neon c'est une LTS avec les mises à jours de l'environnement KDE disponibles jusqu'à la LTS suivante.
Plus besoin d'upgrader le système tout les 6 mois pour bénéficier des dernières nouveautés de KDE.
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#41 Le 29/10/2021, à 11:35
- Qid
Re : [résolu] Récupération de grub par KDE neon
Plus besoin d'upgrader le système tout les 6 mois pour bénéficier des dernières nouveautés de KDE.
Il n'empêche qu'on parle bien d'une autre distribution ne serait-ce que parce que pour arriver à ça il y a forcément un dépôt potentiellement parasite
Ou alors et c'est pour ça que j'ai profité de l'occasion on parle bien de 2 distributions "identiques"... Celà dit rien n'empêche de faire un dualboot de 2 distributions strictement identique en théorie... Donc bon...
"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
#42 Le 29/10/2021, à 11:40
- nany
Re : [résolu] Récupération de grub par KDE neon
@freex, as-tu lu mon message #35 ? J’attends un retour.
Hors ligne
#43 Le 29/10/2021, à 11:57
- freex
Re : [résolu] Récupération de grub par KDE neon
@freex, as-tu lu mon message #35 ? J’attends un retour.
C'est malin, j'avais écrit un long message mais j'ai été déconnecté entre temps, suite à l'envoi, j'ai tout perdu
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#44 Le 29/10/2021, à 12:01
- xubu1957
Re : [résolu] Récupération de grub par KDE neon
Bonjour,
Pour info > Astuce/Tutoriel : « message perdu, déconnecté du forum »
Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] 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
#45 Le 29/10/2021, à 12:06
- freex
Re : [résolu] Récupération de grub par KDE neon
...J'ai écrasé Kubuntu Rescue par NEON
maintenant j'ai un grub NEON mais impossible de le modifier car problème à l'installation de NEON ...et donc cette nouvelle NEON ne se lance pas, j'ai juste le grub
Soit, à l'installation, contrairement à Kubuntu, NEON me demande d'activer le boot flag de la partition EFI FAT32 et de lui atribuer un point de montage /boot/efi ...ce que j'ai fait.
Toujours contrairement à Kubuntu, NEON ne me demande rien à propos de l'emplacement du fichier GRUB, j'ose imaginer qu'il se fait sur /sda
Voici donc le retour de sudo grub-install -v
grub-install: info: adding a relocation entry for 0x6ebb.
grub-install: info: adding a relocation entry for 0x6ecf.
grub-install: info: adding a relocation entry for 0x6ee4.
grub-install: info: adding a relocation entry for 0x6f08.
grub-install: info: adding a relocation entry for 0x6f3e.
grub-install: info: adding a relocation entry for 0x6f4a.
grub-install: info: adding a relocation entry for 0x6f60.
grub-install: info: adding a relocation entry for 0x6f6f.
grub-install: info: adding a relocation entry for 0x6f82.
grub-install: info: adding a relocation entry for 0x6f98.
grub-install: info: adding a relocation entry for 0x6fa2.
grub-install: info: adding a relocation entry for 0x6fac.
grub-install: info: adding a relocation entry for 0x6fb9.
grub-install: info: adding a relocation entry for 0x6fca.
grub-install: info: adding a relocation entry for 0x6fe5.
grub-install: info: adding a relocation entry for 0x6fef.
grub-install: info: adding a relocation entry for 0x7010.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 320 bytes of a fixup block starting at 0x6000.
grub-install: info: adding a relocation entry for 0x7025.
grub-install: info: adding a relocation entry for 0x7034.
grub-install: info: adding a relocation entry for 0x7045.
grub-install: info: adding a relocation entry for 0x7051.
grub-install: info: adding a relocation entry for 0x7070.
grub-install: info: adding a relocation entry for 0x708d.
grub-install: info: adding a relocation entry for 0x7108.
grub-install: info: adding a relocation entry for 0x7119.
grub-install: info: adding a relocation entry for 0x7169.
grub-install: info: adding a relocation entry for 0x7173.
grub-install: info: adding a relocation entry for 0x7183.
grub-install: info: adding a relocation entry for 0x7199.
grub-install: info: adding a relocation entry for 0x71a3.
grub-install: info: adding a relocation entry for 0x71ad.
grub-install: info: adding a relocation entry for 0x71b7.
grub-install: info: adding a relocation entry for 0x71c1.
grub-install: info: adding a relocation entry for 0x71ce.
grub-install: info: adding a relocation entry for 0x7200.
grub-install: info: adding a relocation entry for 0x726c.
grub-install: info: adding a relocation entry for 0x72bb.
grub-install: info: adding a relocation entry for 0x72f4.
grub-install: info: adding a relocation entry for 0x736b.
grub-install: info: adding a relocation entry for 0x738e.
grub-install: info: adding a relocation entry for 0x73d7.
grub-install: info: adding a relocation entry for 0x73ee.
grub-install: info: adding a relocation entry for 0x7436.
grub-install: info: adding a relocation entry for 0x7442.
grub-install: info: adding a relocation entry for 0x7476.
grub-install: info: adding a relocation entry for 0x74e7.
grub-install: info: adding a relocation entry for 0x750a.
grub-install: info: adding a relocation entry for 0x7514.
grub-install: info: adding a relocation entry for 0x7528.
grub-install: info: adding a relocation entry for 0x755a.
grub-install: info: adding a relocation entry for 0x7572.
grub-install: info: adding a relocation entry for 0x7580.
grub-install: info: adding a relocation entry for 0x75c3.
grub-install: info: adding a relocation entry for 0x75f0.
grub-install: info: adding a relocation entry for 0x7630.
grub-install: info: adding a relocation entry for 0x769b.
grub-install: info: adding a relocation entry for 0x76b9.
grub-install: info: adding a relocation entry for 0x76c3.
grub-install: info: adding a relocation entry for 0x7708.
grub-install: info: adding a relocation entry for 0x771b.
grub-install: info: adding a relocation entry for 0x7736.
grub-install: info: adding a relocation entry for 0x7782.
grub-install: info: adding a relocation entry for 0x778e.
grub-install: info: adding a relocation entry for 0x779c.
grub-install: info: adding a relocation entry for 0x77b3.
grub-install: info: adding a relocation entry for 0x77c4.
grub-install: info: adding a relocation entry for 0x77e8.
grub-install: info: adding a relocation entry for 0x77f9.
grub-install: info: adding a relocation entry for 0x7807.
grub-install: info: adding a relocation entry for 0x7828.
grub-install: info: adding a relocation entry for 0x7848.
grub-install: info: adding a relocation entry for 0x7857.
grub-install: info: adding a relocation entry for 0x786a.
grub-install: info: adding a relocation entry for 0x7896.
grub-install: info: adding a relocation entry for 0x78a0.
grub-install: info: adding a relocation entry for 0x78ac.
grub-install: info: adding a relocation entry for 0x78b6.
grub-install: info: adding a relocation entry for 0x78c6.
grub-install: info: adding a relocation entry for 0x78e2.
grub-install: info: adding a relocation entry for 0x78ec.
grub-install: info: adding a relocation entry for 0x7902.
grub-install: info: adding a relocation entry for 0x7910.
grub-install: info: adding a relocation entry for 0x7924.
grub-install: info: adding a relocation entry for 0x7939.
grub-install: info: adding a relocation entry for 0x794a.
grub-install: info: adding a relocation entry for 0x7958.
grub-install: info: adding a relocation entry for 0x7970.
grub-install: info: adding a relocation entry for 0x7992.
grub-install: info: adding a relocation entry for 0x79aa.
grub-install: info: adding a relocation entry for 0x79c0.
grub-install: info: adding a relocation entry for 0x79dc.
grub-install: info: adding a relocation entry for 0x7a0a.
grub-install: info: adding a relocation entry for 0x7a36.
grub-install: info: adding a relocation entry for 0x7a47.
grub-install: info: adding a relocation entry for 0x7a6a.
grub-install: info: adding a relocation entry for 0x7aac.
grub-install: info: adding a relocation entry for 0x7b19.
grub-install: info: adding a relocation entry for 0x7b65.
grub-install: info: adding a relocation entry for 0x7b81.
grub-install: info: adding a relocation entry for 0x7ba4.
grub-install: info: adding a relocation entry for 0x7bee.
grub-install: info: adding a relocation entry for 0x7c68.
grub-install: info: adding a relocation entry for 0x7cb2.
grub-install: info: adding a relocation entry for 0x7cc0.
grub-install: info: adding a relocation entry for 0x7d2d.
grub-install: info: adding a relocation entry for 0x7d78.
grub-install: info: adding a relocation entry for 0x7d87.
grub-install: info: adding a relocation entry for 0x7d96.
grub-install: info: adding a relocation entry for 0x7da3.
grub-install: info: adding a relocation entry for 0x7daf.
grub-install: info: adding a relocation entry for 0x7dca.
grub-install: info: adding a relocation entry for 0x7e1f.
grub-install: info: adding a relocation entry for 0x7e29.
grub-install: info: adding a relocation entry for 0x7e67.
grub-install: info: adding a relocation entry for 0x7e71.
grub-install: info: adding a relocation entry for 0x7ed3.
grub-install: info: adding a relocation entry for 0x7edd.
grub-install: info: adding a relocation entry for 0x7f09.
grub-install: info: adding a relocation entry for 0x7f13.
grub-install: info: adding a relocation entry for 0x7f1d.
grub-install: info: adding a relocation entry for 0x7f35.
grub-install: info: adding a relocation entry for 0x7f3f.
grub-install: info: adding a relocation entry for 0x7f49.
grub-install: info: adding a relocation entry for 0x7f61.
grub-install: info: adding a relocation entry for 0x7f6b.
grub-install: info: adding a relocation entry for 0x7f75.
grub-install: info: adding a relocation entry for 0x7f85.
grub-install: info: adding a relocation entry for 0x7f95.
grub-install: info: adding a relocation entry for 0x7fd7.
grub-install: info: adding a relocation entry for 0x8004.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 240 bytes of a fixup block starting at 0x7000.
grub-install: info: adding a relocation entry for 0x8021.
grub-install: info: adding a relocation entry for 0x8047.
grub-install: info: adding a relocation entry for 0x805b.
grub-install: info: adding a relocation entry for 0x8069.
grub-install: info: adding a relocation entry for 0x8086.
grub-install: info: adding a relocation entry for 0x8094.
grub-install: info: adding a relocation entry for 0x80be.
grub-install: info: adding a relocation entry for 0x80d0.
grub-install: info: adding a relocation entry for 0x80f3.
grub-install: info: adding a relocation entry for 0x8124.
grub-install: info: adding a relocation entry for 0x8134.
grub-install: info: adding a relocation entry for 0x8147.
grub-install: info: adding a relocation entry for 0x8161.
grub-install: info: adding a relocation entry for 0x8170.
grub-install: info: adding a relocation entry for 0x817a.
grub-install: info: adding a relocation entry for 0x8193.
grub-install: info: adding a relocation entry for 0x819d.
grub-install: info: adding a relocation entry for 0x81b8.
grub-install: info: adding a relocation entry for 0x81ca.
grub-install: info: adding a relocation entry for 0x81db.
grub-install: info: adding a relocation entry for 0x81f1.
grub-install: info: adding a relocation entry for 0x8202.
grub-install: info: adding a relocation entry for 0x821f.
grub-install: info: adding a relocation entry for 0x822b.
grub-install: info: adding a relocation entry for 0x8281.
grub-install: info: adding a relocation entry for 0x828b.
grub-install: info: adding a relocation entry for 0x82c5.
grub-install: info: adding a relocation entry for 0x82fa.
grub-install: info: adding a relocation entry for 0x831d.
grub-install: info: adding a relocation entry for 0x8331.
grub-install: info: adding a relocation entry for 0x8351.
grub-install: info: adding a relocation entry for 0x8375.
grub-install: info: adding a relocation entry for 0x83c6.
grub-install: info: adding a relocation entry for 0x83df.
grub-install: info: adding a relocation entry for 0x83f3.
grub-install: info: adding a relocation entry for 0x8420.
grub-install: info: adding a relocation entry for 0x8448.
grub-install: info: adding a relocation entry for 0x8457.
grub-install: info: adding a relocation entry for 0x8478.
grub-install: info: adding a relocation entry for 0x84a4.
grub-install: info: adding a relocation entry for 0x84c8.
grub-install: info: adding a relocation entry for 0x853a.
grub-install: info: adding a relocation entry for 0x8550.
grub-install: info: adding a relocation entry for 0x855d.
grub-install: info: adding a relocation entry for 0x856c.
grub-install: info: adding a relocation entry for 0x8594.
grub-install: info: adding a relocation entry for 0x85aa.
grub-install: info: adding a relocation entry for 0x85b7.
grub-install: info: adding a relocation entry for 0x85e8.
grub-install: info: adding a relocation entry for 0x861a.
grub-install: info: adding a relocation entry for 0x8638.
grub-install: info: adding a relocation entry for 0x8645.
grub-install: info: adding a relocation entry for 0x865e.
grub-install: info: adding a relocation entry for 0x8677.
grub-install: info: adding a relocation entry for 0x8683.
grub-install: info: adding a relocation entry for 0x868d.
grub-install: info: adding a relocation entry for 0x86a4.
grub-install: info: adding a relocation entry for 0x86b4.
grub-install: info: adding a relocation entry for 0x86c4.
grub-install: info: adding a relocation entry for 0x86da.
grub-install: info: adding a relocation entry for 0x86ea.
grub-install: info: adding a relocation entry for 0x86f7.
grub-install: info: adding a relocation entry for 0x8719.
grub-install: info: adding a relocation entry for 0x8723.
grub-install: info: adding a relocation entry for 0x8736.
grub-install: info: adding a relocation entry for 0x874e.
grub-install: info: adding a relocation entry for 0x875d.
grub-install: info: adding a relocation entry for 0x8767.
grub-install: info: adding a relocation entry for 0x8773.
grub-install: info: adding a relocation entry for 0x877d.
grub-install: info: adding a relocation entry for 0x878e.
grub-install: info: adding a relocation entry for 0x879a.
grub-install: info: adding a relocation entry for 0x87aa.
grub-install: info: adding a relocation entry for 0x87b9.
grub-install: info: adding a relocation entry for 0x87c5.
grub-install: info: adding a relocation entry for 0x87d1.
grub-install: info: adding a relocation entry for 0x87fa.
grub-install: info: adding a relocation entry for 0x881a.
grub-install: info: adding a relocation entry for 0x8824.
grub-install: info: adding a relocation entry for 0x8832.
grub-install: info: adding a relocation entry for 0x885b.
grub-install: info: adding a relocation entry for 0x888d.
grub-install: info: adding a relocation entry for 0x889e.
grub-install: info: adding a relocation entry for 0x88df.
grub-install: info: adding a relocation entry for 0x8937.
grub-install: info: adding a relocation entry for 0x8943.
grub-install: info: adding a relocation entry for 0x8956.
grub-install: info: adding a relocation entry for 0x8968.
grub-install: info: adding a relocation entry for 0x8974.
grub-install: info: adding a relocation entry for 0x8996.
grub-install: info: adding a relocation entry for 0x89bc.
grub-install: info: adding a relocation entry for 0x89d1.
grub-install: info: adding a relocation entry for 0x89f2.
grub-install: info: adding a relocation entry for 0x8a21.
grub-install: info: adding a relocation entry for 0x8a31.
grub-install: info: adding a relocation entry for 0x8a6b.
grub-install: info: adding a relocation entry for 0x8a75.
grub-install: info: adding a relocation entry for 0x8a87.
grub-install: info: adding a relocation entry for 0x8abf.
grub-install: info: adding a relocation entry for 0x8aee.
grub-install: info: adding a relocation entry for 0x8b08.
grub-install: info: adding a relocation entry for 0x8b3d.
grub-install: info: adding a relocation entry for 0x8b47.
grub-install: info: adding a relocation entry for 0x8b70.
grub-install: info: adding a relocation entry for 0x8c14.
grub-install: info: adding a relocation entry for 0x8c6d.
grub-install: info: adding a relocation entry for 0x8cbb.
grub-install: info: adding a relocation entry for 0x8ce1.
grub-install: info: adding a relocation entry for 0x8d35.
grub-install: info: adding a relocation entry for 0x8d55.
grub-install: info: adding a relocation entry for 0x8d5f.
grub-install: info: adding a relocation entry for 0x8d8d.
grub-install: info: adding a relocation entry for 0x8dc1.
grub-install: info: adding a relocation entry for 0x8df2.
grub-install: info: adding a relocation entry for 0x8e03.
grub-install: info: adding a relocation entry for 0x8e1a.
grub-install: info: adding a relocation entry for 0x8e5b.
grub-install: info: adding a relocation entry for 0x8e65.
grub-install: info: adding a relocation entry for 0x8e7b.
grub-install: info: adding a relocation entry for 0x8e8b.
grub-install: info: adding a relocation entry for 0x8e95.
grub-install: info: adding a relocation entry for 0x8ea4.
grub-install: info: adding a relocation entry for 0x8eb5.
grub-install: info: adding a relocation entry for 0x8ebf.
grub-install: info: adding a relocation entry for 0x8ed7.
grub-install: info: adding a relocation entry for 0x8eee.
grub-install: info: adding a relocation entry for 0x8ef8.
grub-install: info: adding a relocation entry for 0x8f02.
grub-install: info: adding a relocation entry for 0x8f0e.
grub-install: info: adding a relocation entry for 0x8f3a.
grub-install: info: adding a relocation entry for 0x8f4f.
grub-install: info: adding a relocation entry for 0x8f6a.
grub-install: info: adding a relocation entry for 0x8f84.
grub-install: info: adding a relocation entry for 0x8f8e.
grub-install: info: adding a relocation entry for 0x8fc2.
grub-install: info: adding a relocation entry for 0x8feb.
grub-install: info: adding a relocation entry for 0x8ffc.
grub-install: info: adding a relocation entry for 0x9022.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 288 bytes of a fixup block starting at 0x8000.
grub-install: info: adding a relocation entry for 0x90a2.
grub-install: info: adding a relocation entry for 0x90ca.
grub-install: info: adding a relocation entry for 0x90d6.
grub-install: info: adding a relocation entry for 0x90ea.
grub-install: info: adding a relocation entry for 0x910a.
grub-install: info: adding a relocation entry for 0x911a.
grub-install: info: adding a relocation entry for 0x914c.
grub-install: info: adding a relocation entry for 0x919c.
grub-install: info: adding a relocation entry for 0x91aa.
grub-install: info: adding a relocation entry for 0x91bf.
grub-install: info: adding a relocation entry for 0x91d7.
grub-install: info: adding a relocation entry for 0x91f3.
grub-install: info: adding a relocation entry for 0x9235.
grub-install: info: adding a relocation entry for 0x926c.
grub-install: info: adding a relocation entry for 0x9276.
grub-install: info: adding a relocation entry for 0x9280.
grub-install: info: adding a relocation entry for 0x928c.
grub-install: info: adding a relocation entry for 0x929b.
grub-install: info: adding a relocation entry for 0x92f0.
grub-install: info: adding a relocation entry for 0x92fc.
grub-install: info: adding a relocation entry for 0x9306.
grub-install: info: adding a relocation entry for 0x931a.
grub-install: info: adding a relocation entry for 0x9339.
grub-install: info: adding a relocation entry for 0x9343.
grub-install: info: adding a relocation entry for 0x934f.
grub-install: info: adding a relocation entry for 0x9363.
grub-install: info: adding a relocation entry for 0x9370.
grub-install: info: adding a relocation entry for 0x937c.
grub-install: info: adding a relocation entry for 0x9386.
grub-install: info: adding a relocation entry for 0x9395.
grub-install: info: adding a relocation entry for 0x93b5.
grub-install: info: adding a relocation entry for 0x93d0.
grub-install: info: adding a relocation entry for 0x93f1.
grub-install: info: adding a relocation entry for 0x9453.
grub-install: info: adding a relocation entry for 0x946e.
grub-install: info: adding a relocation entry for 0x94ad.
grub-install: info: adding a relocation entry for 0x94b7.
grub-install: info: adding a relocation entry for 0x94d8.
grub-install: info: adding a relocation entry for 0x94e4.
grub-install: info: adding a relocation entry for 0x94f3.
grub-install: info: adding a relocation entry for 0x9503.
grub-install: info: adding a relocation entry for 0x950d.
grub-install: info: adding a relocation entry for 0x951f.
grub-install: info: adding a relocation entry for 0x9531.
grub-install: info: adding a relocation entry for 0x9546.
grub-install: info: adding a relocation entry for 0x9550.
grub-install: info: adding a relocation entry for 0x9562.
grub-install: info: adding a relocation entry for 0x9572.
grub-install: info: adding a relocation entry for 0x9581.
grub-install: info: adding a relocation entry for 0x958d.
grub-install: info: adding a relocation entry for 0x95a0.
grub-install: info: adding a relocation entry for 0x95b1.
grub-install: info: adding a relocation entry for 0x95bd.
grub-install: info: adding a relocation entry for 0x95cf.
grub-install: info: adding a relocation entry for 0x95db.
grub-install: info: adding a relocation entry for 0x95e5.
grub-install: info: adding a relocation entry for 0x95f3.
grub-install: info: adding a relocation entry for 0x95fd.
grub-install: info: adding a relocation entry for 0x960d.
grub-install: info: adding a relocation entry for 0x961a.
grub-install: info: adding a relocation entry for 0x9656.
grub-install: info: adding a relocation entry for 0x9662.
grub-install: info: adding a relocation entry for 0x9674.
grub-install: info: adding a relocation entry for 0x967e.
grub-install: info: adding a relocation entry for 0x9698.
grub-install: info: adding a relocation entry for 0x96a4.
grub-install: info: adding a relocation entry for 0x96cb.
grub-install: info: adding a relocation entry for 0x96d5.
grub-install: info: adding a relocation entry for 0x96fd.
grub-install: info: adding a relocation entry for 0x9766.
grub-install: info: adding a relocation entry for 0x9774.
grub-install: info: adding a relocation entry for 0x9872.
grub-install: info: adding a relocation entry for 0x98b7.
grub-install: info: adding a relocation entry for 0x99d9.
grub-install: info: adding a relocation entry for 0x99ef.
grub-install: info: adding a relocation entry for 0x9a0d.
grub-install: info: adding a relocation entry for 0x9a25.
grub-install: info: adding a relocation entry for 0x9a41.
grub-install: info: adding a relocation entry for 0x9a62.
grub-install: info: adding a relocation entry for 0x9aea.
grub-install: info: adding a relocation entry for 0x9b4d.
grub-install: info: adding a relocation entry for 0x9b8d.
grub-install: info: adding a relocation entry for 0x9b9e.
grub-install: info: adding a relocation entry for 0x9bca.
grub-install: info: adding a relocation entry for 0x9bdb.
grub-install: info: adding a relocation entry for 0x9c19.
grub-install: info: adding a relocation entry for 0x9c80.
grub-install: info: adding a relocation entry for 0x9d3d.
grub-install: info: adding a relocation entry for 0x9d62.
grub-install: info: adding a relocation entry for 0x9d75.
grub-install: info: adding a relocation entry for 0x9d96.
grub-install: info: adding a relocation entry for 0x9db2.
grub-install: info: adding a relocation entry for 0x9dc5.
grub-install: info: adding a relocation entry for 0x9dfa.
grub-install: info: adding a relocation entry for 0x9e0c.
grub-install: info: adding a relocation entry for 0x9f77.
grub-install: info: adding a relocation entry for 0x9f99.
grub-install: info: adding a relocation entry for 0xa069.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 208 bytes of a fixup block starting at 0x9000.
grub-install: info: adding a relocation entry for 0xa114.
grub-install: info: adding a relocation entry for 0xa16e.
grub-install: info: adding a relocation entry for 0xa2e4.
grub-install: info: adding a relocation entry for 0xa30d.
grub-install: info: adding a relocation entry for 0xa443.
grub-install: info: adding a relocation entry for 0xa50e.
grub-install: info: adding a relocation entry for 0xa51d.
grub-install: info: adding a relocation entry for 0xa52f.
grub-install: info: adding a relocation entry for 0xa554.
grub-install: info: adding a relocation entry for 0xa56d.
grub-install: info: adding a relocation entry for 0xa585.
grub-install: info: adding a relocation entry for 0xa5b7.
grub-install: info: adding a relocation entry for 0xa5c9.
grub-install: info: adding a relocation entry for 0xa5da.
grub-install: info: adding a relocation entry for 0xa621.
grub-install: info: adding a relocation entry for 0xa683.
grub-install: info: adding a relocation entry for 0xa69f.
grub-install: info: adding a relocation entry for 0xa6b4.
grub-install: info: adding a relocation entry for 0xa6cd.
grub-install: info: adding a relocation entry for 0xa6f7.
grub-install: info: adding a relocation entry for 0xa707.
grub-install: info: adding a relocation entry for 0xa72b.
grub-install: info: adding a relocation entry for 0xa735.
grub-install: info: adding a relocation entry for 0xa768.
grub-install: info: adding a relocation entry for 0xa774.
grub-install: info: adding a relocation entry for 0xa78f.
grub-install: info: adding a relocation entry for 0xa7c2.
grub-install: info: adding a relocation entry for 0xa7d6.
grub-install: info: adding a relocation entry for 0xa801.
grub-install: info: adding a relocation entry for 0xa836.
grub-install: info: adding a relocation entry for 0xa85d.
grub-install: info: adding a relocation entry for 0xa86c.
grub-install: info: adding a relocation entry for 0xa8ab.
grub-install: info: adding a relocation entry for 0xa8bf.
grub-install: info: adding a relocation entry for 0xa8e1.
grub-install: info: adding a relocation entry for 0xa91b.
grub-install: info: adding a relocation entry for 0xa965.
grub-install: info: adding a relocation entry for 0xa976.
grub-install: info: adding a relocation entry for 0xa995.
grub-install: info: adding a relocation entry for 0xa9ec.
grub-install: info: adding a relocation entry for 0xaa0a.
grub-install: info: adding a relocation entry for 0xaa1b.
grub-install: info: adding a relocation entry for 0xaa30.
grub-install: info: adding a relocation entry for 0xaa59.
grub-install: info: adding a relocation entry for 0xaa94.
grub-install: info: adding a relocation entry for 0xaab0.
grub-install: info: adding a relocation entry for 0xaabc.
grub-install: info: adding a relocation entry for 0xaaca.
grub-install: info: adding a relocation entry for 0xaad6.
grub-install: info: adding a relocation entry for 0xaae6.
grub-install: info: adding a relocation entry for 0xaaf4.
grub-install: info: adding a relocation entry for 0xab00.
grub-install: info: adding a relocation entry for 0xab4c.
grub-install: info: adding a relocation entry for 0xab6e.
grub-install: info: adding a relocation entry for 0xab83.
grub-install: info: adding a relocation entry for 0xabaa.
grub-install: info: adding a relocation entry for 0xabb6.
grub-install: info: adding a relocation entry for 0xabc7.
grub-install: info: adding a relocation entry for 0xac00.
grub-install: info: adding a relocation entry for 0xac12.
grub-install: info: adding a relocation entry for 0xac2b.
grub-install: info: adding a relocation entry for 0xac35.
grub-install: info: adding a relocation entry for 0xac51.
grub-install: info: adding a relocation entry for 0xac85.
grub-install: info: adding a relocation entry for 0xacb4.
grub-install: info: adding a relocation entry for 0xacc3.
grub-install: info: adding a relocation entry for 0xace1.
grub-install: info: adding a relocation entry for 0xad1f.
grub-install: info: adding a relocation entry for 0xad2f.
grub-install: info: adding a relocation entry for 0xad3b.
grub-install: info: adding a relocation entry for 0xad4f.
grub-install: info: adding a relocation entry for 0xad61.
grub-install: info: adding a relocation entry for 0xad72.
grub-install: info: adding a relocation entry for 0xad9e.
grub-install: info: adding a relocation entry for 0xadb6.
grub-install: info: adding a relocation entry for 0xae4f.
grub-install: info: adding a relocation entry for 0xaec7.
grub-install: info: adding a relocation entry for 0xaf24.
grub-install: info: adding a relocation entry for 0xaf3d.
grub-install: info: adding a relocation entry for 0xaf4c.
grub-install: info: adding a relocation entry for 0xaf5b.
grub-install: info: adding a relocation entry for 0xaf97.
grub-install: info: adding a relocation entry for 0xafa7.
grub-install: info: adding a relocation entry for 0xafd4.
grub-install: info: adding a relocation entry for 0xaff8.
grub-install: info: adding a relocation entry for 0xb01b.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 184 bytes of a fixup block starting at 0xa000.
grub-install: info: adding a relocation entry for 0xb02f.
grub-install: info: adding a relocation entry for 0xb05d.
grub-install: info: adding a relocation entry for 0xb067.
grub-install: info: adding a relocation entry for 0xb08b.
grub-install: info: adding a relocation entry for 0xb0c1.
grub-install: info: adding a relocation entry for 0xb0ea.
grub-install: info: adding a relocation entry for 0xb0f9.
grub-install: info: adding a relocation entry for 0xb115.
grub-install: info: adding a relocation entry for 0xb124.
grub-install: info: adding a relocation entry for 0xb134.
grub-install: info: adding a relocation entry for 0xb14d.
grub-install: info: adding a relocation entry for 0xb163.
grub-install: info: adding a relocation entry for 0xb196.
grub-install: info: adding a relocation entry for 0xb1a0.
grub-install: info: adding a relocation entry for 0xb1b1.
grub-install: info: adding a relocation entry for 0xb1bd.
grub-install: info: adding a relocation entry for 0xb1ca.
grub-install: info: adding a relocation entry for 0xb23e.
grub-install: info: adding a relocation entry for 0xb250.
grub-install: info: adding a relocation entry for 0xb284.
grub-install: info: adding a relocation entry for 0xb29b.
grub-install: info: adding a relocation entry for 0xb2b6.
grub-install: info: adding a relocation entry for 0xb2e3.
grub-install: info: adding a relocation entry for 0xb2f3.
grub-install: info: adding a relocation entry for 0xb302.
grub-install: info: adding a relocation entry for 0xb31c.
grub-install: info: adding a relocation entry for 0xb389.
grub-install: info: adding a relocation entry for 0xb3be.
grub-install: info: adding a relocation entry for 0xb3cf.
grub-install: info: adding a relocation entry for 0xb40d.
grub-install: info: adding a relocation entry for 0xb417.
grub-install: info: adding a relocation entry for 0xb433.
grub-install: info: adding a relocation entry for 0xb456.
grub-install: info: adding a relocation entry for 0xb472.
grub-install: info: adding a relocation entry for 0xb495.
grub-install: info: adding a relocation entry for 0xb49f.
grub-install: info: adding a relocation entry for 0xb4fd.
grub-install: info: adding a relocation entry for 0xb559.
grub-install: info: adding a relocation entry for 0xb571.
grub-install: info: adding a relocation entry for 0xb57b.
grub-install: info: adding a relocation entry for 0xb58a.
grub-install: info: adding a relocation entry for 0xb59a.
grub-install: info: adding a relocation entry for 0xb5b3.
grub-install: info: adding a relocation entry for 0xb5d2.
grub-install: info: adding a relocation entry for 0xb5ed.
grub-install: info: adding a relocation entry for 0xb617.
grub-install: info: adding a relocation entry for 0xb65a.
grub-install: info: adding a relocation entry for 0xb6b4.
grub-install: info: adding a relocation entry for 0xb6c5.
grub-install: info: adding a relocation entry for 0xb6e6.
grub-install: info: adding a relocation entry for 0xb711.
grub-install: info: adding a relocation entry for 0xb75a.
grub-install: info: adding a relocation entry for 0xb77d.
grub-install: info: adding a relocation entry for 0xb7a2.
grub-install: info: adding a relocation entry for 0xb7af.
grub-install: info: adding a relocation entry for 0xb7dc.
grub-install: info: adding a relocation entry for 0xb7eb.
grub-install: info: adding a relocation entry for 0xb7fb.
grub-install: info: adding a relocation entry for 0xb80c.
grub-install: info: adding a relocation entry for 0xb818.
grub-install: info: adding a relocation entry for 0xb824.
grub-install: info: adding a relocation entry for 0xb83e.
grub-install: info: adding a relocation entry for 0xb855.
grub-install: info: adding a relocation entry for 0xb861.
grub-install: info: adding a relocation entry for 0xb86d.
grub-install: info: adding a relocation entry for 0xb87c.
grub-install: info: adding a relocation entry for 0xb89f.
grub-install: info: adding a relocation entry for 0xb8a9.
grub-install: info: adding a relocation entry for 0xb8b8.
grub-install: info: adding a relocation entry for 0xb8eb.
grub-install: info: adding a relocation entry for 0xb900.
grub-install: info: adding a relocation entry for 0xb92b.
grub-install: info: adding a relocation entry for 0xb93c.
grub-install: info: adding a relocation entry for 0xb94f.
grub-install: info: adding a relocation entry for 0xb959.
grub-install: info: adding a relocation entry for 0xb967.
grub-install: info: adding a relocation entry for 0xb971.
grub-install: info: adding a relocation entry for 0xb994.
grub-install: info: adding a relocation entry for 0xb9a1.
grub-install: info: adding a relocation entry for 0xb9ab.
grub-install: info: adding a relocation entry for 0xb9c2.
grub-install: info: adding a relocation entry for 0xb9d7.
grub-install: info: adding a relocation entry for 0xb9f2.
grub-install: info: adding a relocation entry for 0xba08.
grub-install: info: adding a relocation entry for 0xba54.
grub-install: info: adding a relocation entry for 0xba8f.
grub-install: info: adding a relocation entry for 0xbaac.
grub-install: info: adding a relocation entry for 0xbad0.
grub-install: info: adding a relocation entry for 0xbb03.
grub-install: info: adding a relocation entry for 0xbb17.
grub-install: info: adding a relocation entry for 0xbb28.
grub-install: info: adding a relocation entry for 0xbb51.
grub-install: info: adding a relocation entry for 0xbb7d.
grub-install: info: adding a relocation entry for 0xbb88.
grub-install: info: adding a relocation entry for 0xbbac.
grub-install: info: adding a relocation entry for 0xbbb7.
grub-install: info: adding a relocation entry for 0xbbc2.
grub-install: info: adding a relocation entry for 0xbc00.
grub-install: info: adding a relocation entry for 0xbc0e.
grub-install: info: adding a relocation entry for 0xbc18.
grub-install: info: adding a relocation entry for 0xbc3b.
grub-install: info: adding a relocation entry for 0xbc45.
grub-install: info: adding a relocation entry for 0xbc4f.
grub-install: info: adding a relocation entry for 0xbc65.
grub-install: info: adding a relocation entry for 0xbc81.
grub-install: info: adding a relocation entry for 0xbc92.
grub-install: info: adding a relocation entry for 0xbc9c.
grub-install: info: adding a relocation entry for 0xbcb7.
grub-install: info: adding a relocation entry for 0xbcc1.
grub-install: info: adding a relocation entry for 0xbccb.
grub-install: info: adding a relocation entry for 0xbce9.
grub-install: info: adding a relocation entry for 0xbd0d.
grub-install: info: adding a relocation entry for 0xbd18.
grub-install: info: translating the relocation section .rela.rodata.
grub-install: info: adding a relocation entry for 0xc000.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 240 bytes of a fixup block starting at 0xb000.
grub-install: info: adding a relocation entry for 0xc008.
grub-install: info: adding a relocation entry for 0xc010.
grub-install: info: adding a relocation entry for 0xc018.
grub-install: info: adding a relocation entry for 0xc020.
grub-install: info: adding a relocation entry for 0xc028.
grub-install: info: adding a relocation entry for 0xc030.
grub-install: info: adding a relocation entry for 0xc038.
grub-install: info: adding a relocation entry for 0xc040.
grub-install: info: adding a relocation entry for 0xc048.
grub-install: info: adding a relocation entry for 0xc050.
grub-install: info: adding a relocation entry for 0xc058.
grub-install: info: adding a relocation entry for 0xc060.
grub-install: info: adding a relocation entry for 0xc068.
grub-install: info: adding a relocation entry for 0xc070.
grub-install: info: adding a relocation entry for 0xc078.
grub-install: info: adding a relocation entry for 0xc080.
grub-install: info: adding a relocation entry for 0xc088.
grub-install: info: adding a relocation entry for 0xc090.
grub-install: info: adding a relocation entry for 0xc098.
grub-install: info: adding a relocation entry for 0xc0a0.
grub-install: info: adding a relocation entry for 0xc0a8.
grub-install: info: adding a relocation entry for 0xc0b0.
grub-install: info: adding a relocation entry for 0xc0b8.
grub-install: info: adding a relocation entry for 0xc0c0.
grub-install: info: adding a relocation entry for 0xc0c8.
grub-install: info: adding a relocation entry for 0xc0d0.
grub-install: info: adding a relocation entry for 0xc0d8.
grub-install: info: adding a relocation entry for 0xc0e0.
grub-install: info: adding a relocation entry for 0xc0e8.
grub-install: info: adding a relocation entry for 0xc0f0.
grub-install: info: adding a relocation entry for 0xc0f8.
grub-install: info: adding a relocation entry for 0xc100.
grub-install: info: adding a relocation entry for 0xc108.
grub-install: info: adding a relocation entry for 0xc110.
grub-install: info: adding a relocation entry for 0xc118.
grub-install: info: adding a relocation entry for 0xc120.
grub-install: info: adding a relocation entry for 0xc128.
grub-install: info: adding a relocation entry for 0xc130.
grub-install: info: adding a relocation entry for 0xc138.
grub-install: info: adding a relocation entry for 0xc140.
grub-install: info: adding a relocation entry for 0xc1c0.
grub-install: info: adding a relocation entry for 0xc1c8.
grub-install: info: adding a relocation entry for 0xc1d0.
grub-install: info: adding a relocation entry for 0xc1d8.
grub-install: info: adding a relocation entry for 0xc1e0.
grub-install: info: adding a relocation entry for 0xc1e8.
grub-install: info: adding a relocation entry for 0xc1f0.
grub-install: info: adding a relocation entry for 0xc1f8.
grub-install: info: adding a relocation entry for 0xc200.
grub-install: info: adding a relocation entry for 0xc208.
grub-install: info: adding a relocation entry for 0xc210.
grub-install: info: adding a relocation entry for 0xc218.
grub-install: info: translating the relocation section .rela.data.
grub-install: info: adding a relocation entry for 0xe1c0.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 120 bytes of a fixup block starting at 0xc000.
grub-install: info: adding a relocation entry for 0xe1d0.
grub-install: info: adding a relocation entry for 0xe1d8.
grub-install: info: adding a relocation entry for 0xe1e0.
grub-install: info: adding a relocation entry for 0xe1e8.
grub-install: info: adding a relocation entry for 0xe1f0.
grub-install: info: adding a relocation entry for 0xe250.
grub-install: info: adding a relocation entry for 0xe260.
grub-install: info: adding a relocation entry for 0xe268.
grub-install: info: adding a relocation entry for 0xe278.
grub-install: info: adding a relocation entry for 0xe280.
grub-install: info: adding a relocation entry for 0xe288.
grub-install: info: adding a relocation entry for 0xe290.
grub-install: info: adding a relocation entry for 0xe298.
grub-install: info: adding a relocation entry for 0xe2a0.
grub-install: info: adding a relocation entry for 0xe2f0.
grub-install: info: adding a relocation entry for 0xe2f8.
grub-install: info: adding a relocation entry for 0xe308.
grub-install: info: adding a relocation entry for 0xe370.
grub-install: info: adding a relocation entry for 0xe378.
grub-install: info: adding a relocation entry for 0xe3a0.
grub-install: info: adding a relocation entry for 0xe3d0.
grub-install: info: adding a relocation entry for 0xe3e0.
grub-install: info: adding a relocation entry for 0xe3e8.
grub-install: info: adding a relocation entry for 0xe410.
grub-install: info: adding a relocation entry for 0xe560.
grub-install: info: adding a relocation entry for 0xe580.
grub-install: info: adding a relocation entry for 0xe588.
grub-install: info: adding a relocation entry for 0xe598.
grub-install: info: adding a relocation entry for 0xe5a0.
grub-install: info: adding a relocation entry for 0xe5b0.
grub-install: info: adding a relocation entry for 0xe5b8.
grub-install: info: adding a relocation entry for 0xe5c8.
grub-install: info: adding a relocation entry for 0xe5d0.
grub-install: info: adding a relocation entry for 0xe5e0.
grub-install: info: adding a relocation entry for 0xe5e8.
grub-install: info: adding a relocation entry for 0xe5f8.
grub-install: info: adding a relocation entry for 0xe600.
grub-install: info: adding a relocation entry for 0xe610.
grub-install: info: adding a relocation entry for 0xe618.
grub-install: info: adding a relocation entry for 0xe628.
grub-install: info: adding a relocation entry for 0xe630.
grub-install: info: adding a relocation entry for 0xe640.
grub-install: info: adding a relocation entry for 0xe648.
grub-install: info: adding a relocation entry for 0xe658.
grub-install: info: adding a relocation entry for 0xe660.
grub-install: info: adding a relocation entry for 0xe670.
grub-install: info: adding a relocation entry for 0xe678.
grub-install: info: adding a relocation entry for 0xe688.
grub-install: info: adding a relocation entry for 0xe690.
grub-install: info: adding a relocation entry for 0xe6a0.
grub-install: info: adding a relocation entry for 0xe6a8.
grub-install: info: adding a relocation entry for 0xe6b8.
grub-install: info: adding a relocation entry for 0xe6c0.
grub-install: info: adding a relocation entry for 0xe6d0.
grub-install: info: adding a relocation entry for 0xe6d8.
grub-install: info: adding a relocation entry for 0xe6e8.
grub-install: info: adding a relocation entry for 0xe6f0.
grub-install: info: adding a relocation entry for 0xe700.
grub-install: info: adding a relocation entry for 0xe708.
grub-install: info: adding a relocation entry for 0xe718.
grub-install: info: adding a relocation entry for 0xe720.
grub-install: info: adding a relocation entry for 0xe730.
grub-install: info: adding a relocation entry for 0xe738.
grub-install: info: adding a relocation entry for 0xe748.
grub-install: info: adding a relocation entry for 0xe750.
grub-install: info: adding a relocation entry for 0xe760.
grub-install: info: adding a relocation entry for 0xe768.
grub-install: info: adding a relocation entry for 0xe778.
grub-install: info: adding a relocation entry for 0xe780.
grub-install: info: adding a relocation entry for 0xe790.
grub-install: info: adding a relocation entry for 0xe798.
grub-install: info: adding a relocation entry for 0xe7a8.
grub-install: info: adding a relocation entry for 0xe7b0.
grub-install: info: adding a relocation entry for 0xe7c0.
grub-install: info: adding a relocation entry for 0xe7c8.
grub-install: info: adding a relocation entry for 0xe7d8.
grub-install: info: adding a relocation entry for 0xe7e0.
grub-install: info: adding a relocation entry for 0xe7f0.
grub-install: info: adding a relocation entry for 0xe7f8.
grub-install: info: adding a relocation entry for 0xe808.
grub-install: info: adding a relocation entry for 0xe810.
grub-install: info: adding a relocation entry for 0xe820.
grub-install: info: adding a relocation entry for 0xe828.
grub-install: info: adding a relocation entry for 0xe838.
grub-install: info: adding a relocation entry for 0xe840.
grub-install: info: adding a relocation entry for 0xe850.
grub-install: info: adding a relocation entry for 0xe858.
grub-install: info: adding a relocation entry for 0xe868.
grub-install: info: adding a relocation entry for 0xe870.
grub-install: info: adding a relocation entry for 0xe880.
grub-install: info: adding a relocation entry for 0xe888.
grub-install: info: adding a relocation entry for 0xe898.
grub-install: info: adding a relocation entry for 0xe8a0.
grub-install: info: adding a relocation entry for 0xe8b0.
grub-install: info: adding a relocation entry for 0xe8b8.
grub-install: info: adding a relocation entry for 0xe8c8.
grub-install: info: adding a relocation entry for 0xe8d0.
grub-install: info: adding a relocation entry for 0xe8e0.
grub-install: info: adding a relocation entry for 0xe8e8.
grub-install: info: adding a relocation entry for 0xe8f8.
grub-install: info: adding a relocation entry for 0xe900.
grub-install: info: adding a relocation entry for 0xe910.
grub-install: info: adding a relocation entry for 0xe918.
grub-install: info: adding a relocation entry for 0xe928.
grub-install: info: adding a relocation entry for 0xe930.
grub-install: info: adding a relocation entry for 0xe940.
grub-install: info: adding a relocation entry for 0xe948.
grub-install: info: adding a relocation entry for 0xe958.
grub-install: info: adding a relocation entry for 0xe960.
grub-install: info: adding a relocation entry for 0xe970.
grub-install: info: adding a relocation entry for 0xe978.
grub-install: info: adding a relocation entry for 0xe988.
grub-install: info: adding a relocation entry for 0xe990.
grub-install: info: adding a relocation entry for 0xe9a0.
grub-install: info: adding a relocation entry for 0xe9a8.
grub-install: info: adding a relocation entry for 0xe9b8.
grub-install: info: adding a relocation entry for 0xe9c0.
grub-install: info: adding a relocation entry for 0xe9d0.
grub-install: info: adding a relocation entry for 0xe9d8.
grub-install: info: adding a relocation entry for 0xe9e8.
grub-install: info: adding a relocation entry for 0xe9f0.
grub-install: info: adding a relocation entry for 0xea00.
grub-install: info: adding a relocation entry for 0xea08.
grub-install: info: adding a relocation entry for 0xea18.
grub-install: info: adding a relocation entry for 0xea20.
grub-install: info: adding a relocation entry for 0xea30.
grub-install: info: adding a relocation entry for 0xea38.
grub-install: info: adding a relocation entry for 0xea48.
grub-install: info: adding a relocation entry for 0xea50.
grub-install: info: adding a relocation entry for 0xea60.
grub-install: info: adding a relocation entry for 0xea68.
grub-install: info: adding a relocation entry for 0xea78.
grub-install: info: adding a relocation entry for 0xea80.
grub-install: info: adding a relocation entry for 0xea90.
grub-install: info: adding a relocation entry for 0xea98.
grub-install: info: adding a relocation entry for 0xeaa8.
grub-install: info: adding a relocation entry for 0xeab0.
grub-install: info: adding a relocation entry for 0xeac0.
grub-install: info: adding a relocation entry for 0xeac8.
grub-install: info: adding a relocation entry for 0xead8.
grub-install: info: adding a relocation entry for 0xeae0.
grub-install: info: adding a relocation entry for 0xeaf0.
grub-install: info: adding a relocation entry for 0xeaf8.
grub-install: info: adding a relocation entry for 0xeb08.
grub-install: info: adding a relocation entry for 0xeb10.
grub-install: info: adding a relocation entry for 0xeb20.
grub-install: info: adding a relocation entry for 0xeb28.
grub-install: info: adding a relocation entry for 0xeb38.
grub-install: info: adding a relocation entry for 0xeb40.
grub-install: info: adding a relocation entry for 0xeb50.
grub-install: info: adding a relocation entry for 0xeb58.
grub-install: info: adding a relocation entry for 0xeb68.
grub-install: info: adding a relocation entry for 0xeb70.
grub-install: info: adding a relocation entry for 0xeb80.
grub-install: info: adding a relocation entry for 0xeb88.
grub-install: info: adding a relocation entry for 0xeb98.
grub-install: info: adding a relocation entry for 0xeba0.
grub-install: info: adding a relocation entry for 0xebb0.
grub-install: info: adding a relocation entry for 0xebb8.
grub-install: info: adding a relocation entry for 0xebc8.
grub-install: info: adding a relocation entry for 0xebd0.
grub-install: info: adding a relocation entry for 0xebe0.
grub-install: info: adding a relocation entry for 0xebe8.
grub-install: info: adding a relocation entry for 0xebf8.
grub-install: info: adding a relocation entry for 0xec00.
grub-install: info: adding a relocation entry for 0xec10.
grub-install: info: adding a relocation entry for 0xec18.
grub-install: info: adding a relocation entry for 0xec28.
grub-install: info: adding a relocation entry for 0xec30.
grub-install: info: adding a relocation entry for 0xec40.
grub-install: info: adding a relocation entry for 0xec48.
grub-install: info: adding a relocation entry for 0xec58.
grub-install: info: adding a relocation entry for 0xec60.
grub-install: info: adding a relocation entry for 0xec70.
grub-install: info: adding a relocation entry for 0xec78.
grub-install: info: adding a relocation entry for 0xec88.
grub-install: info: adding a relocation entry for 0xec90.
grub-install: info: adding a relocation entry for 0xeca0.
grub-install: info: adding a relocation entry for 0xeca8.
grub-install: info: adding a relocation entry for 0xecb8.
grub-install: info: adding a relocation entry for 0xecc0.
grub-install: info: adding a relocation entry for 0xecd0.
grub-install: info: adding a relocation entry for 0xecd8.
grub-install: info: adding a relocation entry for 0xece8.
grub-install: info: adding a relocation entry for 0xecf0.
grub-install: info: adding a relocation entry for 0xed00.
grub-install: info: adding a relocation entry for 0xed08.
grub-install: info: adding a relocation entry for 0xed18.
grub-install: info: adding a relocation entry for 0xed20.
grub-install: info: adding a relocation entry for 0xed30.
grub-install: info: adding a relocation entry for 0xed38.
grub-install: info: adding a relocation entry for 0xed48.
grub-install: info: adding a relocation entry for 0xed50.
grub-install: info: adding a relocation entry for 0xed60.
grub-install: info: adding a relocation entry for 0xed68.
grub-install: info: adding a relocation entry for 0xed78.
grub-install: info: adding a relocation entry for 0xed80.
grub-install: info: adding a relocation entry for 0xed90.
grub-install: info: adding a relocation entry for 0xed98.
grub-install: info: adding a relocation entry for 0xeda8.
grub-install: info: adding a relocation entry for 0xedb0.
grub-install: info: adding a relocation entry for 0xedc0.
grub-install: info: adding a relocation entry for 0xedc8.
grub-install: info: adding a relocation entry for 0xedd8.
grub-install: info: adding a relocation entry for 0xede0.
grub-install: info: adding a relocation entry for 0xedf0.
grub-install: info: adding a relocation entry for 0xedf8.
grub-install: info: adding a relocation entry for 0xee08.
grub-install: info: adding a relocation entry for 0xee10.
grub-install: info: adding a relocation entry for 0xee20.
grub-install: info: adding a relocation entry for 0xee28.
grub-install: info: adding a relocation entry for 0xee38.
grub-install: info: adding a relocation entry for 0xee40.
grub-install: info: adding a relocation entry for 0xee50.
grub-install: info: adding a relocation entry for 0xee58.
grub-install: info: adding a relocation entry for 0xee68.
grub-install: info: adding a relocation entry for 0xee70.
grub-install: info: adding a relocation entry for 0xee80.
grub-install: info: adding a relocation entry for 0xee88.
grub-install: info: adding a relocation entry for 0xee98.
grub-install: info: adding a relocation entry for 0xeea0.
grub-install: info: adding a relocation entry for 0xeeb0.
grub-install: info: adding a relocation entry for 0xeeb8.
grub-install: info: adding a relocation entry for 0xeec8.
grub-install: info: adding a relocation entry for 0xeed0.
grub-install: info: adding a relocation entry for 0xeee0.
grub-install: info: adding a relocation entry for 0xeee8.
grub-install: info: adding a relocation entry for 0xeef8.
grub-install: info: adding a relocation entry for 0xef00.
grub-install: info: adding a relocation entry for 0xef10.
grub-install: info: adding a relocation entry for 0xef18.
grub-install: info: adding a relocation entry for 0xef28.
grub-install: info: adding a relocation entry for 0xef30.
grub-install: info: adding a relocation entry for 0xef40.
grub-install: info: adding a relocation entry for 0xef48.
grub-install: info: adding a relocation entry for 0xef58.
grub-install: info: adding a relocation entry for 0xef60.
grub-install: info: adding a relocation entry for 0xef70.
grub-install: info: adding a relocation entry for 0xef78.
grub-install: info: adding a relocation entry for 0xef88.
grub-install: info: adding a relocation entry for 0xef90.
grub-install: info: adding a relocation entry for 0xefa0.
grub-install: info: adding a relocation entry for 0xefa8.
grub-install: info: adding a relocation entry for 0xefb8.
grub-install: info: adding a relocation entry for 0xefc0.
grub-install: info: adding a relocation entry for 0xefd0.
grub-install: info: adding a relocation entry for 0xefd8.
grub-install: info: adding a relocation entry for 0xefe8.
grub-install: info: adding a relocation entry for 0xeff0.
grub-install: info: adding a relocation entry for 0xf000.
grub-install: info: adding a padding fixup entry.
grub-install: info: adding a padding fixup entry.
grub-install: info: writing 512 bytes of a fixup block starting at 0xe000.
grub-install: info: adding a relocation entry for 0xf008.
grub-install: info: adding a relocation entry for 0xf018.
grub-install: info: adding a relocation entry for 0xf020.
grub-install: info: adding a relocation entry for 0xf030.
grub-install: info: adding a relocation entry for 0xf038.
grub-install: info: adding a relocation entry for 0xf048.
grub-install: info: adding a relocation entry for 0xf050.
grub-install: info: adding a relocation entry for 0xf060.
grub-install: info: adding a relocation entry for 0xf068.
grub-install: info: adding a relocation entry for 0xf078.
grub-install: info: adding a relocation entry for 0xf080.
grub-install: info: adding a relocation entry for 0xf090.
grub-install: info: adding a relocation entry for 0xf098.
grub-install: info: adding a relocation entry for 0xf0a8.
grub-install: info: adding a relocation entry for 0xf0b0.
grub-install: info: adding a relocation entry for 0xf0c0.
grub-install: info: adding a relocation entry for 0xf0c8.
grub-install: info: adding a relocation entry for 0xf0d8.
grub-install: info: adding a relocation entry for 0xf0e0.
grub-install: info: adding a relocation entry for 0xf0f0.
grub-install: info: adding a relocation entry for 0xf0f8.
grub-install: info: adding a relocation entry for 0xf108.
grub-install: info: adding a relocation entry for 0xf110.
grub-install: info: adding a relocation entry for 0xf120.
grub-install: info: adding a relocation entry for 0xf128.
grub-install: info: adding a relocation entry for 0xf138.
grub-install: info: adding a relocation entry for 0xf140.
grub-install: info: adding a relocation entry for 0xf150.
grub-install: info: adding a relocation entry for 0xf158.
grub-install: info: adding a relocation entry for 0xf168.
grub-install: info: adding a relocation entry for 0xf170.
grub-install: info: adding a relocation entry for 0xf180.
grub-install: info: adding a relocation entry for 0xf188.
grub-install: info: adding a relocation entry for 0xf198.
grub-install: info: adding a relocation entry for 0xf1a0.
grub-install: info: adding a relocation entry for 0xf1b0.
grub-install: info: adding a relocation entry for 0xf1b8.
grub-install: info: adding a relocation entry for 0xf1c8.
grub-install: info: adding a relocation entry for 0xf1d0.
grub-install: info: adding a relocation entry for 0xf1e0.
grub-install: info: adding a relocation entry for 0xf1e8.
grub-install: info: adding a relocation entry for 0xf1f8.
grub-install: info: adding a relocation entry for 0xf200.
grub-install: info: adding a relocation entry for 0xf210.
grub-install: info: adding a relocation entry for 0xf218.
grub-install: info: adding a relocation entry for 0xf228.
grub-install: info: adding a relocation entry for 0xf230.
grub-install: info: adding a relocation entry for 0xf240.
grub-install: info: adding a relocation entry for 0xf248.
grub-install: info: adding a relocation entry for 0xf258.
grub-install: info: adding a relocation entry for 0xf260.
grub-install: info: adding a relocation entry for 0xf270.
grub-install: info: adding a relocation entry for 0xf278.
grub-install: info: adding a relocation entry for 0xf288.
grub-install: info: adding a relocation entry for 0xf290.
grub-install: info: adding a relocation entry for 0xf2a0.
grub-install: info: adding a relocation entry for 0xf2a8.
grub-install: info: adding a relocation entry for 0xf2b8.
grub-install: info: adding a relocation entry for 0xf2c0.
grub-install: info: adding a relocation entry for 0xf2d0.
grub-install: info: adding a relocation entry for 0xf2d8.
grub-install: info: adding a relocation entry for 0xf2e8.
grub-install: info: adding a relocation entry for 0xf2f0.
grub-install: info: adding a relocation entry for 0xf300.
grub-install: info: adding a relocation entry for 0xf308.
grub-install: info: adding a relocation entry for 0xf318.
grub-install: info: adding a relocation entry for 0xf320.
grub-install: info: adding a relocation entry for 0xf330.
grub-install: info: adding a relocation entry for 0xf338.
grub-install: info: adding a relocation entry for 0xf348.
grub-install: info: adding a relocation entry for 0xf350.
grub-install: info: adding a relocation entry for 0xf360.
grub-install: info: adding a relocation entry for 0xf368.
grub-install: info: adding a relocation entry for 0xf378.
grub-install: info: adding a relocation entry for 0xf380.
grub-install: info: adding a relocation entry for 0xf390.
grub-install: info: adding a relocation entry for 0xf398.
grub-install: info: adding a relocation entry for 0xf3a8.
grub-install: info: adding a relocation entry for 0xf3b0.
grub-install: info: adding a relocation entry for 0xf3c0.
grub-install: info: adding a relocation entry for 0xf3c8.
grub-install: info: adding a relocation entry for 0xf3d8.
grub-install: info: adding a relocation entry for 0xf3e0.
grub-install: info: adding a relocation entry for 0xf3f0.
grub-install: info: adding a relocation entry for 0xf3f8.
grub-install: info: adding a relocation entry for 0xf408.
grub-install: info: adding a relocation entry for 0xf410.
grub-install: info: adding a relocation entry for 0xf420.
grub-install: info: adding a relocation entry for 0xf428.
grub-install: info: adding a relocation entry for 0xf438.
grub-install: info: adding a relocation entry for 0xf440.
grub-install: info: adding a relocation entry for 0xf450.
grub-install: info: adding a relocation entry for 0xf458.
grub-install: info: adding a relocation entry for 0xf468.
grub-install: info: adding a relocation entry for 0xf470.
grub-install: info: adding a relocation entry for 0xf480.
grub-install: info: adding a relocation entry for 0xf488.
grub-install: info: adding a relocation entry for 0xf498.
grub-install: info: adding a relocation entry for 0xf4a0.
grub-install: info: adding a relocation entry for 0xf4b0.
grub-install: info: adding a relocation entry for 0xf4b8.
grub-install: info: adding a relocation entry for 0xf4c8.
grub-install: info: adding a relocation entry for 0xf4d0.
grub-install: info: adding a relocation entry for 0xf4e0.
grub-install: info: adding a relocation entry for 0xf4e8.
grub-install: info: adding a relocation entry for 0xf4f8.
grub-install: info: adding a relocation entry for 0xf500.
grub-install: info: adding a relocation entry for 0xf510.
grub-install: info: adding a relocation entry for 0xf518.
grub-install: info: adding a relocation entry for 0xf528.
grub-install: info: adding a relocation entry for 0xf530.
grub-install: info: adding a relocation entry for 0xf540.
grub-install: info: adding a relocation entry for 0xf548.
grub-install: info: adding a relocation entry for 0xf558.
grub-install: info: adding a relocation entry for 0xf560.
grub-install: info: adding 256 padding fixup entries.
grub-install: info: writing 752 bytes of a fixup block starting at 0xf000.
grub-install: info: reading /usr/lib/grub/x86_64-efi/fshelp.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/ext2.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/search_fs_uuid.mod.
grub-install: info: reading /boot/grub/x86_64-efi/load.cfg.
grub-install: info: kernel_img=0x55934c956dd0, kernel_size=0x1b000.
grub-install: info: the core size is 0x20698.
grub-install: info: writing 0x23000 bytes.
grub-install: info: copying `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' -> `/boot/efi/EFI/neon/grubx64.efi'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi/EFI/neon/shimx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi/EFI/neon/mmx64.efi'.
grub-install: info: copying `/usr/lib/shim/BOOTX64.CSV' -> `/boot/efi/EFI/neon/BOOTX64.CSV'.
grub-install: info: copying `/boot/grub/x86_64-efi/load.cfg' -> `/boot/efi/EFI/neon/grub.cfg'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi/EFI/Boot/bootx64.efi'.
grub-install: info: copying `/usr/lib/shim/fbx64.efi' -> `/boot/efi/EFI/Boot/fbx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi/EFI/Boot/mmx64.efi'.
grub-install: info: Registering with EFI: distributor = `neon', path = `\EFI\neon\shimx64.efi', ESP at hostdisk//dev/sda,gpt2.
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: setting EFI variable Boot0001.
grub-install: info: skipping unnecessary update of EFI variable Boot0001.
grub-install: info: setting EFI variable BootOrder.
grub-install: info: skipping unnecessary update of EFI variable BootOrder.
Installation finished. No error reported.
asus@asus:~$
je n'ai pas le début, mémoire tampon de Konsole trop petite ?????
Dernière modification par freex (Le 29/10/2021, à 12:14)
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#46 Le 29/10/2021, à 12:09
- freex
Re : [résolu] Récupération de grub par KDE neon
Bonjour,
Pour info > Astuce/Tutoriel : « message perdu, déconnecté du forum »
Merci, pour un prochain message peut-être
La page fait allusion à une case à cocher que je ne vois pas
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#47 Le 29/10/2021, à 12:10
- geole
Re : [résolu] Récupération de grub par KDE neon
Bonjour
Tu en profiteras pour refaire un boot-info après avoir fait la commande de nany si le problème n'est pas résolu
Cela permettra d'avoir le contenu de
- La nvram
- De tous les fichiers de configuration GRUB EFI
- De tous les fichiers de configuration GRUB LEGACY
J'en profite pour rappeler que lorsqu'on dispose d'un ordinateur EFI et qu'on a plusieurs instances à faire booter , on ne sert plus du grub qu'il devient inutile d'installer mais du logiciel REFIND!
sudo apt install refind
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
#48 Le 29/10/2021, à 12:21
- nany
Re : [résolu] Récupération de grub par KDE neon
je n'ai pas le début, mémoire tampon de Konsole trop petite ?????
Ce n’est pas grave, c’est juste la fin qui est intéressante :
grub-install: info: copying `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' -> `/boot/efi/EFI/neon/grubx64.efi'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi/EFI/neon/shimx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi/EFI/neon/mmx64.efi'.
grub-install: info: copying `/usr/lib/shim/BOOTX64.CSV' -> `/boot/efi/EFI/neon/BOOTX64.CSV'.
grub-install: info: copying `/boot/grub/x86_64-efi/load.cfg' -> `/boot/efi/EFI/neon/grub.cfg'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi/EFI/Boot/bootx64.efi'.
grub-install: info: copying `/usr/lib/shim/fbx64.efi' -> `/boot/efi/EFI/Boot/fbx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi/EFI/Boot/mmx64.efi'.
grub-install: info: Registering with EFI: distributor = `neon', path = `\EFI\neon\shimx64.efi', ESP at hostdisk//dev/sda,gpt2.
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: setting EFI variable Boot0001.
grub-install: info: skipping unnecessary update of EFI variable Boot0001.
grub-install: info: setting EFI variable BootOrder.
grub-install: info: skipping unnecessary update of EFI variable BootOrder.
Installation finished. No error reported.
On y voit que les fichiers ont bien été recopiés.
...J'ai écrasé Kubuntu Rescue par NEON
maintenant j'ai un grub NEON mais impossible de le modifier car problème à l'installation de NEON ...et donc cette nouvelle NEON ne se lance pas, j'ai juste le grub
J’ai du mal à bien visualiser la nouvelle situation. Refais un rapport boot-info pour qu’on y voit plus clair.
Hors ligne
#49 Le 29/10/2021, à 12:52
- freex
Re : [résolu] Récupération de grub par KDE neon
boot-info-4ppa130 [20211029_1347]
============================== Boot Info Summary ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda2: __________________________________________________________________________
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/bootx64.efi /efi/Boot/fbx64.efi
/efi/Boot/mmx64.efi /efi/neon/grubx64.efi
/efi/neon/mmx64.efi /efi/neon/shimx64.efi
/efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi
/efi/ubuntu/shimx64.efi /efi/neon/grub.cfg
/efi/ubuntu/grub.cfg /efi/Microsoft/Boot/bootmgfw.efi
/efi/Microsoft/Boot/bootmgr.efi
/efi/Microsoft/Boot/memtest.efi
sda3: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
sda4: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 8 or 10
Boot files: /Windows/System32/winload.exe
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda6: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 8 or 10
Boot files: /Windows/System32/winload.exe
sda7: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda8: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: KDE neon User - Plasma 25th Anniversary Edition
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
sda9: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 21.10
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
sda10: _________________________________________________________________________
File system: ntfs
Boot sector type: Unknown
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sda11: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda12: _________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: KDE neon User Edition 5.21
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
sdb1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sdb2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 8 or 10
Boot files: /bootmgr /Windows/System32/winload.exe
sdb3: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sdb4: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sdb5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows 8/2012: NTFS
Boot sector info: According to the info in the boot sector, sdb5 starts
at sector 2048.
Operating System:
Boot files:
================================ 6 OS detected =================================
OS#1: L'OS actuellement utilisé - KDE neon User - Plasma 25th Anniversary Edition CurrentSession on sda8
OS#2: KDE neon User Edition 5.21 (20.04) on sda12
OS#3: Ubuntu 21.10 on sda9
OS#4: Windows 8 or 10 on sda4
OS#5: Windows 8 or 10 on sda6
OS#6: Windows 8 or 10 on sdb2
============================ Architecture/Host Info ============================
CPU architecture: 64-bit
BOOT_IMAGE of the installed session in use:
/boot/vmlinuz-5.11.0-38-generic root=UUID=7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d ro quiet splash
===================================== UEFI =====================================
BIOS is EFI-compatible, and is setup in EFI-mode for this installed-session.
SecureBoot disabled.
efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,000F,000C,0012,0000
Boot0000 Windows Boot Manager HD(2,GPT,76740ca4-4b7a-41ae-afa8-5c0e96c9d6c7,0xfa000,0x32000)/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.}....................
Boot0001* neon HD(2,GPT,76740ca4-4b7a-41ae-afa8-5c0e96c9d6c7,0xfa000,0x32000)/File(\EFI\neon\shimx64.efi)
Boot000C* Hard Drive BBS(HD,,0x0)AMGOAMNO........o.S.T.1.0.0.0.L.M.0.2.4. .H.N.-.M.1.0.1.M.B.B....................A...........................>..Gd-.;.A..MQ..L.2.S.T.T.9.J.C.A.0.3.7.2.5.7. . . . . . ......AMBO
Boot000F* ubuntu HD(2,GPT,76740ca4-4b7a-41ae-afa8-5c0e96c9d6c7,0xfa000,0x32000)/File(\EFI\ubuntu\shimx64.efi)
Boot0012* ubuntu HD(2,GPT,76740ca4-4b7a-41ae-afa8-5c0e96c9d6c7,0xfa000,0x32000)/File(EFI\Ubuntu\grubx64.efi)
728124f6ec8e22fbdbe7034812c81b95 sda2/Boot/bootx64.efi
85fa9d77b929ec4231aba29476574eb6 sda2/Boot/fbx64.efi
469e608783843a701d172242f016c79c sda2/Boot/mmx64.efi
fa1bf1a7f90a852abe0bdbd089b7f1b0 sda2/neon/grubx64.efi
469e608783843a701d172242f016c79c sda2/neon/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95 sda2/neon/shimx64.efi
eca92010a3d461e0f52639d330f3f43d sda2/ubuntu/grubx64.efi
fdafb5eece6caeccb788c946a28e6872 sda2/ubuntu/mmx64.efi
728124f6ec8e22fbdbe7034812c81b95 sda2/ubuntu/shimx64.efi
3c7051eaea9d33eaba1b890ff7fd62c9 sda2/Microsoft/Boot/bootmgfw.efi
1f55c287e1da1ce90c54793690800edc sda2/Microsoft/Boot/bootmgr.efi
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
sda : is-GPT, no-BIOSboot, has---ESP, not-usb, not-mmc, has-os, 2048 sectors * 512 bytes
sdb : notGPT, no-BIOSboot, has-noESP, not-usb, not-mmc, has-os, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
sda8 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ng, update-grub, farbios
sda1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sda2 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sda4 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sda5 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sda6 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda7 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda9 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, farbios
sda10 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sda12 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ng, update-grub, farbios
sdb1 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far
sdb2 : is-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sdb3 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
sdb5 : no-os, 32, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, farbios
Partitions info (2/3): _________________________________________________________
sda8 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda1 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
sda2 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda4 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot
sda5 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
sda6 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, no-bmgr, notwinboot
sda7 : isnotESP, part-has-no-fstab, no-nt, no-winload, recovery-or-hidden, no-bmgr, notwinboot
sda9 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda10 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sda12 : isnotESP, fstab-has-goodEFI, 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, bootmgr, is-winboot
sdb2 : isnotESP, part-has-no-fstab, no-nt, haswinload, no-recov-nor-hid, bootmgr, notwinboot
sdb3 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
sdb5 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot
Partitions info (3/3): _________________________________________________________
sda8 : not-sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, customized, sda
sda1 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda2 : 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, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda7 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda9 : not-sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, customized, sda
sda10 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sda
sda12 : not-sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, customized, sda
sdb1 : not-sepboot, no-boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, std-grub.d, sdb
sdb2 : 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
sdb5 : 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 sda: 223.58 GiB, 240057409536 bytes, 468862128 sectors
Disk identifier: 5D1878F5-1937-4AB8-9752-E4EFE5B23438
Start End Sectors Size Type
sda1 2048 1023999 1021952 499M Windows recovery environment
sda2 1024000 1228799 204800 100M EFI System
sda3 1228800 1261567 32768 16M Microsoft reserved
sda4 1261568 164680865 163419298 77.9G Microsoft basic data
sda5 164683776 165890047 1206272 589M Windows recovery environment
sda6 165890048 244552782 78662735 37.5G Microsoft basic data
sda7 244555776 245762047 1206272 589M Windows recovery environment
sda8 245762048 307986431 62224384 29.7G Linux filesystem
sda9 307986432 370642943 62656512 29.9G Microsoft basic data
sda10 442494976 452259839 9764864 4.7G Microsoft basic data
sda11 452259840 468860927 16601088 7.9G Linux swap
sda12 370642944 391294975 20652032 9.9G Linux filesystem
Partition table entries are not in disk order.
Disk sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk identifier: 0x00016da2
Boot Start End Sectors Size Id Type
sdb1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT
sdb2 1026048 200706047 199680000 95.2G 7 HPFS/NTFS/exFAT
sdb3 200706048 1511426047 1310720000 625G 7 HPFS/NTFS/exFAT
sdb4 1511426048 1953521663 442095616 210.8G f W95 Ext'd (LBA)
sdb5 1511428096 1953521663 442093568 210.8G 7 HPFS/NTFS/exFAT
parted -lm (filtered): _________________________________________________________
sda:240GB:scsi:512:512:gpt:ATA KINGSTON SA400S3:;
1:1049kB:524MB:523MB:ntfs:Basic data partition:hidden, diag;
2:524MB:629MB:105MB:fat32:EFI system partition:boot, esp;
3:629MB:646MB:16.8MB::Microsoft reserved partition:msftres;
4:646MB:84.3GB:83.7GB:ntfs:Basic data partition:msftdata;
5:84.3GB:84.9GB:618MB:ntfs::hidden, diag;
6:84.9GB:125GB:40.3GB:ntfs:Basic data partition:msftdata;
7:125GB:126GB:618MB:ntfs::hidden, diag;
8:126GB:158GB:31.9GB:ext4::;
9:158GB:190GB:32.1GB:ext4:Basic data partition:msftdata;
12:190GB:200GB:10.6GB:ext4::;
10:227GB:232GB:5000MB:ntfs::msftdata;
11:232GB:240GB:8500MB:linux-swap(v1)::swap;
sdb:1000GB:scsi:512:4096:msdos:ATA ST1000LM024 HN-M:;
1:1049kB:525MB:524MB:ntfs::boot;
2:525MB:103GB:102GB:ntfs::;
3:103GB:774GB:671GB:ntfs::;
4:774GB:1000GB:226GB:::lba;
5:774GB:1000GB:226GB:ntfs::;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 ntfs F8CCB3CACCB38204 3c5c04e8-56b8-4ef6-b33d-b215430aeb18 Récupération Basic data partition
├─sda2 vfat F2B4-5224 76740ca4-4b7a-41ae-afa8-5c0e96c9d6c7 EFI system partition
├─sda3 3e966130-dd7c-49c2-8104-3e00a047a7a7 Microsoft reserved partition
├─sda4 ntfs 6E8AF8EA8AF8B027 81b9718a-9177-4efb-b561-9318132a93ee Win.10.GPT1 Basic data partition
├─sda5 ntfs 342AA14B2AA10B46 54725b9e-68b3-475a-abe8-4cf7324ed5c8
├─sda6 ntfs 64D82434D82406C0 063719e6-6417-4bad-b92d-87c59220c759 Win.10.GPT2 Basic data partition
├─sda7 ntfs 24D8713DD8710DF4 fb34d85f-4463-4dc0-bff1-cb93ec23d9de
├─sda8 ext4 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d d127af3c-e7d9-40a3-813b-64dc0ff1819d
├─sda9 ext4 aa9a050e-bf13-494c-8762-5f05012ddb85 64b6a977-d35d-400d-b241-5414fd5752d0 Kub.21.04.A9 Basic data partition
├─sda10 ntfs 535D7BE603D9AC2E 18461363-42a6-494c-b37f-70bd7ec8e734 THUMBS
├─sda11 swap 1886f2c9-76a2-444e-9b32-a1ef35e06afb 0add3ba1-f3a1-4847-91b8-d09f20a88141
└─sda12 ext4 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b f03fcb4a-6c20-43ab-806a-4ac0b2f1a112 Kub.rescue
sdb
├─sdb1 ntfs C6EC7883EC787013 00016da2-01 EFI.sys
├─sdb2 ntfs 54B8B5A1B8B58252 00016da2-02 Win.10.DOS
├─sdb3 ntfs FEFE8D31FE8CE2EF 00016da2-03 Ood
├─sdb4 00016da2-04
└─sdb5 ntfs 2ADCEB11DCEAD5DB 00016da2-05 OSv
df (filtered): _________________________________________________________________
Avail Use% Mounted on
sda10 3.9G 17% /media/asu/Thumbs
sda12 2.5G 69% /mnt/boot-sav/sda12
sda1 56.2M 89% /mnt/boot-sav/sda1
sda4 39G 50% /mnt/boot-sav/sda4
sda5 88.5M 85% /mnt/boot-sav/sda5
sda6 15.4G 59% /mnt/boot-sav/sda6
sda7 88.4M 85% /mnt/boot-sav/sda7
sda8 17.4G 35% /
sda9 8.6G 66% /mnt/boot-sav/sda9
sdb1 142.9M 71% /mnt/boot-sav/sdb1
sdb2 58.1G 39% /mnt/boot-sav/sdb2
sdb3 193.1G 69% /media/asu/Ood
sdb5 54.8G 74% /media/asu/OSv
Mount options: __________________________________________________________________
sda10 rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
sda12 rw,relatime
sda1 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,user_id=0,group_id=0,allow_other,blksize=4096
sda7 rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sda8 rw,noatime,discard
sda9 rw,relatime
sdb1 rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdb2 rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096
sdb3 rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
sdb5 rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096
====================== sda2/efi/neon/grub.cfg (filtered) =======================
search.fs_uuid 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d root hd0,gpt8
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
===================== sda2/efi/ubuntu/grub.cfg (filtered) ======================
search.fs_uuid 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b root hd0,gpt12
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
====================== sda8/boot/grub/grub.cfg (filtered) ======================
Neon 20.04 [P8] 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Neon GNU/Linux, with Linux 5.10.0-14-generic (on sda12) 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Neon GNU/Linux, with Linux 5.4.0-70-generic (on sda12) 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Neon GNU/Linux, with Linux 5.4.0-70-generic (on sda12) 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Ubuntu Rescue (on sda12) 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Kubuntu 21.10 [P9] aa9a050e-bf13-494c-8762-5f05012ddb85
### END /etc/grub.d/30_os-prober_proxy ###
Kubuntu RESCUE [P12] 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Windows BM [P2] osprober-efi-F2B4-5224
========================== sda8/etc/fstab (filtered) ===========================
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=F2B4-5224 /boot/efi vfat defaults,noatime 0 2
UUID=7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d / ext4 defaults,noatime,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=54B8B5A1B8B58252 /media/asu/Win.10.DOS ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=6E8AF8EA8AF8B027 /media/asu/Win.10.GPT1 ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=64D82434D82406C0 /media/asu/Win.10.GPT2 ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=FEFE8D31FE8CE2EF /media/asu/Ood ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
UUID=2ADCEB11DCEAD5DB /media/asu/OSv ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
UUID=535D7BE603D9AC2E /media/asu/Thumbs ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
======================= sda8/etc/default/grub (filtered) =======================
GRUB_DEFAULT="saved"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_SAVEDEFAULT="true"
==================== sda8: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
137.456245422 = 147.592519680 boot/grub/grub.cfg 4
130.354167938 = 139.966722048 boot/vmlinuz 1
130.354167938 = 139.966722048 boot/vmlinuz-5.11.0-38-generic 1
124.478851318 = 133.658148864 boot/vmlinuz-5.8.0-59-generic 1
124.478851318 = 133.658148864 boot/vmlinuz.old 1
136.962894440 = 147.062788096 boot/initrd.img 3
136.962894440 = 147.062788096 boot/initrd.img-5.11.0-38-generic 3
131.727367401 = 141.441183744 boot/initrd.img-5.8.0-59-generic 2
131.727367401 = 141.441183744 boot/initrd.img.old 2
===================== sda8: ls -l /etc/grub.d/ (filtered) ======================
-rwxr-xr-x 1 root root 18151 aoû 12 11:18 10_linux.dpkg-dist
-rwxr-xr-x 1 root root 801 oct 29 09:37 10_linux_proxy
-rwxr-xr-x 1 root root 1063 oct 29 09:37 30_os-prober_proxy
-rwxr-xr-x 1 root root 42359 fév 12 2021 31_linux_zfs
-rwxr-xr-x 1 root root 12894 fév 12 2021 32_linux_xen
-rwxr-xr-x 1 root root 1992 aoû 18 2020 33_memtest86+
-rwxr-xr-x 1 root root 1329 oct 29 09:37 41_os-prober_proxy
-rwxr-xr-x 1 root root 1424 fév 12 2021 42_uefi-firmware
-rwxr-xr-x 1 root root 244 oct 29 09:37 43_custom_proxy
-rwxr-xr-x 1 root root 216 fév 12 2021 44_custom
drwxr-xr-x 4 root root 4096 avr 23 2021 backup
drwxr-xr-x 2 root root 4096 avr 23 2021 bin
drwxr-xr-x 2 root root 4096 oct 29 09:37 proxifiedScripts
========================= sda8/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
========================= sda8/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"
====================== sda8/etc/grub.d/41_os-prober_proxy ======================
#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/os-prober' | /etc/grub.d/bin/grubcfg_proxy "+'Ubuntu Hirsute Hippo (development branch) (21.04) (on /dev/sda12)'~596a740dabc2afebdb38ab3d77f324dc~ as 'Kubuntu RESCUE [P12]'
+'Windows Boot Manager (on /dev/sda2)'~dc71b4767132c7dd09e1ae2648576ed8~ as 'Windows BM [P2]'
-*
-'Ubuntu 21.10 (21.10) (on /dev/sda9)'~8fb01c5fe7d2668caed28f00345eb071~
-'SUBMENU' as 'Advanced options for Ubuntu 21.10 (21.10) (on /dev/sda9)'{-'Advanced options for Ubuntu 21.10 (21.10) (on /dev/sda9)'/*, -'Advanced options for Ubuntu 21.10 (21.10) (on /dev/sda9)'/'Kubuntu 21.04 [P9] GRUB (on /dev/sda9)'~f73af64e229ba5caa3912de87ee2a60a~ as 'Kubuntu 21.04 [GPT9] (on /dev/sda9)'}
-#text
-'SUBMENU' as 'Advanced options for Ubuntu Hirsute Hippo (development branch) (21.04) (on /dev/sda12)'{-'Advanced options for Ubuntu Hirsute Hippo (development branch) (21.04) (on /dev/sda12)'/*, -'Advanced options for Ubuntu Hirsute Hippo (development branch) (21.04) (on /dev/sda12)'/'Ubuntu Rescue (on /dev/sda12)'~48794bcb44d764d4a135a902026275c5~ as 'Ubuntu (on /dev/sda12)', -'Advanced options for Ubuntu Hirsute Hippo (development branch) (21.04) (on /dev/sda12)'/'Ubuntu Rescue (on /dev/sda12)'~48794bcb44d764d4a135a902026275c5~ as 'Ubuntu, with Linux 5.10.0-14-generic (on /dev/sda12)'}
"
======================= sda8/etc/grub.d/42_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
======================= sda8/etc/grub.d/43_custom_proxy ========================
#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "-'Kubuntu 21.04 [GPT9] (on /dev/sda9)'~43beb63a66aa7b8414adf3ca359baad5~ as 'Kubuntu 21.04 noyau 36 [GPT9] (on /dev/sda9)'
+*
+#text
"
====================== sda9/boot/grub/grub.cfg (filtered) ======================
Kubuntu 21.04 [P9] GRUB aa9a050e-bf13-494c-8762-5f05012ddb85
KDE neon [P8] 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Kubuntu Rescue [P12] 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Windows [P2] osprober-efi-F2B4-5224
### END /etc/grub.d/30_os-prober_proxy ###
### END /etc/grub.d/30_uefi-firmware ###
========================== sda9/etc/fstab (filtered) ===========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda8 during installation
UUID=aa9a050e-bf13-494c-8762-5f05012ddb85 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
UUID=F2B4-5224 /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda9 during installation
UUID=1886f2c9-76a2-444e-9b32-a1ef35e06afb none swap sw 0 0
UUID=54B8B5A1B8B58252 /media/asu/Win.10.DOS ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=6E8AF8EA8AF8B027 /media/asu/Win.10.GPT1 ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=64D82434D82406C0 /media/asu/Win.10.GPT2 ntfs ro,locale=fr_BE.UTF-8,uid=1000,noauto 0 0
UUID=FEFE8D31FE8CE2EF /media/asu/Ood ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
UUID=2ADCEB11DCEAD5DB /media/asu/OSv ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
UUID=535D7BE603D9AC2E /media/asu/Thumbs ntfs rw,locale=fr_BE.UTF-8,uid=1000,auto 0 0
======================= sda9/etc/default/grub (filtered) =======================
GRUB_DEFAULT="0"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="4"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
==================== sda9: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
162.480606079 = 174.462222336 boot/grub/grub.cfg 2
156.679683685 = 168.233529344 boot/vmlinuz 2
147.763740540 = 158.660108288 boot/vmlinuz-5.11.0-37-generic 2
169.329830170 = 181.816520704 boot/vmlinuz-5.13.0-19-generic 2
156.679683685 = 168.233529344 boot/vmlinuz-5.13.0-20-generic 2
158.792125702 = 170.501746688 boot/vmlinuz-5.4.0-52-generic 1
157.497142792 = 169.111269376 boot/vmlinuz-5.8.0-26-generic 1
169.329830170 = 181.816520704 boot/vmlinuz.old 2
164.818470001 = 176.972484608 boot/initrd.img 5
167.959590912 = 180.345237504 boot/initrd.img-5.11.0-37-generic 42
169.093410492 = 181.562667008 boot/initrd.img-5.13.0-19-generic 27
164.818470001 = 176.972484608 boot/initrd.img-5.13.0-20-generic 5
169.379150391 = 181.869477888 boot/initrd.img-5.4.0-52-generic 2
168.847900391 = 181.299052544 boot/initrd.img-5.8.0-26-generic 3
169.093410492 = 181.562667008 boot/initrd.img.old 27
===================== sda9: ls -l /etc/grub.d/ (filtered) ======================
-rwxr-xr-x 1 root root 1421 oct 29 09:34 10_linux_proxy
-rwxr-xr-x 1 root root 43031 fév 12 2021 10_linux_zfs
-rwxr-xr-x 1 root root 12894 fév 12 2021 20_linux_xen
-rwxr-xr-x 1 root root 1465 oct 29 09:34 30_os-prober_proxy
-rwxr-xr-x 1 root root 1424 fév 12 2021 30_uefi-firmware
-rwxr-xr-x 1 root root 214 fév 12 2021 40_custom
-rwxr-xr-x 1 root root 216 fév 12 2021 41_custom
drwxr-xr-x 4 root root 4096 mar 5 2021 backup
drwxr-xr-x 2 root root 4096 mar 5 2021 bin
drwxr-xr-x 2 root root 4096 oct 29 09:34 proxifiedScripts
===================== sda12/boot/grub/grub.cfg (filtered) ======================
Neon GNU/Linux 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Neon GNU/Linux, with Linux 5.10.0-14-generic 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Neon GNU/Linux, with Linux 5.4.0-70-generic 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Neon GNU/Linux, with Linux 5.4.0-70-generic 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Ubuntu Rescue 8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b
Windows Boot Manager (on sda2) osprober-efi-F2B4-5224
KDE neon User - Plasma 25th Anniversary Edition (20.04) (on sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Neon 20.04 [P8] (on sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Ubuntu 21.10 (21.10) (on sda9) aa9a050e-bf13-494c-8762-5f05012ddb85
Kubuntu 21.04 [P9] GRUB (on sda9) aa9a050e-bf13-494c-8762-5f05012ddb85
### END /etc/grub.d/30_os-prober ###
KDE neon User - Plasma 25th Anniversary Edition (20.04) (on sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Neon 20.04 [P8] (on sda8) 7a98fbcc-7ae3-4958-94ec-10a8fb8b4c8d
Ubuntu 21.10 (21.10) (on sda9) aa9a050e-bf13-494c-8762-5f05012ddb85
Kubuntu 21.04 [P9] GRUB (on sda9) aa9a050e-bf13-494c-8762-5f05012ddb85
Windows Boot Manager (on sda2) osprober-efi-F2B4-5224
Kubuntu 21.04 [GPT9] (on sda9) aa9a050e-bf13-494c-8762-5f05012ddb85
### END /etc/grub.d/30_os-prober_proxy ###
### END /etc/grub.d/30_uefi-firmware ###
========================== sda12/etc/fstab (filtered) ==========================
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=F2B4-5224 /boot/efi vfat defaults,noatime 0 2
UUID=8aaa234b-a9cc-426a-8eac-2fdb0ed4bd4b / ext4 defaults,noatime,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
====================== sda12/etc/default/grub (filtered) =======================
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
=================== sda12: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
184.892585754 = 198.526902272 boot/grub/grub.cfg 6
184.251949310 = 197.839024128 boot/vmlinuz 2
178.492069244 = 191.654400000 boot/vmlinuz-5.10.0-14-generic 2
184.251949310 = 197.839024128 boot/vmlinuz-5.4.0-70-generic 2
178.492069244 = 191.654400000 boot/vmlinuz.old 2
184.340587616 = 197.934198784 boot/initrd.img-5.10.0-14-generic 2
184.428493500 = 198.028587008 boot/initrd.img-5.4.0-70-generic 2
184.340587616 = 197.934198784 boot/initrd.img.old 2
===================== sda12: ls -l /etc/grub.d/ (filtered) =====================
-rwxr-xr-x 1 root root 17622 fév 12 2021 10_linux
-rwxr-xr-x 1 root root 487 oct 18 10:22 10_linux_proxy
-rwxr-xr-x 1 root root 42359 fév 12 2021 10_linux_zfs
-rwxr-xr-x 1 root root 43031 fév 12 2021 11_linux_zfs
-rwxr-xr-x 1 root root 12894 fév 12 2021 20_linux_xen
-rwxr-xr-x 1 root root 1992 aoû 18 2020 21_memtest86+
-rwxr-xr-x 1 root root 12059 fév 12 2021 30_os-prober
-rwxr-xr-x 1 root root 1472 oct 18 10:22 30_os-prober_proxy
-rwxr-xr-x 1 root root 1424 fév 12 2021 30_uefi-firmware
-rwxr-xr-x 1 root root 1424 fév 12 2021 31_uefi-firmware
-rwxr-xr-x 1 root root 214 fév 12 2021 40_custom
-rwxr-xr-x 1 root root 194 oct 18 10:22 40_custom_proxy
-rwxr-xr-x 1 root root 216 fév 12 2021 41_custom
drwxr-xr-x 4 root root 4096 oct 18 10:22 backup
drwxr-xr-x 2 root root 4096 oct 18 10:22 bin
drwxr-xr-x 2 root root 4096 oct 18 10:22 proxifiedScripts
======================== sda12/etc/grub.d/11_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}" 2>/dev/null | 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=""
candidate_kernel_list="$(find "${boot_dir}" -maxdepth 1 -type f -regex '.*/\(vmlinuz\|vmlinux\|kernel\)-.*')"
while [ -n "${candidate_kernel_list}" ] ; do
list_basename="$(echo "${candidate_kernel_list}" | sed -e 's#.*/##')"
linux=$(version_find_latest ${list_basename})
linux=$(echo "${candidate_kernel_list}" | while read k; do
if [ "$(basename "${k}")" = "${linux}" ]; then
echo -n "${k}"
break
fi
done)
# || true to not abort even if candidate_kernel_list is empty on last entry
candidate_kernel_list="$(echo "${candidate_kernel_list}" | fgrep -vx "${linux}"||true)"
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 -v FS='\t' '{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
snapshots="$(zfs list -H -o name -t snapshot "${dataset}"|while read snapshot_dataset; do
get_dataset_info "${snapshot_dataset}" ${mntdir}
done)"
[ -n "${snapshots}" ] && boot_list="${boot_list}${snapshots}\n"
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
oldIFS="$IFS"
export IFS='|'
set -- $(get_field_from_entry "${main_entry}" 7)
for kernel in $(get_field_from_entry "${main_entry}" 8); 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
IFS="$oldIFS"
}
# 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
oldIFS="$IFS"
export IFS='|'
set -- $(get_field_from_entry "${entry}" 7)
for k in $(get_field_from_entry "${entry}" 8); 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
IFS="$oldIFS"
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 in echo trims end of line spaces
echo "${submenu_indentation} linux \"${kernel}\" root=ZFS=\"${dataset}\" ro $(echo ${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
====================== sda12/etc/grub.d/31_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
======================= sda12/etc/grub.d/40_custom_proxy =======================
#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "+*
+#text
-'Kubuntu 21.04 [GPT9] (on /dev/sda9)'~48915c75b3d6bc7793b77eadd90876d5~
"
======================== Unknown MBRs/Boot Sectors/etc =========================
Unknown BootLoader on sda10
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 f0 5f 1a |........?....._.|
00000020 00 00 00 00 80 00 80 00 ff ff 94 00 00 00 00 00 |................|
00000030 04 00 00 00 00 00 00 00 ff 4f 09 00 00 00 00 00 |.........O......|
00000040 f6 00 00 00 01 00 00 00 2e ac d9 03 e6 7b 5d 53 |.............{]S|
00000050 00 00 00 00 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
=============================== StdErr Messages ================================
File descriptor 63 (pipe:[70825]) leaked on lvs invocation. Parent PID 3953: /bin/bash
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
sda8,
using the following options: sda2/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s win-legacy-basic-fix use-standard-efi-file
Final advice in case of suggested repair: ______________________________________
Please do not forget to make your UEFI firmware boot on the L'OS actuellement utilisé - KDE neon User - Plasma 25th Anniversary Edition CurrentSession entry (sda2/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)
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne
#50 Le 29/10/2021, à 12:55
- freex
Re : [résolu] Récupération de grub par KDE neon
Bonjour
Tu en profiteras pour refaire un boot-info après avoir fait la commande de nany si le problème n'est pas résolu
Cela permettra d'avoir le contenu de
- La nvram
- De tous les fichiers de configuration GRUB EFI
- De tous les fichiers de configuration GRUB LEGACY
J'en profite pour rappeler que lorsqu'on dispose d'un ordinateur EFI et qu'on a plusieurs instances à faire booter , on ne sert plus du grub qu'il devient inutile d'installer mais du logiciel REFIND!
sudo apt install refind
Ok ...mais pourquoi les installations ne prévoient-elles pas de l'installer lorsqu'elles détectent un EFI?
Pour moi, grub ou un autre... à partir du moment où je sais lancer Ubuntu ou Windows...
Je vais jeter un oeil à la doc
Dernière modification par freex (Le 29/10/2021, à 12:56)
Kubuntu user qui aimerait passer définitivement au bureau standard.
Hors ligne