1 debugfs create special files
2 mke2fs -Fq -b 1024 test.img 512
4 debugfs -R ''stat foo'' -w test.img
5 Inode: 12 Type: symlink Mode: 0777 Flags: 0x0
6 Generation: 0 Version: 0x00000000
7 User: 0 Group: 0 Size: 3
10 Fragment: Address: 0 Number: 0 Size: 0
11 ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
12 atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
13 mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
16 debugfs -R ''stat foo2'' -w test.img
17 Inode: 13 Type: symlink Mode: 0777 Flags: 0x0
18 Generation: 0 Version: 0x00000000
19 User: 0 Group: 0 Size: 80
21 Links: 1 Blockcount: 2
22 Fragment: Address: 0 Number: 0 Size: 0
23 ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
24 atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
25 mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
31 debugfs -R ''block_dump 28'' -w test.img
32 0000 3132 3334 3536 3738 3930 3132 3334 3536 1234567890123456
33 0020 3738 3930 3132 3334 3536 3738 3930 3132 7890123456789012
34 0040 3334 3536 3738 3930 3132 3334 3536 3738 3456789012345678
35 0060 3930 3132 3334 3536 3738 3930 3132 3334 9012345678901234
36 0100 3536 3738 3930 3132 3334 3536 3738 3930 5678901234567890
37 0120 0000 0000 0000 0000 0000 0000 0000 0000 ................
41 debugfs -R ''stat pipe'' -w test.img
42 Inode: 14 Type: FIFO Mode: 0000 Flags: 0x0
43 Generation: 0 Version: 0x00000000
44 User: 0 Group: 0 Size: 0
46 Links: 1 Blockcount: 0
47 Fragment: Address: 0 Number: 0 Size: 0
48 ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
49 atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
50 mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
54 debugfs -R ''stat sda'' -w test.img
55 Inode: 15 Type: block special Mode: 0000 Flags: 0x0
56 Generation: 0 Version: 0x00000000
57 User: 0 Group: 0 Size: 0
59 Links: 1 Blockcount: 0
60 Fragment: Address: 0 Number: 0 Size: 0
61 ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
62 atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
63 mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
64 Device major/minor number: 08:00 (hex 08:00)
66 debugfs -R ''stat null'' -w test.img
67 Inode: 16 Type: character special Mode: 0000 Flags: 0x0
68 Generation: 0 Version: 0x00000000
69 User: 0 Group: 0 Size: 0
71 Links: 1 Blockcount: 0
72 Fragment: Address: 0 Number: 0 Size: 0
73 ctime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
74 atime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
75 mtime: 0x50f560e0 -- Tue Jan 15 14:00:00 2013
76 Device major/minor number: 01:03 (hex 01:03)
78 e2fsck -yf -N test_filesys
79 Pass 1: Checking inodes, blocks, and sizes
80 Pass 2: Checking directory structure
81 Pass 3: Checking directory connectivity
82 Pass 4: Checking reference counts
83 Pass 5: Checking group summary information
84 test_filesys: 16/64 files (0.0% non-contiguous), 29/512 blocks