Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 25/01/2023, à 16:28

Aymeric

preseed - problème de chiffrement de disque

Bonjour,

J'essaye de créer un ISO Ubuntu 22.04 intégrant le chiffrement automatique du disque.

Le problème est que lorsque je lance l'installation de mon système, un message d'erreur apparaît pendant le traitement du partitionnement.

En faisant des recherches, j'ai l'impression de faire les choses correctement pourtant je me prends ce message à chaque fois.

Petite édition de mon message dans laquelle je rajoute le message d'erreur que j'ai oublié
rbkp7y9t87ea1.png?width=623&format=png&auto=webp&v=enabled&s=cf1bfa807de9f551a578bb89dc26702a82096a36

Ci-dessous, la partie de mon preseed concernant le partitionnement :

# -------- Partitioning --------
ubiquity partman/early_command string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
ubiquity partman-auto/method string crypto
ubiquity partman-crypto/confirm boolean true
ubiquity partman-crypto/passphrase password MonMotDePasse
ubiquity partman-crypto/passphrase-again password MonMotDePasse
ubiquity partman-crypto/warn_erase boolean true
ubiquity partman-crypto/weak_passphrase boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

Si quelqu'un a une idée de ce qui peut se produire.

NB: j'utilise Cubic pour créer l'ISO

Dernière modification par Aymeric (Le 25/01/2023, à 16:39)

Hors ligne

#2 Le 25/01/2023, à 16:35

iznobe

Re : preseed - problème de chiffrement de disque

Bonjour , je n' ai pas d' idée , mais tu ne dis pas quel message tu recois a chaque fois ... Pourtant je suis persuadé que c' est important big_smile


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#3 Le 25/01/2023, à 16:38

Aymeric

Re : preseed - problème de chiffrement de disque

big_smile
Effectivement sans le message d'erreur c'est plus compliqué.
Le voici donc :
rbkp7y9t87ea1.png?width=623&format=png&auto=webp&v=enabled&s=cf1bfa807de9f551a578bb89dc26702a82096a36

Hors ligne

#4 Le 25/01/2023, à 16:46

iznobe

Re : preseed - problème de chiffrement de disque

ca ne viendrait pas du fait ( pure suggestion , je ne m ' y entends absolument pas ) que tu demande d' ecrire l ' etiquette  avant de confirmer les choix ?

d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

si a la place tu mets :

d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

d-i partman-partitioning/confirm_write_new_label boolean true

write , ca devrait venir a la fin non ?

Dernière modification par iznobe (Le 25/01/2023, à 16:47)


retour utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#5 Le 26/01/2023, à 09:15

Aymeric

Re : preseed - problème de chiffrement de disque

Merci pour ta réponse.
Pour le coup c'est écrit comme ça dans la doc, mais dans le doute j'ai quand même fait la modification que tu m'as suggérée mais hélas sans résultat positif.

Hors ligne

#6 Le 01/03/2023, à 11:08

jlmas

Re : preseed - problème de chiffrement de disque

Si ça peut aider, un extrait de notre preseed crypt LVM. Attention c'est géré par le logiciel foreman dans notre cas, donc il y a  des variables qui sont préremplies par la base de données de foreman (c'est du ruby donc les variables sont de type <%= une_variable %>)

Néanmoins les commandes preseed sont complètes et devraient pouvoir te donner des pistes


<%#
kind: ptable
name: Preseed default LVM
model: Ptable
oses:
- Debian
- Ubuntu
%>
<%
  partitioning_method = host_param('partitioning-method') ? host_param('partitioning-method') : 'crypto'
  partitioning_recipe = host_param('partitioning-recipe') ? host_param('partitioning-recipe') : 'home'
  partitioning_expert_recipe = host_param('partitioning-expert-recipe') ? host_param('partitioning-expert-recipe') : ''
  vg_name = host_param('partitioning-vg-name') ? host_param('partitioning-vg-name') : 'vg00'
  partitioning_filesystem = host_param('partitioning-filesystem') ? host_param('partitioning-filesystem') : ''
  partitioning_crypto_erase = host_param('partitioning-crypto-erase') ? host_param('partitioning-crypto-erase') : 'false'
  partitioning_crypto_password = host_param('partitioning-crypto-password') ? host_param('partitioning-crypto-password') : 'ubuntu'
  partitioning_crypto_password_weak = host_param('partitioning-crypto-password-weak') ? host_param('partitioning-crypto-password-weak') : 'true'
-%>

<% if host_param('install-disk') -%>
d-i partman-auto/disk string <%= host_param('install-disk') %>
d-i grub-installer/bootdev string <%= host_param('install-disk') %>
<% else -%>
# Use the first detected hard disk
d-i partman/early_command string \
  INSTALL_DISK="$(list-devices disk | head -n1)"; \
  debconf-set partman-auto/disk "$INSTALL_DISK"; \
  debconf-set grub-installer/bootdev "$INSTALL_DISK"
<% end -%>

### Partitioning
# The presently available methods are: "regular", "lvm" and "crypto"
d-i partman-auto/method string <%= partitioning_method %>

# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true

<% if partitioning_method == 'lvm' or partitioning_method == 'crypto' -%>
# For LVM partitioning, you can select how much of the volume group to use
# for logical volumes.
d-i partman-auto-lvm/guided_size string 80%
<% if partitioning_method == 'crypto' -%>
d-i partman-crypto/erase_data boolean <%= partitioning_crypto_erase %>
d-i partman-crypto/passphrase password <%= partitioning_crypto_password %>
d-i partman-crypto/passphrase-again password <%= partitioning_crypto_password %>
d-i partman-crypto/weak_passphrase boolean <%= partitioning_crypto_password_weak %>
<% end -%>
<% if vg_name != '' -%>
d-i partman-auto-lvm/new_vg_name string <%= vg_name %>
<% end -%>
<% end -%>

<% if host_param_true?('partitioning-allow-noswap') -%>
d-i partman-basicfilesystems/no_swap boolean false
<% end -%>

<% if host_param('partitioning-disk-label') -%>
d-i partman-partitioning/choose_label string <%= host_param('partitioning-disk-label') %>
d-i partman-partitioning/default_label string <%= host_param('partitioning-disk-label') %>
<% end -%>

# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home:   separate /home partition
# - multi:  separate /home, /var, and /tmp partitions (/usr was removed in jessie)
d-i partman-auto/choose_recipe select <%= partitioning_recipe %>

<% if partitioning_expert_recipe != '' -%>
# Or provide a recipe of your own...
# If you have a way to get a recipe file into the d-i environment, you can
# just point at it.
d-i partman-auto/expert_recipe string \
<%= partitioning_expert_recipe.gsub(/(?:\n\r?|\r\n?)/, " \\\n") %>

<% end -%>

# If you just want to change the default filesystem to something
# else, you can do that without providing a full recipe.
<% if partitioning_filesystem != '' -%>
d-i partman/default_filesystem string <%= partitioning_filesystem %>
<% end -%>

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

Dernière modification par jlmas (Le 01/03/2023, à 11:08)

Hors ligne