[kernel] boot secure

Reconnaissance et configuration du matériel / kernel linux
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

En effet il te manque l'entrée. Tu peux la rajouter manuellement (chose que j'ai dû aussi faire dû au "bug" dans l'install de systemd-boot), comme indiqué précédemment voir https://wiki.archlinux.org/title/System ... efibootmgr

Si sda1 est bien ta partition ESP, tu dois faire ceci :

Code : Tout sélectionner

efibootmgr --create --disk /dev/sda --part 1 --loader '\EFI\systemd\systemd-bootx64.efi' --label "Linux Boot Manager" --unicode
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Bonjour Benjarobin.

je l'ai fais mais je suis obligé de démarrer sans secure boot.
Ensuite j'ai appliqué ce que tu m'a dis , aidé par cette doc https://www.edu4rdshl.dev/posts/uki-sec ... lkthrough/

mais ce la veut pas signer j'ai des erreurs de type :

[root@christophe-lx ~]#      

Code : Tout sélectionner

sbctl status
Installed:    ✓ sbctl is installed
Owner GUID:    0fb86f6a-ec71-4272-833b-de79f95dc69c
Setup Mode:    ✗ Enabled
Secure Boot:    ✗ Disabled
Vendor Keys:    microsoft
[root@christophe-lx ~]# sbctl verify
Verifying file database and EFI images in /boot...
✗ /boot/EFI/BOOT/BOOTX64.EFI is not signed
✗ /boot/EFI/Linux/arch-linux.efi is not signed
✗ /boot/EFI/systemd/systemd-bootx64.efi is not signed
failed to verify file /boot/amd-ucode.img: /boot/amd-ucode.img: invalid pe header
failed to verify file /boot/initramfs-linux-fallback.img: /boot/initramfs-linux-fallback.img: invalid pe header
failed to verify file /boot/initramfs-linux.img: /boot/initramfs-linux.img: invalid pe header
failed to verify file /boot/loader/entries/arch-fallback.conf: /boot/loader/entries/arch-fallback.conf: invalid pe header
failed to verify file /boot/loader/entries/arch.conf: /boot/loader/entries/arch.conf: invalid pe header
failed to verify file /boot/loader/entries.srel: /boot/loader/entries.srel: invalid pe header
failed to verify file /boot/loader/loader.conf: /boot/loader/loader.conf: invalid pe header
failed to verify file /boot/loader/random-seed: /boot/loader/random-seed: invalid pe header
✗ /boot/vmlinuz-linux is not signed
[root@christophe-lx ~]# Connection to 192.168.1.16 closed by remote host.
Connection to 192.168.1.16 closed.
[christophe@christophe-nb ~]$
pourtant le bios est en mode non uefi setup mais ça veut pas.
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

Tu n'as apparemment suivi aucune des étapes décrites ici : viewtopic.php?p=182785#p182785 (Bien le suivre dans l'ordre ! L'ordre à beaucoup d'importance)
C'est un peu dommage, j'ai passé du temps à écrire un mini tutoriel, ... Je l'ai un peu amélioré depuis ce message, j'ai rajouté des exemples, ...
Et pourquoi tu n'as pas arch-linux-fallback.efi dans /boot/EFI/Linux/.

Edit :
Note, je te déconseille vivement de suivre ce tutoriel (que de toute façon tu n'as que très partiellement suivi) bien que pas totalement faux : https://www.edu4rdshl.dev/posts/uki-sec ... lkthrough/
Les instructions ne sont pas forcément dans le bon ordre pour que cela fonctionne...
Par exemple tu ne dois pas créer ce fichier

Code : Tout sélectionner

/etc/pacman.d/hooks/95-systemd-boot.hook
Pourquoi supprimer le support de fallback, cela peut être important...
Je ne pense pas que tu es besoin de systemd-ukify, tu peux le désinstaller.
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Bonjour Benjarobin,

Je viens de refaire ce que tu m'a dis dans le précédent message. Mon bios etait en setup uefi. (j'en suis sur).
tous les étapes sont passé mais lors du reboot, j'ai un bo ecran rouge ' check policy secure).

Je ne comprend pas la.
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

Désactive le sécure boot depuis le BIOS, démarre ton Linux normalement et donne la sortie de :

Code : Tout sélectionner

bootctl status
sbctl status
sbctl verify
efibootmgr -v
Edit : Dans le tutoriel j'ai rajouté une section demandant de vérifier la sortie de sbctl verify
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Bonjour

