1 mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 2 Filesystem label= 3 OS type: Linux 4 Block size=1024 (log=0) 5 Fragment size=1024 (log=0) 6 Stride=0 blocks, Stripe width=0 blocks 7 4096 inodes, 16384 blocks 8 819 blocks (5.00%) reserved for the super user 9 First data block=1 10 Maximum filesystem blocks=8421376 11 16 block groups 12 1024 blocks per group, 1024 fragments per group 13 256 inodes per group 14 Superblock backups stored on blocks: 15 1025, 3073, 5121, 7169, 9217 16 17 Writing inode tables: 0/16 1/16 2/16 3/16 4/16 5/16 6/16 7/16 8/16 9/1610/1611/1612/1613/1614/1615/16done 18 Writing superblocks and filesystem accounting information: done 19 20 Pass 1: Checking inodes, blocks, and sizes 21 Pass 2: Checking directory structure 22 Pass 3: Checking directory connectivity 23 Pass 4: Checking reference counts 24 Pass 5: Checking group summary information 25 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 26 Exit status is 0 27 ----------------------------------------------- 28 29 debugfs -R ''set_inode_field <7> block[2] 42'' -w ./test.img 30 Exit status is 0 31 Resize inode not valid. Recreate? yes 32 33 Pass 1: Checking inodes, blocks, and sizes 34 Pass 2: Checking directory structure 35 Pass 3: Checking directory connectivity 36 Pass 4: Checking reference counts 37 Pass 5: Checking group summary information 38 Free blocks count wrong for group #0 (717, counted=718). 39 Fix? yes 40 41 Free blocks count wrong (14276, counted=14277). 42 Fix? yes 43 44 45 test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** 46 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 47 Exit status is 1 48 Pass 1: Checking inodes, blocks, and sizes 49 Pass 2: Checking directory structure 50 Pass 3: Checking directory connectivity 51 Pass 4: Checking reference counts 52 Pass 5: Checking group summary information 53 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 54 Exit status is 0 55 ----------------------------------------------- 56 57 debugfs -R ''clri <7>'' -w ./test.img 58 Exit status is 0 59 Resize inode not valid. Recreate? yes 60 61 Pass 1: Checking inodes, blocks, and sizes 62 Pass 2: Checking directory structure 63 Pass 3: Checking directory connectivity 64 Pass 4: Checking reference counts 65 Pass 5: Checking group summary information 66 Free blocks count wrong for group #0 (717, counted=718). 67 Fix? yes 68 69 Free blocks count wrong (14276, counted=14277). 70 Fix? yes 71 72 73 test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** 74 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 75 Exit status is 1 76 Pass 1: Checking inodes, blocks, and sizes 77 Pass 2: Checking directory structure 78 Pass 3: Checking directory connectivity 79 Pass 4: Checking reference counts 80 Pass 5: Checking group summary information 81 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 82 Exit status is 0 83 ----------------------------------------------- 84 85 debugfs -R ''set_inode_field <7> bmap[524] 57'' -w ./test.img 86 Exit status is 0 87 Resize inode not valid. Recreate? yes 88 89 Pass 1: Checking inodes, blocks, and sizes 90 Pass 2: Checking directory structure 91 Pass 3: Checking directory connectivity 92 Pass 4: Checking reference counts 93 Pass 5: Checking group summary information 94 Free blocks count wrong for group #0 (717, counted=718). 95 Fix? yes 96 97 Free blocks count wrong (14276, counted=14277). 98 Fix? yes 99 100 101 test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** 102 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 103 Exit status is 1 104 Pass 1: Checking inodes, blocks, and sizes 105 Pass 2: Checking directory structure 106 Pass 3: Checking directory connectivity 107 Pass 4: Checking reference counts 108 Pass 5: Checking group summary information 109 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 110 Exit status is 0 111 ----------------------------------------------- 112 113 debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w ./test.img 114 Exit status is 0 115 ../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks... 116 Pass 1: Checking inodes, blocks, and sizes 117 Pass 2: Checking directory structure 118 Pass 3: Checking directory connectivity 119 Pass 4: Checking reference counts 120 Pass 5: Checking group summary information 121 122 test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** 123 test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks 124 Exit status is 1 125 ----------------------------------------------- 126 127 debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w ./test.img 128 Exit status is 0 129 Pass 1: Checking inodes, blocks, and sizes 130 Pass 2: Checking directory structure 131 Pass 3: Checking directory connectivity 132 Pass 4: Checking reference counts 133 Pass 5: Checking group summary information 134 Block bitmap differences: -(35--258) -(1059--1282) -(3107--3330) -(5155--5378) -(7203--7426) -(9251--9474) 135 Fix? yes 136 137 Free blocks count wrong for group #0 (718, counted=942). 138 Fix? yes 139 140 Free blocks count wrong for group #1 (732, counted=956). 141 Fix? yes 142 143 Free blocks count wrong for group #3 (732, counted=956). 144 Fix? yes 145 146 Free blocks count wrong for group #5 (732, counted=956). 147 Fix? yes 148 149 Free blocks count wrong for group #7 (732, counted=956). 150 Fix? yes 151 152 Free blocks count wrong for group #9 (732, counted=956). 153 Fix? yes 154 155 Free blocks count wrong (14277, counted=15621). 156 Fix? yes 157 158 159 test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** 160 test_filesys: 11/4096 files (0.0% non-contiguous), 763/16384 blocks 161 Exit status is 1 162 Pass 1: Checking inodes, blocks, and sizes 163 Pass 2: Checking directory structure 164 Pass 3: Checking directory connectivity 165 Pass 4: Checking reference counts 166 Pass 5: Checking group summary information 167 test_filesys: 11/4096 files (0.0% non-contiguous), 763/16384 blocks 168 Exit status is 0 169