Hi Andreas, I can explain my problem and I can give you a solution for this ! But I need you why this ! :) Ok, i have created a script build.sh : $dd if=/dev/zero of=OSMC_TGT.img bs=1M count=256 $parted -s OSMC_TGT.img mklabel msdos $parted -s OSMC_TGT.img mkpart primary fat32 1M 256M $kpartx -a OSMC_TGT.img $mkfs.vfat -F32 /dev/mapper/loop0p1 $mount /dev/mapper/loop0p1 /mnt $touch /mnt/file.txt $umount /mnt $sync $kpartx -d OSMC_TGT.img If I execute this script on my laptop (sudo build.sh), I have this output : 256+0 enregistrements lus 256+0 enregistrements écrits 268435456 octets (268 MB) copiés, 0,707003 s, 380 MB/s mkfs.fat 3.0.27 (2014-11-12) /dev/mapper/loop0p1: No such file or directory mount: le périphérique spécial /dev/mapper/loop0p1 n'existe pas umount: /mnt : non monté loop deleted : /dev/loop1 So, I have the error : umount: /mnt : non monté The umount command is fail, but if i add the sleep command on my script before the mkfs command, my script works good ! $dd if=/dev/zero of=OSMC_TGT.img bs=1M count=256 $parted -s OSMC_TGT.img mklabel msdos $parted -s OSMC_TGT.img mkpart primary fat32 1M 256M $kpartx -a OSMC_TGT.img $sleep 5 $mkfs.vfat -F32 /dev/mapper/loop0p1 $mount /dev/mapper/loop0p1 /mnt $touch /mnt/file.txt $umount /mnt $sync $kpartx -d OSMC_TGT.img The umount command fails, but if I add the sleep command on my script before the mkfs command, my script works good ! Why ? Bug or not bug ? :) Today I am not locked but I wish have an explanation.... if that was possible ! On 15/08/2015 13:23, Andreas Bombe
wrote:
On Fri, Aug 14, 2015 at 08:17:39PM +0200, aimless wrote:I can't create a FAT32 partition with this command dosfstools: mkfs.vfat -F32.For example, you can try this : $dd if=/dev/zero of=OSMC_TGT.img bs=1M count=256 256+0 enregistrements lus 256+0 enregistrements écrits 268435456 octets (268 MB) copiés, 1,05195 s, 255 MB/s $parted -s OSMC_TGT.img mklabel msdos $parted -s OSMC_TGT.img mkpart primary fat32 1M 256M $kpartx -a OSMC_TGT.img mkfs.fat 3.0.27 (2014-11-12) unable to get drive geometry, using default 255/63 $mount /dev/mapper/loop0p1 /mnt $touch /mnt/file.txt $umount /mnt $sync $kpartx -d OSMC_TGT.img loop deleted : /dev/loop0I tried this, and it works. Just like it appears to work for you. What is the problem here exactly?Before, I don't have this message : unable to get drive geometry, using default 255/63 Can you help me please ?With suppressing an informational message? Your bug report doesn't point to anything actually a bug, as far as I can see. Please explain better, otherwise I can only close this bug report. |
- Bug#795500: dosfstools: mkfs.vfat -F32 don't work correctly Plançon
- Bug#795500: dosfstools: mkfs.vfat -F32 don't work correctly Plançon