Preseed Debian Squeeze

Bonjour à tous,

J’ai un petit souci avec mon preseed concernant le partitionnement des disques. J’ai deux disques d’1To chacun que je souhaite mettre en RAID1 et LVM. Voici ma démarche

[code]- Une partition ext3 /boot hors raid1 (pour LILO)

  • Utilisation des deux disques en RAID
    • Configuration du RAID pour utiliser les deux disque /dev/sda et /dev/sdb
  • Configuration du /dev/md0 pour utiliser LVM
  • Configuration de LVM
    • Création du volume groupe vg01 sur /dev/md0
      • Ajout de volumes logiques
        - root 1Go
        - swap 8Go
        - tmp 1Go
        - usr 2Go
        - var 2Go[/code]

Voici la partie partitionnement de mon fichier preseed :

[code]# /boot
d-i partman-auto/disk string /dev/sda
d-i partman-auto/expert_recipe string
boot ::
128 128 128 ext3
$primary{ } $bootable{ }
method{ format } format{ }
use_filesystem{ } filesystem{ ext3 }
mountpoint{ /boot }
.

partitioning RAID1

partman-auto/method string raid
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/expert_recipe string
raid ::
1024000 1024000 1024000 raid
$lvmignore{ }
$primary{ }
method{ raid }
.

d-i partman-auto-raid/recipe string
1 2 0 lvm -
/dev/sda1#/dev/sdb1
.

Partitioning LVM

d-i partman-auto/method string lvm
d-i partman-auto/disk string /dev/md0
d-i partman-auto-lvm/new_vg_name string vg0
d-i partman-lvm/vgcreate string vg0

1024 1024 1024 ext3
$lvmok{ } in_vg{ vg0 } lv_name{ root }
method{ format } format{ }
use_filesystem{ } filesystem{ ext3 }
mountpoint{ / }
.
8096 8096 8096 linux-swap
$lvmok{ } in_vg{ vg0 } lv_name{ swap }
method{ swap } format{ }
.
1024 1024 1024 ext3
$lvmok{ } in_vg{ vg0 } lv_name{ tmp }
method{ format } format{ }
use_filesystem{ } filesystem{ ext3 }
mountpoint{ /tmp }
.
2048 2048 2048 ext3
$lvmok{ } in_vg{ vg0 } lv_name{ usr }
method{ format } format{ }
use_filesystem{ } filesystem{ ext3 }
mountpoint{ /usr }
.
2048 2048 2048 ext3
$lvmok{ } in_vg{ vg0 } lv_name{ var }
method{ format } format{ }
use_filesystem{ } filesystem{ ext3 }
mountpoint{ /var }
.

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true[/code]

Tout se passe bien jusqu’au partitionnement ou j’ai un message d’erreur me disant qu’aucun système de fichier racine n’a été défini.

Lorsque je fais une installation manuelle, il faut, après la partie LVM (une fois revenu au menu principal du partitionnement) mapper les partitions LVM avec les points de montage (genre le LVM root avec /). N’est-ce pas ce que fait

1024 1024 1024 ext3 \ $lvmok{ } in_vg{ vg0 } lv_name{ root } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext3 } \ mountpoint{ / }

a la derniere ligne ?

Bref je suis perdu, totalement et je pense qu’il y a de quoi entre le RAID et le LVM en preseed!

Merci de votre aide, et excellente année 2010 à tous!

Salut,

1 - Ton swap de 8 Go est démentiel
2 - Effectivement il faut lors de l’install lui dire “à nouveau” où se montent les partitions (pour moi sous lvm2 du moins)

[quote=“ggoodluck47”]Salut,

1 - Ton swap de 8 Go est démentiel [/quote]
Pas si il a 8G de RAM et fait de l’hibernation, même si on peut compter sur une minimum de compression. Les autres partitions me paraissent un chouïa faibles partitculièrement /var

