前天我就看见那个英文的帖子了,猛一看一个中国字都没有,以为又是卖野药的广告呢。

不过我也不懂这个……
今天我看了看内核里的文档,/usr/src/linux/Documentation/filesystems/ext2.txt,它说``The primary copy of the superblock is stored at an offset of 1024 bytes from the start of the device ...‘’,另外在 block groups 里边也有备份的。
一开始我就不明白你说的 `31 30 30 30‘ 是哪儿来的。后来终于灵机一动明白了,这是 ascii 码?!呵呵,磁盘上保存的肯定是二进制的整数啊,不可能是 ascii 码。
试验:
# dd if=/dev/hda7 bs=1024 count=4 skip=1 | hd > temp.txt
$ stat -f /boot
File: "/boot"
ID: 0 Namelen: 255 Type: ext2/ext3
Blocks: Total: 97826 Free: 95763 Available: 90544 Size: 1024
Inodes: Total: 52208 Free: 52182
$ grep "f0 cb" temp.txt # 0xcbf0 == 52208
00000000 f0 cb 00 00 c7 97 01 00 63 14 00 00 13 76 01 00 |........c....v..|
$ grep "d6 cb" temp.txt # 0xcbd6 ==52182
00000010 d6 cb 00 00 01 00 00 00 00 00 00 00 00 00 00 00 |................|