Package: dosfstools
Version: 4.1-2

Firstly create an FAT FS with alignment. Obviously 62 sectors are wasted:

root:/u/h/root> mkfs.fat -D 0x00 -f 1 -F 32 -h 0 -I -m /dev/null -M 0xF0 -n 
TEST -R 2 -s 64 -vv /dev/sdg
mkfs.fat 4.1 (2017-01-24)
attribute "partition" not found
Boot jump code is eb 58
Using 2 reserved sectors
Trying with 64 sectors/cluster:
FAT12: #clu=967090, fatlen=2880, maxclu=4080, limit=4080
FAT12: too much clusters
FAT16: #clu=967075, fatlen=3840, maxclu=65520, limit=65520
FAT16: too much clusters
FAT16: would be misdetected as FAT12
FAT32: #clu=967016, fatlen=7616, maxclu=974848, limit=268435440
Using sector 6 as backup boot sector (0 = none)
/dev/sdg has 64 heads and 32 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf0 media descriptor, with 61896704 sectors;
drive number 0x00;
filesystem has 1 32-bit FAT and 64 sectors per cluster.
FAT size is 7616 sectors, and provides 967016 clusters.
There are 64 reserved sectors.
Volume ID is fce1837e, volume label TEST       .

Then check it. There is no problem:

root:/u/h/root> fsck.fat -vV /dev/sdg
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf0 (5.25" or 3.5" HD floppy)
       512 bytes per logical sector
     32768 bytes per cluster
        64 reserved sectors
First FAT starts at byte 32768 (sector 64)
         1 FATs, 32 bit entries
   3899392 bytes per FAT (= 7616 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3932160 (sector 7680)
    967016 data clusters (31687180288 bytes)
32 sectors/track, 64 heads
         0 hidden sectors
  61896704 sectors total
Starting check/repair pass.
Checking for unused clusters.
Checking free cluster summary.
Starting verification pass.
Checking for unused clusters.
/dev/sdg: 1 files, 1/967016 clusters

Now create the FAT FS without alignment (-a option):

root:/u/h/root> mkfs.fat -a -D 0x00 -f 1 -F 32 -h 0 -I -m /dev/null -M 0xF0 -n 
TEST -R 2 -s 64 -vv /dev/sdg
mkfs.fat 4.1 (2017-01-24)
attribute "partition" not found
Boot jump code is eb 58
Using 2 reserved sectors
Trying with 64 sectors/cluster:
FAT12: #clu=967091, fatlen=2834, maxclu=4080, limit=4080
FAT12: too much clusters
FAT16: #clu=967076, fatlen=3778, maxclu=65520, limit=65520
FAT16: too much clusters
FAT16: would be misdetected as FAT12
FAT32: #clu=967017, fatlen=7555, maxclu=967040, limit=268435440
Using sector 1 as backup boot sector (0 = none)
/dev/sdg has 64 heads and 32 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf0 media descriptor, with 61896704 sectors;
drive number 0x00;
filesystem has 1 32-bit FAT and 64 sectors per cluster.
FAT size is 7555 sectors, and provides 967017 clusters.
There are 2 reserved sectors.
Volume ID is fe0451d2, volume label TEST       .

Checking the newly-created filesystem:

root:/u/h/root> fsck.fat -vV /dev/sdg
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
FSINFO sector has bad magic number(s):
  Offset 0: 0x6d9058eb != expected 0x41615252
  Offset 484: 0x00000000 != expected 0x61417272
1) Correct
2) Don't correct (FSINFO invalid then)
? 1
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf0 (5.25" or 3.5" HD floppy)
       512 bytes per logical sector
     32768 bytes per cluster
         2 reserved sectors
First FAT starts at byte 1024 (sector 2)
         1 FATs, 32 bit entries
   3868160 bytes per FAT (= 7555 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3869184 (sector 7557)
    967017 data clusters (31687213056 bytes)
32 sectors/track, 64 heads
         0 hidden sectors
  61896704 sectors total
Starting check/repair pass.
Checking for unused clusters.
Checking free cluster summary.
Free cluster summary uninitialized (should be 967016)
1) Set it
2) Leave it uninitialized
? 1
Starting verification pass.
Checking for unused clusters.
Perform changes ? (y/n) y
/dev/sdg: 1 files, 1/967017 clusters

Now check the FS again. The same error occurs no matter how many times I 
checked it:

root:/u/h/root> fsck.fat -vV /dev/sdg
fsck.fat 4.1 (2017-01-24)
Checking we can access the last sector of the filesystem
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  0:eb/52, 1:58/52, 2:90/61, 3:6d/41, 4:6b/00, 5:66/00, 6:73/00, 7:2e/00
  , 8:66/00, 9:61/00, 10:74/00, 12:02/00, 13:40/00, 14:02/00, 16:01/00
  , 21:f0/00, 24:20/00, 26:40/00, 33:78/00, 34:b0/00, 35:03/00, 36:83/00
  , 37:1d/00, 44:02/00, 48:01/00, 50:01/00, 66:29/00, 67:99/00, 68:04/00
  , 69:0b/00, 70:08/00, 71:54/00, 72:45/00, 73:53/00, 74:54/00, 75:20/00
  , 76:20/00, 77:20/00, 78:20/00, 79:20/00, 80:20/00, 81:20/00, 82:46/00
  , 83:41/00, 84:54/00, 85:33/00, 86:32/00, 87:20/00, 88:20/00, 89:20/00
  , 90:0e/00, 91:1f/00, 92:be/00, 93:77/00, 94:7c/00, 95:ac/00, 96:22/00
  , 97:c0/00, 98:74/00, 99:0b/00, 100:56/00, 101:b4/00, 102:0e/00, 103:bb/00
  , 104:07/00, 106:cd/00, 107:10/00, 108:5e/00, 109:eb/00, 110:f0/00
  , 111:32/00, 112:e4/00, 113:cd/00, 114:16/00, 115:cd/00, 116:19/00
  , 117:eb/00, 118:fe/00, 484:00/72, 485:00/72, 486:00/41, 487:00/61
  , 488:00/68, 489:00/c1, 490:00/0e, 492:00/02
1) Copy original to backup
2) Copy backup to original
3) No action
? 1
FSINFO sector has bad magic number(s):
  Offset 0: 0x6d9058eb != expected 0x41615252
  Offset 484: 0x00000000 != expected 0x61417272
1) Correct
2) Don't correct (FSINFO invalid then)
? 1
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf0 (5.25" or 3.5" HD floppy)
       512 bytes per logical sector
     32768 bytes per cluster
         2 reserved sectors
First FAT starts at byte 1024 (sector 2)
         1 FATs, 32 bit entries
   3868160 bytes per FAT (= 7555 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3869184 (sector 7557)
    967017 data clusters (31687213056 bytes)
32 sectors/track, 64 heads
         0 hidden sectors
  61896704 sectors total
Starting check/repair pass.
Checking for unused clusters.
Checking free cluster summary.
Free cluster summary uninitialized (should be 967016)
1) Set it
2) Leave it uninitialized
? 1
Starting verification pass.
Checking for unused clusters.
Perform changes ? (y/n) y
/dev/sdg: 1 files, 1/967017 clusters


​PGP AB77ABA4-E9D228C9-647BD377-D8B56039-455D741F
Please reply to this e-mail with UTF8-encoded plain text.
You are as malicious as any other spammer if you send HTML e-mails.​

Reply via email to