Does Fat32 system work with Linux 18.04LTS

Asked by Pierre Paul Duchesne

My USB key with fat 32 partition is write protect and I can't write or erase anything on it. I create that partition with Linux 18.04 and it works for a while and for no reason it became write protect even if I'm the owner. It bugs me because I use that key to work on different pc whith Linux and Windows? Evven when I work with the same pc I have used to create the partition, it doen't work. I only can read the files. I can't change the permissions either.
Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Pierre Paul Duchesne
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Yes FAT32 works and works very well.

Is the file system consistent? (Use fsck on the unmounted file system to make sure it is healthy or scan in Windows)

When you unplug the storage from a system, do you use the safe remove feature in the OS before physically unplugging the device?

How are you mounting the storage?

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#2

See what I received as answer when I made a fsck
/home/pierre/Bureau/Capture du 2019-06-02 17-15-56.png

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#3

I always use the eject command to unplug my usb key. Last time I used it , was on windows 8.1 system. I just plug the device in the pc and it mount automaticaly. I have seen same problem on the french blog. Is it specific to the french version of Ubuntu 18.04?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

That link only works for people on your computer. You need to use an image hosting service like Imageshack to host it.

As the output will be text, just copy and paste the text as an update instw. Far easier.

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#5

I hope it is going to help you.

fsck de util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Numéro magique invalide dans le super-bloc
fsck.ext2 : Superbloc invalide, tentons d'utiliser les blocs de sauvetage...
fsck.ext2: Numéro magique invalide dans le super-bloc lors de la
tentative d'ouverture de /dev/sdd

Le superbloc n'a pu être lu ou ne contient pas un système de fichiers
ext2/ext3/ext4 correct. Si le périphérique est valide et qu'il contient
réellement
un système de fichiers ext2/ext3/ext4 (et non pas de type swap, ufs ou
autre),
alors le superbloc est corrompu, et vous pourriez tenter d'exécuter
e2fsck avec un autre superbloc :
     e2fsck -b 8193 <périphérique>
  ou
     e2fsck -b 32768 <périphérique>

Trouvé une table de partitions dos dans /dev/sdd
Thank you

Le 19-06-04 à 03 h 17, actionparsnip a écrit :
> Your question #681200 on util-linux in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> That link only works for people on your computer. You need to use an
> image hosting service like Imageshack to host it.
>
> As the output will be text, just copy and paste the text as an update
> instw. Far easier.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

What was the command that you have executed to receive this output?
I assume that you entered "fsck /dev/sdd", but this is wrong. You have to provide the name of a partition, not the name of the whole disk.

What is the output of the command
sudo fdisk -l /dev/sdd

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#7

The result of the command you ask me to do:
Disque /dev/sdd : 240 GiB, 257698037760 octets, 503316480 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0xf4095679

Périphérique Amorçage Début       Fin  Secteurs Taille Id Type
/dev/sdd1              2048 503316479 503314432   240G  b W95 FAT32

Le 19-06-06 à 03 h 43, Manfred Hampl a écrit :
> sudo fdisk -l /dev/sdd

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

OK then run:

sudo umount /dev/sdd1
sudo fsck /dev/sdd1

What is the output please?

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

You have to execute the file system check on /dev/sdd1

see also https://askubuntu.com/questions/147228/how-to-repair-a-corrupted-fat32-file-system

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#10

I hope it is going to help you.

fsck de util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Numéro magique invalide dans le super-bloc
fsck.ext2 : Superbloc invalide, tentons d'utiliser les blocs de
sauvetage...
fsck.ext2: Numéro magique invalide dans le super-bloc lors de la
tentative d'ouverture de /dev/sdd

Le superbloc n'a pu être lu ou ne contient pas un système de fichiers
ext2/ext3/ext4 correct. Si le périphérique est valide et qu'il contient
réellement
un système de fichiers ext2/ext3/ext4 (et non pas de type swap, ufs ou
autre),
alors le superbloc est corrompu, et vous pourriez tenter d'exécuter
e2fsck avec un autre superbloc :
     e2fsck -b 8193 <périphérique>
  ou
     e2fsck -b 32768 <périphérique>

Trouvé une table de partitions dos dans /dev/sdd
Thank you

Le 19-06-07 à 02 h 37, actionparsnip a écrit :
> Your question #681200 on util-linux in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> OK then run:
>
> sudo umount /dev/sdd1
> sudo fsck /dev/sdd1
>
> What is the output please?
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

