Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong image size #9

Open
ryan4yin opened this issue Aug 27, 2023 · 0 comments
Open

wrong image size #9

ryan4yin opened this issue Aug 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ryan4yin
Copy link
Owner

ryan4yin commented Aug 27, 2023

› sudo fdisk /dev/loop0

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/loop0: 1.89 GiB, 2030879744 bytes, 3966562 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 46D4C0B1-70A6-ED42-BC9A-126E0E7D8F1D

Device        Start     End Sectors  Size Type
/dev/loop0p1  16384  425983  409600  200M Microsoft basic data
/dev/loop0p2 425984 3964927 3538944  1.7G Linux filesystem

Command (m for help): i
Partition number (1,2, default 2): 

         Device: /dev/loop0p2
          Start: 425984
            End: 3964927
        Sectors: 3538944
           Size: 1.7G
           Type: Linux filesystem
      Type-UUID: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
           UUID: A2387A89-08EE-5F4A-B9E0-1872FF75F49F

Command (m for help): q


› sudo fsck /dev/loop0p2
∙ 
fsck from util-linux 2.38.1
e2fsck 1.46.6 (1-Feb-2023)
The filesystem size (according to the superblock) is 442568 blocks
The physical size of the device is 442368 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no


› sudo dumpe2fs /dev/loop0p2
dumpe2fs 1.46.6 (1-Feb-2023)
Filesystem volume name:   NIXOS_SD
Last mounted on:          <not available>
Filesystem UUID:          14e19a7b-0ae0-484d-9d54-43bd6fdc20c7
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              109760
Block count:              442568
Reserved block count:     22127
Free blocks:              94813
Free inodes:              59082
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      214
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         7840
Inode blocks per group:   490
Flex block group size:    16
Filesystem created:       Thu Jan  1 08:00:01 1970
Last mount time:          n/a
Last write time:          Sun Aug 27 13:35:05 2023
Mount count:              0
Maximum mount count:      -1
Last checked:             Sun Aug 27 13:35:05 2023
Check interval:           0 (<none>)
Lifetime writes:          1372 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      3e9d390f-4dd6-4cc4-b327-6769605baea7
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x4d95df7e
Journal features:         (none)
Total journal size:       32M
Total journal blocks:     8192
Max transaction length:   8192
Fast commit length:       0
Journal sequence:         0x00000001
Journal start:            0


Group 0: (Blocks 0-32767) csum 0x6c1a [ITABLE_ZEROED]
  Primary superblock at 0, Group descriptors at 1-1
  Reserved GDT blocks at 2-215
  Block bitmap at 216 (+216), csum 0x80276f90
  Inode bitmap at 230 (+230), csum 0xda127cfb
  Inode table at 244-733 (+244)
  0 free blocks, 0 free inodes, 1492 directories
  Free blocks: 
  Free inodes: 