Code : Tout sélectionner

[root@christophe-lx ~]# sbctl status
Installed:	✓ sbctl is installed
Owner GUID:	e68f885a-a292-440d-a025-3b632375a4cb
Setup Mode:	✗ Enabled
Secure Boot:	✗ Disabled
Vendor Keys:	microsoft

Code : Tout sélectionner

[root@christophe-lx ~]# bootctl status
System:
      Firmware: UEFI 2.70 (American Megatrends 5.17)
 Firmware Arch: x64
   Secure Boot: disabled (setup)
  TPM2 Support: yes
  Measured UKI: yes
  Boot into FW: supported

Current Boot Loader:
      Product: systemd-boot 257.7-1-arch
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Load drop-in drivers
               ✓ Support Type #1 sort-key field
               ✓ Support @saved pseudo-entry
               ✓ Support Type #1 devicetree field
               ✓ Enroll SecureBoot keys
               ✓ Retain SHIM protocols
               ✓ Menu can be disabled
               ✓ Multi-Profile UKIs are supported
               ✓ Boot loader set partition information
    Partition: /dev/disk/by-partuuid/a3561209-1a9e-44ae-bb45-3b67bde69389
       Loader: └─/EFI/BOOT/BOOTX64.EFI
Current Entry: arch-linux.efi
Default Entry: arch-linux.efi

Current Stub:
      Product: systemd-stub 257.7-1-arch
     Features: ✓ Stub sets loader partition information
               ✓ Picks up credentials from boot partition
               ✓ Picks up system extension images from boot partition
               ✓ Picks up configuration extension images from boot partition
               ✓ Measures kernel+command line+sysexts
               ✓ Support for passing random seed to OS
               ✓ Pick up .cmdline from addons
               ✓ Pick up .cmdline from SMBIOS Type 11
               ✓ Pick up .dtb from addons
               ✓ Stub understands profile selector
               ✓ Stub sets stub partition information
               ✓ Stub loader set partition information
    Partition: /dev/disk/by-partuuid/a3561209-1a9e-44ae-bb45-3b67bde69389
         Stub: └─/EFI/Linux/arch-linux.efi

Random Seed:
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /boot (/dev/disk/by-partuuid/a3561209-1a9e-44ae-bb45-3b67bde69389)
         File: ├─/EFI/systemd/systemd-bootx64.efi (systemd-boot 257.7-1-arch)
               └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 257.7-1-arch)

Boot Loaders Listed in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/be9dc99d-de21-4641-aa66-639525fecfe7
         File: └─/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI

        Title: UEFI OS
           ID: 0x0001
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/a3561209-1a9e-44ae-bb45-3b67bde69389
         File: └─/EFI/BOOT/BOOTX64.EFI

Boot Loader Entries:
        $BOOT: /boot (/dev/disk/by-partuuid/a3561209-1a9e-44ae-bb45-3b67bde69389)
        token: arch

Default Boot Loader Entry:
         type: Boot Loader Specification Type #2 (.efi)
        title: Arch Linux (6.15.7-arch1-1)
           id: arch-linux.efi
       source: /boot//EFI/Linux/arch-linux.efi (on the EFI System Partition)
     sort-key: arch
      version: 6.15.7-arch1-1
        linux: /boot//EFI/Linux/arch-linux.efi
      options: root=UUID="e29b38a5-1113-4f95-8cc5-a88f56057c1c" rw
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

[root@christophe-lx ~]# 
sbctl verify
Verifying file database and EFI images in /boot...
✓ /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed is signed
✗ /boot/EFI/BOOT/BOOTX64.EFI is not signed
✓ /boot/EFI/Linux/arch-linux-fallback.efi is signed
✓ /boot/EFI/Linux/arch-linux.efi is signed
✗ /boot/EFI/systemd/systemd-bootx64.efi is not signed
failed to verify file /boot/amd-ucode.img: /boot/amd-ucode.img: invalid pe header
failed to verify file /boot/initramfs-linux-fallback.img: /boot/initramfs-linux-fallback.img: invalid pe header
failed to verify file /boot/initramfs-linux.img: /boot/initramfs-linux.img: invalid pe header
failed to verify file /boot/loader/entries.srel: /boot/loader/entries.srel: invalid pe header
failed to verify file /boot/loader/loader.conf: /boot/loader/loader.conf: invalid pe header
failed to verify file /boot/loader/random-seed: /boot/loader/random-seed: invalid pe header
✗ /boot/vmlinuz-linux is not signed
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