The command that you need is not

sudo fsck /dev/sdd

but it is

sudo fsck /dev/sdd1

Note the number 1 at the end !!!!

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#12

Hello

I executed the command and it gave me this:

fsck de util-linux 2.31.1
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may
be corrupt.
1) Remove dirty bit
2) No action
? 1
/Karine23Mai19/Images/À VENDRE
   Contains a free cluster (1669109). Assuming EOF.
/Karine23Mai19/Images/Antho
   Contains a free cluster (1669673). Assuming EOF.
/Karine23Mai19/Images/2015 GRAVURE/Bérubé
   Contains a free cluster (1625298). Assuming EOF.
/Karine23Mai19/Images/2015 GRAVURE/Clic
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/2015 GRAVURE/CUBA 2013
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/AUTRES
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/Bérubé
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Musique
   Has a large number of bad entries. (896/954)
Drop directory ? (y/n) y
Reclaimed 372925 unused clusters (12220006400 bytes).
Free cluster summary wrong (6196960 vs. really 6297988)
1) Correct
2) Don't correct
? 1
Perform changes ? (y/n) y
/dev/sdd1: 19046 files, 1564379/7862367 clusters

After all this it still doen't allow me to paste anything on the key.
When I check the property of the key, it says that I have all the
permissions. It is like Ubuntu give me the permission but does not
recognise me as the owner.

A+

Le 19-06-08 à 09 h 22, Pierre Paul Duchesne a écrit :
> Your question #681200 on util-linux in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>
> Status: Answered => Open
>
> You are still having a problem:
> I hope it is going to help you.
>
> fsck de util-linux 2.31.1
> e2fsck 1.44.1 (24-Mar-2018)
> ext2fs_open2: Numéro magique invalide dans le super-bloc
> fsck.ext2 : Superbloc invalide, tentons d'utiliser les blocs de
> sauvetage...
> fsck.ext2: Numéro magique invalide dans le super-bloc lors de la
> tentative d'ouverture de /dev/sdd
>
> Le superbloc n'a pu être lu ou ne contient pas un système de fichiers
> ext2/ext3/ext4 correct. Si le périphérique est valide et qu'il contient
> réellement
> un système de fichiers ext2/ext3/ext4 (et non pas de type swap, ufs ou
> autre),
> alors le superbloc est corrompu, et vous pourriez tenter d'exécuter
> e2fsck avec un autre superbloc :
>     e2fsck -b 8193 <périphérique>
>  ou
>     e2fsck -b 32768 <périphérique>
>
> Trouvé une table de partitions dos dans /dev/sdd
> Thank you
>
> Le 19-06-07 à 02 h 37, actionparsnip a écrit :
>> Your question #681200 on util-linux in Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>>
>> Status: Open => Needs information
>>
>> actionparsnip requested more information:
>> OK then run:
>>
>> sudo umount /dev/sdd1
>> sudo fsck /dev/sdd1
>>
>> What is the output please?
>>

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#13

fsck de util-linux 2.31.1
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may
be corrupt.
1) Remove dirty bit
2) No action
? 1
/Karine23Mai19/Images/À VENDRE
   Contains a free cluster (1669109). Assuming EOF.
/Karine23Mai19/Images/Antho
   Contains a free cluster (1669673). Assuming EOF.
/Karine23Mai19/Images/2015 GRAVURE/Bérubé
   Contains a free cluster (1625298). Assuming EOF.
/Karine23Mai19/Images/2015 GRAVURE/Clic
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/2015 GRAVURE/CUBA 2013
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/AUTRES
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Images/Bérubé
   Has a large number of bad entries. (1024/1024)
Drop directory ? (y/n) y
/Karine23Mai19/Musique
   Has a large number of bad entries. (896/954)
Drop directory ? (y/n) y
Reclaimed 372925 unused clusters (12220006400 bytes).
Free cluster summary wrong (6196960 vs. really 6297988)
1) Correct
2) Don't correct
? 1
Perform changes ? (y/n) y
/dev/sdd1: 19046 files, 1564379/7862367 clusters

Le 19-06-08 à 09 h 32, Manfred Hampl a écrit :
> Your question #681200 on util-linux in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> The command that you need is not
>
> sudo fsck /dev/sdd
>
> but it is
>
> sudo fsck /dev/sdd1
>
> Note the number 1 at the end !!!!
>

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#14

