# Os-prober avec partition /boot chiffrée

**URL:** <https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499>\
**Category:** Support Debian\
**Created:** [Janvier 29, 2024, 12:10 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499 "2024-01-29T12:10:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 29, 2024, 12:10 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/1 "2024-01-29T12:10:18Z")

</div>

Bonjour,  
J’ai les partitions suivantes:

```auto
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                                                 
└─sda1 ntfs DATA 30F80CC6F80C8BF2                                      
nvme1n1                                                                                                             
├─nvme1n1p1 vfat FAT32 SYSTEM 7E71-989A                                             
├─nvme1n1p2                                                                                                         
├─nvme1n1p3 ntfs Windows B898725098720CDE                                      
├─nvme1n1p4 ntfs WinRE D85822B8582294F2                                      
└─nvme1n1p5 ntfs RecoveryImage EE5C253E5C250347                                      
nvme0n1                                                                                                             
├─nvme0n1p1 vfat FAT32 9A35-7A72 205,3M 0% /boot/efi
└─nvme0n1p2 crypto_LUKS 2 e5d192ae-eece-4ef3-bac4-73ccefdd6aaf                  
  └─nvme0n1p2_crypt LVM2_member LVM2 001 vii0mV-oeMI-YPPG-3lg0-RzKO-EAK5-rkbSP7                
    ├─cynv01-swap swap 1 96c7da65-d8ce-4383-bd99-24dccea0a4bd [SWAP]
    ├─cynv01-boot ext4 1.0 BOOT cfb6388f-e5e6-45fd-bd0b-fb60618b4bf5 92,5M 51% /boot
    ├─cynv01-root ext4 1.0 ROOT b15ca83c-5443-4c99-8c33-edfbcd305b63 79,3G 8% /
    ├─cynv01-home ext4 1.0 HOME 26c902cb-36bc-4784-a1cd-9d46de257343 21,5G 0% /home
    ├─cynv01-var ext4 1.0 VAR 9164938f-bbad-4e28-a0dc-5531f70d3c94 84,7G 2% /var
    ├─cynv01-var_log ext4 1.0 LOG 2fcf8989-9653-4248-bf56-ec3fde5c708d 21,5G 0% /var/log
    ├─cynv01-var_log_audit ext4 1.0 AUDIT 29c98662-7064-4136-970d-75aaab620eb6 21,5G 0% /var/log/audit
    ├─cynv01-var_tmp ext4 1.0 VARTMP b5869730-a5aa-4210-b74a-6eac091b6308 6,8G 0% /var/tmp
    └─cynv01-tmp ext4 1.0 TMP 3d433ec7-59f2-4cfb-8e63-1cb168b41e72 6,8G 0% /tmp

```

- nvme0n1 est un disque dédié linux
- nvme1n1 est un disque dédié windows
- /dev/sda est un disque data pour windows.

Lors de l’installation de linux, en chiffré (LVM over Luks) les partition de démarrage sont chiffrée, y compris l’accès au grub (il faut entrer la clef de chiffrement pour obtenir le menu grub, puis pour lancer la partition de démrrage linux).

Faire un `update-grub` ne fonctionne pas pour ajouter la partition windows au menu GRUB.

Pourtant l’option nécéssaire à os-prober est bien mise comme il faut dans /etc/default/grub:

```auto
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="video=1280x1024 quiet splash"
GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor audit=1 audit_backlog_limit=8192"

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

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1280x1024
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# Setup Grub menu
GRUB_BACKGROUND="/boot/grub/enedwaith-org-scdd.png"
COLOR_NORMAL="blue/black"
#MENU_COLOR_NORMAL="ligh-blue/black"

# Set os_prober active as it is disable by default in bookworm
GRUB_DISABLE_OS_PROBER=false

# Allow bootloader in a cryptodisk environment
GRUB_ENABLE_CRYPTODISK=y

```

Sans modifier quoi que ce soit au niveau `/boot/grub/grub.cfg` c’est à dire en utilisant exclusivement `/etc/default/grub`, ainsi que `/etc/grub.d/`, comment puis-je ajouter windows au menu de démarrage GRUB ?

---

<div class="post-metadata">

**Author:** ![PascalHambourg](https://www.debian-fr.org/user_avatar/www.debian-fr.org/pascalhambourg/32/5837_2.png) [@PascalHambourg](https://www.debian-fr.org/u/PascalHambourg)\
**Post date:** [Janvier 29, 2024, 3:24 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/2 "2024-01-29T15:24:24Z")

</div>

> [@Zargos](#):
>
> Faire un `update-grub` ne fonctionne pas pour ajouter la partition windows au menu GRUB.

Que dit os-prober ?

> [@Zargos](#):
>
> Pourtant l’option nécéssaire à os-prober est bien mise comme il faut dans /etc/default/grub

Tu aurais pu décommenter la ligne existante au lieu d’en ajouter une nouvelle.

> [@Zargos](#):
>
> comment puis-je ajouter windows au menu de démarrage GRUB ?

Grâce à os-prober, ou, si ça ne marche pas, en ajouter une entrée de menu à la main dans /etc/grub.d/30\_os-prober.

En tout cas tout ça n’a rien à voir avec /boot chiffré.

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 29, 2024, 3:49 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/3 "2024-01-29T15:49:46Z")

</div>

> [@PascalHambourg](#):
>
> Que dit os-prober ?

Aucun message c’est bien ce qui me préoccupe.

```auto
# update-grub 
Generating grub configuration file ...
Found background: /boot/grub/enedwaith-org-scdd.png
Found background image: /boot/grub/enedwaith-org-scdd.png
Found linux image: /boot/vmlinuz-6.5.0-0.deb12.4-amd64
Found initrd image: /boot/initrd.img-6.5.0-0.deb12.4-amd64
Found linux image: /boot/vmlinuz-6.1.0-17-amd64
Found initrd image: /boot/initrd.img-6.1.0-17-amd64
Adding boot menu entry for UEFI Firmware Settings ...
done

```

Et coté logs il n’y a rien.

> [@PascalHambourg](#):
>
> Tu aurais pu décommenter la ligne existante au lieu d’en ajouter une nouvelle.

Ah mince, je ne l’avais pas vu. Dans mes travaux originel cette option n’y était pas 🙂 c’est arrive avec Bookworm en fait 🙂 il va me falloir modifier mon script de postinstallation.

> [@PascalHambourg](#):
>
> En tout cas tout ça n’a rien à voir avec /boot chiffré.

Mon installation a créé une nouvelle partition EFI. L’autre OS est lui déclaré sur un autre EFI. Est-ce à cause de ça que j’ai le problème?  
Si j’arrivais à migrer l’ancie EFI de mon windows vers le nouel EFI os-prober puisse le voir?

---

<div class="post-metadata">

**Author:** ![PascalHambourg](https://www.debian-fr.org/user_avatar/www.debian-fr.org/pascalhambourg/32/5837_2.png) [@PascalHambourg](https://www.debian-fr.org/u/PascalHambourg)\
**Post date:** [Janvier 29, 2024, 4:18 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/4 "2024-01-29T16:18:28Z")

</div>

> [@Zargos](#):
>
> `update-grub`

J’ai demandé la sortie d’os-prober, pas update-grub.

> [@Zargos](#):
>
> Mon installation a créé une nouvelle partition EFI. L’autre OS est lui déclaré sur un autre EFI. Est-ce à cause de ça que j’ai le problème?

Normalement non. os-prober scanne toutes les partitions de tous les disques.  
Mais tu peux copier le répertoire EFI/Microsoft dans la partition EFI de Debian pour tester.

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 31, 2024, 7:11 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/5 "2024-01-31T07:11:57Z")

</div>

> [@PascalHambourg](#):
>
> > [@Zargos](#):
> >
> > `update-grub`
> 
> J’ai demandé la sortie d’os-prober, pas update-grub.

Il n’y en a pas quand je lance update-grub.  
Mais j’ai finalement trouvé, le paquet os-prober n’était pas installé. Il faut que je pense à l’ajouter dans mon simple-cdd pour mes profils chiffrés.

---

<div class="post-metadata">

**Author:** ![PascalHambourg](https://www.debian-fr.org/user_avatar/www.debian-fr.org/pascalhambourg/32/5837_2.png) [@PascalHambourg](https://www.debian-fr.org/u/PascalHambourg)\
**Post date:** [Janvier 31, 2024, 7:42 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/6 "2024-01-31T07:42:42Z")

</div>

> [@Zargos](#):
>
> Il n’y en a pas quand je lance update-grub.

Evidemment. Quand tu lances update-grub tu obtiens la sortie d’update-grub, pas d’os-prober.  
Qu’est-ce qui n’est pas clair dans «&nbsp;que dit os-prober&nbsp;» et te fait lancer update-grub au lieu d’os-prober ?

> [@Zargos](#):
>
> Mais j’ai finalement trouvé, le paquet os-prober n’était pas installé.

Tu l’aurais trouvé plus tôt si tu avais fait ce que je demandais.

```
# os-prober
bash: os-prober : commande introuvable
```

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 31, 2024, 7:45 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/7 "2024-01-31T07:45:15Z")

</div>

> [@PascalHambourg](#):
>
> Tu l’aurais trouvé plus tôt si tu avais fait ce que je demandais.
> 
> ```auto
> # os-prober
> bash: os-prober : commande introuvable
> 
> ```

Ben c’st ce que j’ai fait en fait, et je ne comprenait pas pourquoi la commande était introuvable 🙂

---

<div class="post-metadata">

**Author:** ![PascalHambourg](https://www.debian-fr.org/user_avatar/www.debian-fr.org/pascalhambourg/32/5837_2.png) [@PascalHambourg](https://www.debian-fr.org/u/PascalHambourg)\
**Post date:** [Janvier 31, 2024, 8:14 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/8 "2024-01-31T08:14:42Z")

</div>

Il n’y a pourtant pas 50 possibilités : elle n’est pas dans le $PATH (environnement root incomplet), ou bien elle n’est pas installée.

---

<div class="post-metadata">

**Author:** ![Zargos](https://www.debian-fr.org/user_avatar/www.debian-fr.org/zargos/32/10889_2.png) [@Zargos](https://www.debian-fr.org/u/Zargos)\
**Post date:** [Janvier 31, 2024, 5:35 UTC](https://www.debian-fr.org/t/os-prober-avec-partition-boot-chiffree/89499/9 "2024-01-31T17:35:33Z")

</div>

c’est pour ça que j’ai finit par trouver 😉
