Page 1 sur 1

[Boot menu] Grand néttoyage.[Résolu]

Publié : dim. 15 nov. 2015, 20:47
par stantor
Salut !

J'ai du reinstaller win7 sur une autre partition et j'aimerais créer une entrée pour win7 en seconde position et activer un menu. Lors de l'installation d'arch j'ai installé systemd-boot mais avec mes tentatives précédentes j'ai un gros bordel dans ma partition ESP.

Question:
- Si j'ai bien compris systemd-boot est un gestionnaire de boot, je peux donc vraisemblablement le replacer par un autre !? Je reste sur systemd !?
- Que dois-je nettoyer dans la part ESP !? Comment savoir quel entrée est utilisé actuellement par mon Arch ?
- J'ai du mal à comprendre la différence entre le contenu de /boot et celui de /boot/loader/...

La partition ou se trouve mon ESP:

Code : Tout sélectionner

/dev/sda1: UUID="14BB-CA0D" TYPE="vfat" PARTUUID="bf4321b0-b809-4ffa-a6b6-89ef714c5272"

Code : Tout sélectionner

grep -REv "^ *$|^ *#" loader/
loader/entries/arch.conf:title Arch linux                                                                                         
loader/entries/arch.conf:linux /vmlinuz-linux                                                                                     
loader/entries/arch.conf:initrd /initramfs-linux.img                                                                              
loader/entries/arch.conf:options root=/dev/sda3 rw                                                                                
loader/entries/loader.conf:timeout 3                                                                                              
loader/entries/loader.conf:defaut arch                                                                                            
loader/loader.conf:default 29415f2d29fe4a3cab9ad7659a4ba55e-*

Code : Tout sélectionner

/boot                                                                                                                             
├── EFI                                                                                                                           
│   ├── Boot                                                                                                                      
│   │   └── BOOTX64.EFI                                                                                                           
│   ├── Microsoft                                                                                                                 
│   │   └── Boot                                                                                                                  
│   │       ├── BCD                                                                                                               
│   │       ├── BCD.LOG                                                                                                           
│   │       ├── BCD.LOG1                                                                                                          
│   │       ├── BCD.LOG2                                                                                                          
│   │       ├── BOOTSTAT.DAT                                                                                                      
│   │       ├── Fonts                                                                                                             
│   │       │   ├── chs_boot.ttf                                                                                                  
│   │       │   ├── cht_boot.ttf                                                                                                  
│   │       │   ├── jpn_boot.ttf                                                                                                  
│   │       │   ├── kor_boot.ttf
│   │       │   └── wgl4_boot.ttf
│   │       ├── bootmgfw.efi
│   │       ├── bootmgr.efi
│   │       ├── cs-CZ
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── da-DK
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── de-DE
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── el-GR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── en-US
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── es-ES
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── fi-FI
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── fr-FR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   ├── bootmgr.efi.mui
│   │       │   └── memtest.efi.mui
│   │       ├── hu-HU
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── it-IT
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── ja-JP
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── ko-KR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── memtest.efi
│   │       ├── nb-NO
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── nl-NL
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pl-PL
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pt-BR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pt-PT
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── ru-RU
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── sv-SE
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── tr-TR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── zh-CN
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── zh-HK
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       └── zh-TW
│   │           ├── bootmgfw.efi.mui
│   │           └── bootmgr.efi.mui
│   └── systemd
│       └── systemd-bootx64.efi
├── grub
│   ├── grub.cfg
│   └── grub.cfg.example
├── initramfs-linux-fallback.img
├── initramfs-linux-rt-fallback.img
├── initramfs-linux-rt.img
├── initramfs-linux.img
├── loader
│   ├── entries
│   │   ├── arch.conf
│   │   └── loader.conf
│   └── loader.conf
├── vmlinuz-linux
└── vmlinuz-linux-rt

Re: [Boot menu] Grand néttoyage.

Publié : dim. 15 nov. 2015, 22:21
par Moviuro
loader/entries/loader.conf ne fait pas sens -> poubelle
Si tu utilises systemd-boot, tu peux supprimer le dossier grub.
Normalement, systemd-boot détecte tout seul windows.
Il nous manque la sortie de efibootmgr -v pour voir qui est en charge de ton boot.
Et oui, systemd-boot est un menu de démarrage EFI, c'est une espèce de grub pour EFI. (ton firmware lance systemd-boot ou grub qui vont ensuite lancer l'OS)