[root@christophe-lx ~]# efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001,0002,0004,0003
Boot0000* Windows Boot Manager	HD(1,GPT,be9dc99d-de21-4641-aa66-639525fecfe7,0x800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 9d c9 9d be 21 de 41 46 aa 66 63 95 25 fe cf e7 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 00 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* UEFI OS	HD(1,GPT,a3561209-1a9e-44ae-bb45-3b67bde69389,0x800,0x200000)/\EFI\BOOT\BOOTX64.EFI
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 00 20 00 00 00 00 00 09 12 56 a3 9e 1a ae 44 bb 45 3b 67 bd e6 93 89 02 02 / 04 04 30 00 5c 00 45 00 46 00 49 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
Boot0002* Hard Drive	BBS(HD,,0x0)0000474f00004e4fbb000000010000007500530061006d00730075006e006700200053005300440020003800350030002000450056004f0020003500300030004700420000000501090002000000007fff040002010c00d041030a0000000001010600030101010600010003120a000000ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce6320053004200520042004e004800300033004100320032003800380020005000200020002000200000007fff04000000424f00004e4faf000000010000006b00410073006700610072006400200041004e0032002000310054004e0056004d0065002d004d002e0032002f003800300000000501090002000000007fff040002010c00d041030a00000000010106000101010106000000031710000100000001000000000000007fff040001042e00ef47642dc93ba041ac194d51d01b4ce632003000320030003000360031003000300035003900300000007fff04000000424f
      dp: 05 01 09 00 02 00 00 00 00 / 7f ff 04 00
    data: 00 00 47 4f 00 00 4e 4f bb 00 00 00 01 00 00 00 75 00 53 00 61 00 6d 00 73 00 75 00 6e 00 67 00 20 00 53 00 53 00 44 00 20 00 38 00 35 00 30 00 20 00 45 00 56 00 4f 00 20 00 35 00 30 00 30 00 47 00 42 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 03 01 01 01 06 00 01 00 03 12 0a 00 00 00 ff ff 00 00 7f ff 04 00 01 04 3e 00 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 32 00 53 00 42 00 52 00 42 00 4e 00 48 00 30 00 33 00 41 00 32 00 32 00 38 00 38 00 20 00 50 00 20 00 20 00 20 00 20 00 00 00 7f ff 04 00 00 00 42 4f 00 00 4e 4f af 00 00 00 01 00 00 00 6b 00 41 00 73 00 67 00 61 00 72 00 64 00 20 00 41 00 4e 00 32 00 20 00 31 00 54 00 4e 00 56 00 4d 00 65 00 2d 00 4d 00 2e 00 32 00 2f 00 38 00 30 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 01 01 01 01 06 00 00 00 03 17 10 00 01 00 00 00 01 00 00 00 00 00 00 00 7f ff 04 00 01 04 2e 00 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 32 00 30 00 32 00 30 00 30 00 36 00 31 00 30 00 30 00 35 00 39 00 30 00 00 00 7f ff 04 00 00 00 42 4f
Boot0003* USB	BBS(HD,,0x0)0000474f00004e4f9d00000001000000610020004d006100730073002000530074006f007200610067006500200044006500760069006300650000000501090002000000007fff040002010c00d041030a000000000101060001070101060003000305060002007fff040001042e00ef47642dc93ba041ac194d51d01b4ce631003100360041004300320031003000310032003100390000007fff04000000424f00004e4f5b010000010000003901530061006e004400690073006b0000000501090002000000007fff040002010c00d041030a00000000010106000301010106000000030506000b007fff040001040601ef47642dc93ba041ac194d51d01b4ce630003100300031003200620061006300630035006200340064006500630062006300390039003800380061003400630032003800620036006500310030006500340035006600650036003500630062003500610063003200650063003900360031003800640064003000360038006200350061006200370031006100320035006100380031003800300030003000300030003000300030003000300030003000300030003000300030003000300030006200630031006100630038003700320030003000300039003000370030003000380031003500350038003100300037003300360032003900370033006400630000007fff04000000424f
      dp: 05 01 09 00 02 00 00 00 00 / 7f ff 04 00
    data: 00 00 47 4f 00 00 4e 4f 9d 00 00 00 01 00 00 00 61 00 20 00 4d 00 61 00 73 00 73 00 20 00 53 00 74 00 6f 00 72 00 61 00 67 00 65 00 20 00 44 00 65 00 76 00 69 00 63 00 65 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 01 07 01 01 06 00 03 00 03 05 06 00 02 00 7f ff 04 00 01 04 2e 00 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 31 00 31 00 36 00 41 00 43 00 32 00 31 00 30 00 31 00 32 00 31 00 39 00 00 00 7f ff 04 00 00 00 42 4f 00 00 4e 4f 5b 01 00 00 01 00 00 00 39 01 53 00 61 00 6e 00 44 00 69 00 73 00 6b 00 00 00 05 01 09 00 02 00 00 00 00 7f ff 04 00 02 01 0c 00 d0 41 03 0a 00 00 00 00 01 01 06 00 03 01 01 01 06 00 00 00 03 05 06 00 0b 00 7f ff 04 00 01 04 06 01 ef 47 64 2d c9 3b a0 41 ac 19 4d 51 d0 1b 4c e6 30 00 31 00 30 00 31 00 32 00 62 00 61 00 63 00 63 00 35 00 62 00 34 00 64 00 65 00 63 00 62 00 63 00 39 00 39 00 38 00 38 00 61 00 34 00 63 00 32 00 38 00 62 00 36 00 65 00 31 00 30 00 65 00 34 00 35 00 66 00 65 00 36 00 35 00 63 00 62 00 35 00 61 00 63 00 32 00 65 00 63 00 39 00 36 00 31 00 38 00 64 00 64 00 30 00 36 00 38 00 62 00 35 00 61 00 62 00 37 00 31 00 61 00 32 00 35 00 61 00 38 00 31 00 38 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 62 00 63 00 31 00 61 00 63 00 38 00 37 00 32 00 30 00 30 00 30 00 39 00 30 00 37 00 30 00 30 00 38 00 31 00 35 00 35 00 38 00 31 00 30 00 37 00 33 00 36 00 32 00 39 00 37 00 33 00 64 00 63 00 00 00 7f ff 04 00 00 00 42 4f
Boot0004* UEFI: SanDisk, Partition 2	PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)/USB(11,0)/HD(2,MBR,0x598ec8d2,0x728c000,0x10000)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 01 / 01 01 06 00 00 00 / 03 05 06 00 0b 00 / 04 01 2a 00 02 00 00 00 00 c0 28 07 00 00 00 00 00 00 01 00 00 00 00 00 d2 c8 8e 59 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
    data: 00 00 42 4f
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