After all this it still doen't allow me to paste anything on the key.
When I check the property of the key, it says that I have all the
permissions. It is like Ubuntu give me the permission but does not
recognise me as the owner.

A+

Le 19-06-08 à 09 h 32, Manfred Hampl a écrit :
> Your question #681200 on util-linux in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/util-linux/+question/681200
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> The command that you need is not
>
> sudo fsck /dev/sdd
>
> but it is
>
> sudo fsck /dev/sdd1
>
> Note the number 1 at the end !!!!
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

What happens if you repeat running fsck?
Does it still shows errors to repair?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#16

Run:

sudo e2fsck -b 32768 /dev/sdd1

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

@actionparsnip: the partition is formatted as FAT32, not ext2!
running e2fsk against it is nonsense!

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#18

I have tried it on my laptop, same answer.

pierre@pierre-Satellite-L70D-A:~$ sudo e2fsck -b 32768 /dev/sdb1
e2fsck 1.44.1 (24-Mar-2018)
e2fsck: Numéro magique invalide dans le super-bloc lors de la tentative
d'ouverture de /dev/sdb1

Le superbloc n'a pu être lu ou ne contient pas un système de fichiers
ext2/ext3/ext4 correct. Si le périphérique est valide et qu'il contient
réellement
un système de fichiers ext2/ext3/ext4 (et non pas de type swap, ufs ou
autre),
alors le superbloc est corrompu, et vous pourriez tenter d'exécuter
e2fsck avec un autre superbloc :
     e2fsck -b 8193 <périphérique>
  ou
     e2fsck -b 32768 <périphérique>

/dev/sdb1 contient un système de fichiers vfat étiqueté « PORTABLE »

pierre@pierre-Satellite-L70D-A:~$ sudo e2fsck -b 8193 /dev/sdb1
e2fsck 1.44.1 (24-Mar-2018)
e2fsck: Numéro magique invalide dans le super-bloc lors de la tentative
d'ouverture de /dev/sdb1

Le superbloc n'a pu être lu ou ne contient pas un système de fichiers
ext2/ext3/ext4 correct. Si le périphérique est valide et qu'il contient
réellement
un système de fichiers ext2/ext3/ext4 (et non pas de type swap, ufs ou
autre),
alors le superbloc est corrompu, et vous pourriez tenter d'exécuter
e2fsck avec un autre superbloc :
     e2fsck -b 8193 <périphérique>
  ou
     e2fsck -b 32768 <périphérique>

/dev/sdb1 contient un système de fichiers vfat étiqueté « PORTABLE »

Le 19-06-08 à 10 h 37, actionparsnip a écrit :
> sudo e2fsck -b 32768 /dev/sdd1

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#19

Yes still some errors. I tried it on my laptop with Ubuntu 18.04

pierre@pierre-Satellite-L70D-A:~$ sudo fsck /dev/sdb1
fsck de util-linux 2.31.1
fsck.fat 4.1 (2017-01-24)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may
be corrupt.
1) Remove dirty bit
2) No action
? 1
Orphaned long file name part "Musique"
1: Delete.
2: Leave it.
? 1
Orphaned long file name part "Bérubé"
1: Delete.
2: Leave it.
? 1
/Karine23Mai19/Images/À VENDRE
  Start does point to root directory. Deleting dir.
/Karine23Mai19/Images/Antho
  Start does point to root directory. Deleting dir.
Orphaned long file name part "Clic"
1: Delete.
2: Leave it.
? 1
Orphaned long file name part "CUBA 2013"
1: Delete.
2: Leave it.
? 1
/Karine23Mai19/Images/2015 GRAVURE/Bérubé
  Start does point to root directory. Deleting dir.
Perform changes ? (y/n) y
/dev/sdb1: 13993 files, 1564374/7862367 clusters
pierre@pierre-Satellite-L70D-A:~$

Le 19-06-08 à 09 h 43, Manfred Hampl a écrit :
> Manfred Hampl requested more information:

Revision history for this message
Pierre Paul Duchesne (ppduchesne) said :
#20

After I ran the command `` sudo fsck /dev/sdb1`` a second time, I had to correct some errors, and I don't know if you belive in miracle but it works now. Seriously there is no miracle there, it's only with your precious help that we succeed in resolving that problem.
Thank you very much.

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

I do not think that this was a miracle.
When running a file system check that does repairs, you should repeat running it once more to verify, whether all errors have been corrected, or if there are additional errors to repair.