Re: [Boot menu] Grand néttoyage.

Publié : lun. 16 nov. 2015, 09:41
par stantor
Ok, merci. Yep c'est ce que j'avais lu sur le wiki pour la détection auto de win, mais j'ai Arch qui boot directe sans avoir de menu, même apres un

Code : Tout sélectionner

bootctl update
mais ce qui est bizarre c'est que j'ai quand même

Code : Tout sélectionner

bootmgfw.efi
Je suppose que

Code : Tout sélectionner

EFI\systemd\systemd-bootx64.efi
est mon boot arch !?
A quoi correspond cette entrée ?

Code : Tout sélectionner

EFI\Boot\BOOTX64.EFI
Une précédente installe d'ubuntu !? Il me semblait avoir formaté cette partition depuis...

Code : Tout sélectionner

efibootmgr -v
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0009,0001,000A,0007,0002,0005,0004,0003,0000,0006
Boot0000* arch  VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001* Hard Drive    BBS(HD,,0x0)..GO..NO........O.C.r.u.c.i.a.l._.C.T.2.4.0.M.5.0.0.S.S.D.1.................>..Gd-.;.A..MQ..L. . . . . . . . .3.1.3.4.9.0.4.5.2.B.2.2........BO..NO........O.S.T.3.0.0.0.D.M.0.0.1.-.1.E.R.1.6.6.................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .5.Z.0.0.V.H.H.1........BO..NO........O.T.O.S.H.I.B.A. .D.T.0.1.A.C.A.1.0.0.................>..Gd-.;.A..MQ..L. . . . . . . . . . .8. .R.3.8.J.H.S.S.N........BO..NO........O.S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .1.T.B.................>..Gd-.;.A..MQ..L.2.S.D.1.X.N.G.A.0.5.9.0.9.7. .R. . . . ........BO
Boot0002* antergos_grub VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0003* Linux Boot Manager    VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0004* linuxmint     VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* debian        VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0006* arch-grub     VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0007* Windows Boot Manager  HD(1,GPT,bf4321b0-b809-4ffa-a6b6-89ef714c5272,0x800,0x100000)/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.}...a................                                                                                                                           
Boot0009* Linux Boot Manager    HD(1,GPT,bf4321b0-b809-4ffa-a6b6-89ef714c5272,0x800,0x100000)/File(\EFI\systemd\systemd-bootx64.efi)                                                                                                                                
Boot000A* USB   BBS(USB,,0x0)..GO..NO.......?.I.C.Y. .B.O.X. .I.B.-.3.6.6.S.t.U.3.+.B. .0....................Gd-.;.A..MQ..L.1.2.3.4.5.6.7.8.9.0.1.2........BO..NO........c.W.D.C. .W.D.3.2.0.0.J.D.-.0.0.K.L.B.0.................R..Gd-.;.A..MQ..L.W.D.C. .W.D.3.2.0.0. . . . . .W.D.-.W.M.A.M.R.1.5.9.3.6.3.5........BO 
Ha ouai ! la on vois bien tout ce que j'ai mis avant ^^.

Re: [Boot menu] Grand néttoyage.

Publié : lun. 16 nov. 2015, 18:03
par stantor
Bon je pense avoir nettoyé tout ce joli bordel:

Code : Tout sélectionner

efibootmgr
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0009,0001,000A,0007
Boot0001* Hard Drive 
Boot0007* Windows Boot Manager
Boot0009* Linux Boot Manager
Boot000A* USB 
Question:
- quel est l'utilité des entrées *.conf dans le dossier /loader ? A définir les entrées pour un menu j'imagine !?
- A quoi sert /EFI/Boot/BOOTx64.EFI ?

Code : Tout sélectionner