Merci de vous intéresser à mon probleme. J’ai effectivement 8GB de RAM. Et sinon pour les partitions réduites le LVM me permettera d’agrandir mes partitions en cas de besoin (je sais d’avance que je n’en aurai pas besoin).

Mais du coup, une fois LVM configuré, comment matcher mes partitions LVM et mes montages ?
Ex :

d-i partman-auto/expert_recipe string \ part :: \ 1024 1024 1024 ext3 \ $primary{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext3 } \ mountpoint{ / } \ .
La nul part je dis que je veux que le montage de / se fasse sur la partition LVM nommée “root”. J’indique une partition de 1Go, rien de plus.

C’est pas cela que veut dire mountpoint ?

Ben c’est un point de montage comme un autre. Le souci c’est que rien ne précise à l’outil de partitionnement quel montage sera monté sur quelle partition. A part la taille des partoches LVM et les tailles indiquées pour les montages. Mais c’est bien ambigüe!

Petit up, j’ai modifié mon fichier preseed et maintenant j’ai l’erreur

“No root file system is defined”

[code]# Partition /boot hors RAID1 et hors LVM sur /dev/sda
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string
boot ::
128 128 128 ext3
$primary{ }
$bootable{ }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ /boot }
.

partitioning RAID1 avec disques /dev/sda et /dev/sdb

d-i partman-auto/method string raid

sda2 car sda1 = /boot

d-i partman-auto/disk string /dev/sda2 /dev/sdb1
d-i partman-auto/expert_recipe string
raid1 ::
1000070 1000070 1000070 raid
$primary{ }
method{ raid }
.

RAID1 avec 2 disques et 0 de spare et utiliser du LVM

d-i partman-auto-raid/recipe string
1 2 0 lvm -
/dev/sda2#/dev/sdb1
.

On utilise le RAID1 que l’on vient de creer

d-i partman-auto/disk string /dev/md0

On veut du LVM

d-i partman-auto/method string lvm

On supprime un ancien LVM si present

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true

Notre recette

d-i partman-auto/expert_recipe string \

Je ne suis pas sur des 8 lignes suivantes

lvm :: \
1000103 1000103 1000103 ext3
$defaultignore{ } \
$primary{ } \
method{ lvm } \

Notre device raid

device{ /dev/md0 }              \ 
vg_name{ vg01 }			\

. \

Volume logique root 1GB /

1024 1024 1024 ext3
$lvmok{ }
in_vg{ vg01 }
lv_name{ root }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ / }
. \

Volume logique swap de 8GB

8096 8096 8096 swap
$lvmok{ }
in_vg{ vg01 }
lv_name{ swap }
method{ swap }
format{ }
. \

volume logique tmp 1GB

1024 1024 1024 ext3
$lvmok{ }
in_vg{ vg01 }
lv_name{ tmp }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ /tmp }
. \

Volume logique /usr 2GB

2048 2048 2048 ext3
$lvmok{ }
in_vg{ vg01 }
lv_name{ usr }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ /usr }
. \

Volume logique /var 2GB

2048 2048 2048 ext3
$lvmok{ }
in_vg{ vg01 }
lv_name{ var }
method{ format } \
format{ }
use_filesystem{ }
filesystem{ ext3 }
mountpoint{ /var }
.

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true[/code]

Re,

Donc la ligne “filesystem{ ext3 } mountpoint{ /boot }”

a bien la signification que nous lui accordions !

[quote=“frenchviking”]Petit up, j’ai modifié mon fichier preseed et maintenant j’ai l’erreur

“No root file system is defined”

[code]# Partition /boot hors RAID1 et hors LVM sur /dev/sda
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string
boot ::
128 128 128 ext3
$primary{ }
$bootable{ }
method{ format }
format{ } \


[/code][/quote]
Réponse 2 siécle + tard: il y a un bug: il faut écrire la recette sur une seule ligne:
Cf.: hilpers.fr/1066531-installat … tionnement