Hum, systemd-boot n'a jamais été installé correctement... C'est comme si tu n'avais pas fait toutes les étapes, ou que tu ne les as pas fait dans le bon ordre... Par exemple pourquoi l'entrée que tu as rajouté dans efibootmgr manuellement n'est pas listé ?

Donc depuis ton système que tu as apparemment remis en setup mode (ce qui était nécessaire afin de réparer) peux tu faire toutes les étapes décrites ci-dessous.
Ne le fait pas depuis un ISO d'installation, depuis ton système démarré en UEFI (avec le mode secure boot en mode setup) c'est parfait.

Et si possible peux tu donner toutes les sorties des commandes demandées ci-dessous. Comme tu les exécutes depuis ton système installé (et non depuis un ISO d'installation), normalement cela ne devrait pas être trop compliqué à faire :-)
  • Enregistrement de nouveau des clés dans le BIOS afin de repasser le BIOS en mode secure boot normal (sortie du mode setup)

    Code : Tout sélectionner

    sbctl enroll-keys -m
  • Réinstallation de sytemd-boot, car manifestement l'entrée dans la carte mère est inexistante et le bootloader n'est pas signé dans la partition de boot...

    Code : Tout sélectionner

    bootctl remove
    bootctl install
  • Vérifier que l'entrée de systemd-boot existe dans la NVRAM de la carte mère :

    Code : Tout sélectionner

    efibootmgr
    Tu dois avoir quelque chose comme

    Code : Tout sélectionner

    Boot000x* Linux Boot Manager    HD(1,GPT,xxxxxxxxxxxxxxxx)/\EFI\systemd\systemd-bootx64.efi
  • Pour vérification tu pourras donner le contenu de /etc/mkinitcpio.d/linux.preset
  • Nettoyer le strict minimum

    Code : Tout sélectionner

    rm /boot/initramfs*
  • Mettre à jour / créer /boot/loader/loader.conf avec ceci (par exemple) :

    Code : Tout sélectionner

    timeout  4
    console-mode max
    editor   no
    default @saved
  • Vérifier que tout est bien signé dans la partition ESP :

    Code : Tout sélectionner

    sbctl verify
    Les fichiers suivantes doivent l'être (si ce n'est pas le cas, le système ne démarrera pas !)

    Code : Tout sélectionner

    /boot/EFI/Linux/arch-linux-fallback.efi
    /boot/EFI/Linux/arch-linux.efi
    /boot/EFI/systemd/systemd-bootx64.efi
    /boot/EFI/BOOT/BOOTX64.EFI
    /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

