Chinaunix首页 | 论坛 | 博客
  • 博客访问: 264383
  • 博文数量: 39
  • 博客积分: 1126
  • 博客等级: 准尉
  • 技术积分: 502
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-28 11:34
文章分类

全部博文(39)

文章存档

2012年(7)

2011年(20)

2010年(12)

分类:

2010-12-08 13:07:35

上此说到升级了grub2后,grub就能识别由e2fsprogs1.14.12格式化的文件系统(mkfs.ext3 -F /dev/sda1)
现在说哈原因,在mkfs.ext3 -F /dev/sda1后可以通过 tune2fs -l /dev/sda1 查询硬盘的相关信息。我发现其中有一条是这样的
Inode size:               256
但是如果是用  e2fsprogs1.37的话,同样进行查询就会有一下的信息
Inode size:               128
查询了grub的相关资料,知道grub1能识别的文件系统,inode size 就是128的,所以用升级了的e2fsprogs制作的文件系统老版本的grub不认,
man mke2fs(高版本的,发现有一个选项 )
 -I inode-size
              Specify the size of each inode in bytes.  mke2fs  creates  256-byte
              inodes by default.  In kernels after 2.6.10 and some earlier vendor
              kernels it is possible to utilize inodes larger than 128  bytes  to
              store extended attributes for improved performance.  The inode-size
              value must be a power of 2 larger or equal to 128.  The larger  the
              inode-size  the  more  space the inode table will consume, and this
              reduces the usable space in the filesystem and can also  negatively
              impact performance.  Extended attributes stored in large inodes are
              not visible with older kernels, and such filesystems  will  not  be
              mountable  with  2.4  kernels at all.  It is not possible to change
              this value after the filesystem is created.
哈哈,就是这个了,现在制作文件系统时,我需要这么作
mkfs.ext3 -I 128  -F /dev/sda1
好了,grub能够正确的识别文件系统了

阅读(1401) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~