Partition fat32 impossible à monter sous windows

Bonjour,
Je crée une clé contenant deux partitions : une ext3 et une vfat. Problème : la partition fat32 est illisible depuis windows (xp). Une lettre est attribuée à la clé, elle pointe sur la première partition (ext3) d’après le gestionnaire de périphérique de windows.

Voilà comment je crée la clé :

dd if=/dev/zero bs=1 seek=446 count=64 of=/dev/sdc echo -e "n\np\n1\n\n+2048M\nn\np\n2\n\n\na\n1\nt\n2\nb\nw\n" | fdisk /dev/sdc mkfs.ext3 /dev/sdc1 mkfs.vfat /dev/sdc2 tune2fs -L "XYZ" /dev/sdc1

Ce que me dit disktype :

Block device, size 7.260 GiB (7795113984 bytes) GRUB boot loader, compat version 3.2, boot drive 0xff DOS/MBR partition map Partition 1: 1.916 GiB (2056979456 bytes, 4017538 sectors from 62, bootable) Type 0x83 (Linux) Ext3 file system Volume name "XYZ" UUID XYZ (DCE, v4) Volume size 1.916 GiB (2056978432 bytes, 502192 blocks of 4 KiB) Partition 2: 5.343 GiB (5736775680 bytes, 11204640 sectors from 4017600) Type 0x0B (Win95 FAT32) FAT32 file system (hints score 5 of 5) Volume size 5.332 GiB (5725573120 bytes, 1397845 clusters of 4 KiB) Volume name ""

Après avoir lu le man de fdisk, j’ai tenté ceci juste avant le formatage de la partition fat :

[code]

bug DOS 6.x FORMAT

dd if=/dev/zero of=/dev/sdc2 bs=512 count=1[/code]
Résultat : la clé n’est plus reconnue par windows.

Comment faire pour que cette partition fat soit lisible par windows ? Où est l’erreur ? Merci

Je m’en suis sorti en inversant l’ordre des partitions.

Thread clos :slightly_smiling:

Salut,

Cette commande efface le PBR (partition boot record) de la partition ? Dans quel but ?

[quote=“ggoodluck47”]Salut,

Cette commande efface le PBR (partition boot record) de la partition ? Dans quel but ?[/quote]

J’ai essayé à tout hasard après avoir lu ceci dans le man de fdisk :

[code]DOS 6.x WARNING
The DOS 6.x FORMAT command looks for some information in the first sector of the data area of the partition, and treats this information as more
reliable than the information in the partition table. DOS FORMAT expects DOS FDISK to clear the first 512 bytes of the data area of a partition
whenever a size change occurs. DOS FORMAT will look at this extra information even if the /U flag is given – we consider this a bug in DOS FORMAT
and DOS FDISK.

   The bottom line is that if you use cfdisk or fdisk to change the size of a DOS partition table entry, then you must also use dd to zero the first 512
   bytes  of  that partition before using DOS FORMAT to format the partition.  For example, if you were using cfdisk to make a DOS partition table entry
   for /dev/hda1, then (after exiting fdisk or cfdisk and rebooting Linux so that the partition table information is valid) you would  use  the  command
   "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero the first 512 bytes of the partition.

   BE EXTREMELY CAREFUL if you use the dd command, since a small typo can make all of the data on your disk useless.

[/code]