- sbctl enroll-keys -m
Enrolling keys to EFI variables...
With vendor keys from microsoft...✓ 
Enrolled keys to the EFI variables!

Code : Tout sélectionner

[root@christophe-lx ~]# bootctl remove
Removed "/boot/EFI/BOOT/BOOTX64.EFI".
Removed "/boot/loader/loader.conf".
Removed "/boot/loader/random-seed".
Removed "/boot/loader/entries.srel".
Removed "/boot/loader/keys".
Removed "/boot/EFI/BOOT".
Removed "/boot/loader/entries".
Removed "/boot/loader".
Removed EFI variable LoaderEntryDefault-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
Removed EFI variable LoaderSystemToken-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.

Code : Tout sélectionner

[root@christophe-lx ~]# bootctl install
Created "/boot/EFI/systemd".
Created "/boot/EFI/BOOT".
Created "/boot/loader".
Created "/boot/loader/keys".
Created "/boot/loader/entries".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/BOOT/BOOTX64.EFI".
Random seed file /boot/loader/random-seed successfully written (32 bytes).
Successfully initialized system token in EFI variable with 32 bytes.
Created EFI boot entry "Linux Boot Manager".
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

[root@christophe-lx ~]# efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0005,0000,0001,0004,0002,0003
Boot0000* Windows Boot Manager	HD(1,GPT,be9dc99d-de21-4641-aa66-639525fecfe7,0x800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000000000100000010000000040000007fff0400
Boot0001* UEFI OS	HD(1,GPT,a3561209-1a9e-44ae-bb45-3b67bde69389,0x800,0x200000)/\EFI\BOOT\BOOTX64.EFI
Boot0002* Hard Drive	BBS(HD,,0x0)0000474f00004e4fbb000000010000007500530061006d00730075006e006700200053005300440020003800350030002000450056004f0020003500300030004700420000000501090002000000007fff040002010c00d041030a0000000001010600030101010600010003120a000000ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce6320053004200520042004e004800300033004100320032003800380020005000200020002000200000007fff04000000424f00004e4faf000000010000006b00410073006700610072006400200041004e0032002000310054004e0056004d0065002d004d002e0032002f003800300000000501090002000000007fff040002010c00d041030a00000000010106000101010106000000031710000100000001000000000000007fff040001042e00ef47642dc93ba041ac194d51d01b4ce632003000320030003000360031003000300035003900300000007fff04000000424f
Boot0003* USB	BBS(HD,,0x0)0000474f00004e4f9d00000001000000610020004d006100730073002000530074006f007200610067006500200044006500760069006300650000000501090002000000007fff040002010c00d041030a000000000101060001070101060003000305060002007fff040001042e00ef47642dc93ba041ac194d51d01b4ce631003100360041004300320031003000310032003100390000007fff04000000424f00004e4fb90000000100000079004b0069006e006700730074006f006e00440054002000310030003100200047003200200050004d004100500000000501090002000000007fff040002010c00d041030a00000000010106000301010106000000030506000b007fff040001044600ef47642dc93ba041ac194d51d01b4ce630003000310043004300300045004300330034004500340042004100430030003600350043003300300030003400420000007fff04000000424f
Boot0004* UEFI: KingstonDT 101 G2 PMAP	PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)/USB(11,0)/CDROM(1,0x27c,0x6600)0000424f
Boot0005* Linux Boot Manager	HD(1,GPT,a3561209-1a9e-44ae-bb45-3b67bde69389,0x800,0x200000)/\EFI\systemd\systemd-bootx64.efi
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

[root@christophe-lx ~]# cat /etc/mkinitcpio.d/linux.preset
# mkinitcpio preset file for the 'linux' package

#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
#ALL_kver="/usr/lib/modules/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-linux.img"
#default_uki="/efi/EFI/Linux/arch-linux.efi"
default_uki="/boot/EFI/Linux/arch-linux.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"

#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-linux-fallback.img"
fallback_uki="/boot/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Code : Tout sélectionner

[root@christophe-lx ~]# rm /boot/initramfs* -v
rm: impossible de supprimer '/boot/initramfs*': Aucun fichier ou dossier de ce nom

Code : Tout sélectionner

[root@christophe-lx ~]# sbctl verify
Verifying file database and EFI images in /boot...
✓ /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed is signed
✓ /boot/EFI/BOOT/BOOTX64.EFI is signed
✓ /boot/EFI/Linux/arch-linux-fallback.efi is signed
✓ /boot/EFI/Linux/arch-linux.efi is signed
✓ /boot/EFI/systemd/systemd-bootx64.efi is signed
failed to verify file /boot/amd-ucode.img: /boot/amd-ucode.img: invalid pe header
failed to verify file /boot/loader/entries.srel: /boot/loader/entries.srel: invalid pe header
failed to verify file /boot/loader/loader.conf: /boot/loader/loader.conf: invalid pe header
failed to verify file /boot/loader/random-seed: /boot/loader/random-seed: invalid pe header
✗ /boot/vmlinuz-linux is not signed
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

Bonjour,

je ne vois pas mon windows dans le demarrage de ma archlinux.
il est sur une disque dur séparé de archlinux.

sinon ça marche :)
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

Tu peux rajouter dans ce cas une entrée dans systemd-boot pour Windows, je crois je regarde. Cela à l'air compliqué, et je ne sais pas si cela supporte le secure boot : https://wiki.archlinux.org/title/System ... other_disk
Cela aurait été plus simple d'avoir une seule partition ESP !

Je te recommande vivement de changer ta partition ESP de Arch en tant que partition XBOOTLDR, et de réinstaller systemd-boot dans la partition ESP de Windows !
Si tu veux le faire, je peux essayer de te faire un mini tutoriel !

Edit : Hum, cela ne semble pas supporté non plus (https://wiki.archlinux.org/title/System ... g_XBOOTLDR) :
The XBOOTLDR partition must be on the same physical disk as the ESP for systemd-boot to recognize it.
Edit 2: Donc le mieux est de tenter cette méthode : https://wiki.archlinux.org/title/System ... other_disk
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

OK merci pour tout.
Je changerai par le bios.

donc c'est un grand merci et un GRAND RESOLU
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17612
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [kernel] boot secure

Message par benjarobin »

pacman -S edk2-shell

Code : Tout sélectionner

sbctl sign -s -o /boot/shellx64.efi /usr/share/edk2-shell/x64/Shell.efi
Tu dois créer le fichier : /boot/loader/entries/windows.conf

Code : Tout sélectionner

title   Windows
efi     /shellx64.efi
options -nointerrupt -nomap -noversion HD0b:EFI\Microsoft\Boot\Bootmgfw.efi
Avec HD0b à remplacer par (voir la sortie de la commande map exécutée depuis l'UEFI shell)
Zsh | KDE | PC fixe : AMD Ryzen 9900X, Radeon RX 7700 XT
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

benjarobin a écrit : ven. 25 juil. 2025, 13:51 pacman -S edk2-shell

Code : Tout sélectionner

sbctl sign -s -o /boot/shellx64.efi /usr/share/edk2-shell/x64/Shell.efi
Tu dois créer le fichier : /boot/loader/entries/windows.conf

Code : Tout sélectionner

title   Windows
efi     /shellx64.efi
options -nointerrupt -nomap -noversion HD0b:EFI\Microsoft\Boot\Bootmgfw.efi
Avec HD0b à remplacer par (voir la sortie de la commande map exécutée depuis l'UEFI shell)
c'est bon, j'ai l'entré.
mais le sécure boot se désactive.

je vais utiliser le bios en attenant.
cleloup
Hankyu
Messages : 36
Inscription : dim. 19 févr. 2023, 08:49

Re: [kernel] boot secure

Message par cleloup »

sinon je me demandé si ne grub pouvait pas faire l'affaire?
Répondre