tree
.
├── EFI
│   ├── Boot
│   │   └── BOOTX64.EFI
│   ├── Microsoft
│   │   └── Boot
│   │       ├── BCD
│   │       ├── BCD.LOG
│   │       ├── BCD.LOG1
│   │       ├── BCD.LOG2
│   │       ├── BOOTSTAT.DAT
│   │       ├── Fonts
│   │       │   ├── chs_boot.ttf
│   │       │   ├── cht_boot.ttf
│   │       │   ├── jpn_boot.ttf
│   │       │   ├── kor_boot.ttf
│   │       │   └── wgl4_boot.ttf
│   │       ├── bootmgfw.efi
│   │       ├── bootmgr.efi
│   │       ├── cs-CZ
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── da-DK
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── de-DE
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── el-GR                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── en-US                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── es-ES                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── fi-FI                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── fr-FR                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   ├── bootmgr.efi.mui                                                                                              
│   │       │   └── memtest.efi.mui                                                                                              
│   │       ├── hu-HU                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── it-IT                                                                                                            
│   │       │   ├── bootmgfw.efi.mui                                                                                             
│   │       │   └── bootmgr.efi.mui                                                                                              
│   │       ├── ja-JP                                                                                                            
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── ko-KR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── memtest.efi
│   │       ├── nb-NO
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── nl-NL
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pl-PL
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pt-BR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── pt-PT
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── ru-RU
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── sv-SE
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── tr-TR
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── zh-CN
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       ├── zh-HK
│   │       │   ├── bootmgfw.efi.mui
│   │       │   └── bootmgr.efi.mui
│   │       └── zh-TW
│   │           ├── bootmgfw.efi.mui
│   │           └── bootmgr.efi.mui
│   └── systemd
│       └── systemd-bootx64.efi
├── initramfs-linux-fallback.img
├── initramfs-linux-rt-fallback.img
├── initramfs-linux-rt.img
├── initramfs-linux.img
├── loader
│   └── entries
│       └── arch.conf
├── vmlinuz-linux
└── vmlinuz-linux-rt
- Si j'ai bien compris j'ai bien mes deux entrée EFI (systemd-bootx64.efi et bootmgfw.efi) comment à partir de ça je crée un menu de démarrage avec ses deux entrées ?

Voila ce que j'ai dans mon entré arch.conf:

Code : Tout sélectionner

title Arch linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sda3 rw

Re: [Boot menu] Grand néttoyage.

Publié : lun. 16 nov. 2015, 18:13
par benjarobin
Lire le Wiki peut aider à comprendre le tout :-)

/EFI/Boot/BOOTx64.EFI c'est une partie du boot de Windows, pour garder une compatibilité avec certaine carte mère UEFI.
bootmgfw.efi est l'application EFI pour démarrer Windows.
systemd-bootx64.efi est l'application EFI offrant le menu de boot.

Je ne comprend pas trop ta question. Les 2 entrées sont bien dans la mémoire NVRAM de la carte mère, tu le montre toi même avec efibootmgr.

Et pour modifier le menu affiché par systemd-bootx64.efi il faut modifier la configuration du boot qui est dans $esp/loader/loader.conf
Fichier de configuration que tu n'as pas créé : https://wiki.archlinux.org/index.php/Sy ... figuration

Re: [Boot menu] Grand néttoyage.

Publié : lun. 16 nov. 2015, 19:02
par stantor
Ok, merci, nickel j'ai un joli menu au démarrage ^^.
Ce que j'ai fait, j'ai donc crée dans /boot/loader/ le fichier "loader.conf" pour avoir le menu avec dedans:

Code : Tout sélectionner

default  arch
timeout  4
editor   0
Dans /boot/loader/entries/ doivent se trouver les entrées, j'avais celle pour "arch", j'ai donc crée celle pour win "windows.conf"contenant:

Code : Tout sélectionner

title   Windows 7
efi     EFI/Microsoft/Boot/bootmgfw.efi
Encore une chose, dans un autre topic benjarobin, tu parlais du fait que ce n'était pas tres élégant d'avoir le noyau à la racine de boot, pour quel raison !?
Est ce que cela à voir avec cette page du wiki !? A quoi ça sert de faire ça mise en place auto, créer un dossier pour arch, etc...
https://wiki.archlinux.fr/ESP

Re: [Boot menu] Grand néttoyage.[Résolu]

Publié : lun. 16 nov. 2015, 21:28
par benjarobin
Tant que tu n'as qu'un seul Linux et que tu ne comptes pas faire de multiboot avec plusieurs distribution Linux cette solution à l'avantage d'être simple.
Mais si par exemple tu veux avoir 2 ArchLinux d’installés (pour différentes raisons) tu ne pourras pas le faire avec cette méthode. En effet le noyau / l'application efi qui se trouve à la racine de la partition ESP se nomme de la même façon, si tu met à jour le kernel d'un des 2 ArchLinux, tu ne pourras pas démarrer sur le second !
Mais plus généralement je trouve cela moche de mettre les fichiers de Linux à la racine de la partition ESP, ce n'est pas "propre"