Group 1: (Blocks 32768-65535) csum 0x9735 [ITABLE_ZEROED]
  Backup superblock at 32768, Group descriptors at 32769-32769
  Reserved GDT blocks at 32770-32983
  Block bitmap at 217 (bg #0 + 217), csum 0x80276f90
  Inode bitmap at 231 (bg #0 + 231), csum 0xda127cfb
  Inode table at 734-1223 (bg #0 + 734)
  0 free blocks, 0 free inodes, 150 directories
  Free blocks: 
  Free inodes: 
Group 2: (Blocks 65536-98303) csum 0xbf94 [ITABLE_ZEROED]
  Block bitmap at 218 (bg #0 + 218), csum 0x80276f90
  Inode bitmap at 232 (bg #0 + 232), csum 0xda127cfb
  Inode table at 1224-1713 (bg #0 + 1224)
  0 free blocks, 0 free inodes, 1174 directories
  Free blocks: 
  Free inodes: 
Group 3: (Blocks 98304-131071) csum 0xbd49 [ITABLE_ZEROED]
  Backup superblock at 98304, Group descriptors at 98305-98305
  Reserved GDT blocks at 98306-98519
  Block bitmap at 219 (bg #0 + 219), csum 0x80276f90
  Inode bitmap at 233 (bg #0 + 233), csum 0xda127cfb
  Inode table at 1714-2203 (bg #0 + 1714)
  0 free blocks, 0 free inodes, 1139 directories
  Free blocks: 
  Free inodes: 
Group 4: (Blocks 131072-163839) csum 0x1566 [ITABLE_ZEROED]
  Block bitmap at 220 (bg #0 + 220), csum 0x80276f90
  Inode bitmap at 234 (bg #0 + 234), csum 0xda127cfb
  Inode table at 2204-2693 (bg #0 + 2204)
  0 free blocks, 0 free inodes, 1055 directories
  Free blocks: 
  Free inodes: 
Group 5: (Blocks 163840-196607) csum 0xcaaf [ITABLE_ZEROED]
  Backup superblock at 163840, Group descriptors at 163841-163841
  Reserved GDT blocks at 163842-164055
  Block bitmap at 221 (bg #0 + 221), csum 0x80276f90
  Inode bitmap at 235 (bg #0 + 235), csum 0xda127cfb
  Inode table at 2694-3183 (bg #0 + 2694)
  0 free blocks, 0 free inodes, 1056 directories
  Free blocks: 
  Free inodes: 
Group 6: (Blocks 196608-229375) csum 0x5dff [ITABLE_ZEROED]
  Block bitmap at 222 (bg #0 + 222), csum 0x80276f90
  Inode bitmap at 236 (bg #0 + 236), csum 0xbc1fd864
  Inode table at 3184-3673 (bg #0 + 3184)
  0 free blocks, 4202 free inodes, 1005 directories, 4202 unused inodes
  Free blocks: 
  Free inodes: 50679-54880
Group 7: (Blocks 229376-262143) csum 0xa0a1 [INODE_UNINIT, ITABLE_ZEROED]
  Backup superblock at 229376, Group descriptors at 229377-229377
  Reserved GDT blocks at 229378-229591
  Block bitmap at 223 (bg #0 + 223), csum 0x80276f90
  Inode bitmap at 237 (bg #0 + 237), csum 0x00000000
  Inode table at 3674-4163 (bg #0 + 3674)
  0 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 
  Free inodes: 54881-62720
Group 8: (Blocks 262144-294911) csum 0xcfbf [INODE_UNINIT, ITABLE_ZEROED]
  Block bitmap at 224 (bg #0 + 224), csum 0x80276f90
  Inode bitmap at 238 (bg #0 + 238), csum 0x00000000
  Inode table at 4164-4653 (bg #0 + 4164)
  0 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 
  Free inodes: 62721-70560
Group 9: (Blocks 294912-327679) csum 0x8365 [INODE_UNINIT, ITABLE_ZEROED]
  Backup superblock at 294912, Group descriptors at 294913-294913
  Reserved GDT blocks at 294914-295127
  Block bitmap at 225 (bg #0 + 225), csum 0x80276f90
  Inode bitmap at 239 (bg #0 + 239), csum 0x00000000
  Inode table at 4654-5143 (bg #0 + 4654)
  0 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 
  Free inodes: 70561-78400
Group 10: (Blocks 327680-360447) csum 0xe44d [INODE_UNINIT, ITABLE_ZEROED]
  Block bitmap at 226 (bg #0 + 226), csum 0xca54ac7c
  Inode bitmap at 240 (bg #0 + 240), csum 0x00000000
  Inode table at 5144-5633 (bg #0 + 5144)
  12693 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 347755-360447
  Free inodes: 78401-86240
Group 11: (Blocks 360448-393215) csum 0xb5da [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
  Block bitmap at 227 (bg #0 + 227), csum 0x00000000
  Inode bitmap at 241 (bg #0 + 241), csum 0x00000000
  Inode table at 5634-6123 (bg #0 + 5634)
  32768 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 360448-393215
  Free inodes: 86241-94080
Group 12: (Blocks 393216-425983) csum 0xd4a8 [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
  Block bitmap at 228 (bg #0 + 228), csum 0x00000000
  Inode bitmap at 242 (bg #0 + 242), csum 0x00000000
  Inode table at 6124-6613 (bg #0 + 6124)
  32768 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 393216-425983
  Free inodes: 94081-101920
Group 13: (Blocks 425984-442567) csum 0x23e7 [INODE_UNINIT, ITABLE_ZEROED]
  Block bitmap at 229 (bg #0 + 229), csum 0x4365cc0f
  Inode bitmap at 243 (bg #0 + 243), csum 0x00000000
  Inode table at 6614-7103 (bg #0 + 6614)
  16584 free blocks, 7840 free inodes, 0 directories, 7840 unused inodes
  Free blocks: 425984-442567
  Free inodes: 101921-109760
  • superblock of ext4 filesystem(rootfs, /dev/loop0p2): has 442568 blocks, 4096 bytes per block.
    • dumpe2fs read the superblock and print its info.
@ryan4yin ryan4yin added the bug Something isn't working label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant