1 |
http://www.linuxtoday.com/security/2008050102226OSHWHL |
2 |
|
3 |
Nadav |
4 |
|
5 |
|
6 |
-----הודעה מקורית----- |
7 |
מאת: Drake Donahue [mailto:donahue95@×××××××.net] |
8 |
נשלח: א 04-מאי-08 23:51 |
9 |
אל: gentoo-amd64@l.g.o |
10 |
נושא: [gentoo-amd64] ext2, ext3, inodes, and grub |
11 |
|
12 |
It appears that an up to date unaltered /etc/mke2fs.conf file will look |
13 |
like: |
14 |
|
15 |
[defaults] |
16 |
base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr |
17 |
blocksize = 4096 |
18 |
inode_size = 256 |
19 |
inode_ratio = 16384 |
20 |
|
21 |
[fs_types] |
22 |
small = { |
23 |
blocksize = 1024 |
24 |
inode_size = 128 |
25 |
inode_ratio = 4096 |
26 |
} |
27 |
floppy = { |
28 |
blocksize = 1024 |
29 |
inode_size = 128 |
30 |
inode_ratio = 8192 |
31 |
} |
32 |
news = { |
33 |
inode_ratio = 4096 |
34 |
} |
35 |
largefile = { |
36 |
inode_ratio = 1048576 |
37 |
} |
38 |
largefile4 = { |
39 |
inode_ratio = 4194304 |
40 |
} |
41 |
|
42 |
But the default, inode_size = 256, is currently being ignored. |
43 |
running: |
44 |
mke2fs /dev/sdb1 |
45 |
will produce an ext2 file system with inode_size = 128 |
46 |
|
47 |
running: |
48 |
mke2fs -j /dev/sdb1 (or mkfs.ext3 or mkfs -t ext3) |
49 |
will produce an ext3 file system with inode_size = 128 |
50 |
|
51 |
How this happens is a puzzle. |
52 |
|
53 |
Running: |
54 |
mke2fs -I 256 /dev/sdb1 or mke2fs -j -I 256 /dev/sdb1 will produce ext2 or |
55 |
ext3 file systems with inode_size=256. |
56 |
The /dev/sbd1, inode_size=256, file system so produced can be mounted and |
57 |
will function normally. |
58 |
However if I try to install grub 0.97.4 on it, I will see: |
59 |
|
60 |
umount /dev/sdb1 |
61 |
|
62 |
>grub |
63 |
Probing devices to guess BIOS drives. This may take a long time. |
64 |
|
65 |
GNU GRUB version 0.97 (640K lower / 3072K upper memory) |
66 |
|
67 |
[ Minimal BASH-like line editing is supported. For the first word, TAB |
68 |
lists possible command completions. Anywhere else TAB lists the |
69 |
possible |
70 |
completions of a device/filename. ] |
71 |
|
72 |
grub> root (hd1,0) |
73 |
Filesystem type is ext2fs, partition type 0x83 |
74 |
|
75 |
grub> setup (hd1) |
76 |
Checking if "/boot/grub/stage1" exists... no |
77 |
Checking if "/grub/stage1" exists... no |
78 |
|
79 |
Error 2: Bad file or directory type |
80 |
|
81 |
To fix this and other bugs, grub 0.97.5 is coming currently masked ~amd64. |
82 |
|
83 |
Installing grub 0.97.5 does in fact allow grub to setup inode_size=256 |
84 |
ext2/ext3 file systems. (Even though they seem not to be being written just |
85 |
now.) |
86 |
|
87 |
grub 0.97.5 comes with a warning: |
88 |
|
89 |
* Messages for package sys-boot/grub-0.97-r5: |
90 |
|
91 |
* *** IMPORTANT NOTE: you must run grub and install |
92 |
* the new version's stage1 to your MBR. Until you do, |
93 |
* stage1 and stage2 will still be the old version, but |
94 |
* later stages will be the new version, which could |
95 |
* cause problems such as an unbootable system. |
96 |
|
97 |
This seemed exciting since I have not always read all the messages produced |
98 |
by major updates. After I emerged grub 0.97.5, I tried not running grub and |
99 |
not reinstalling stage 1 and 2 before rebooting. Nothing bad happened. |
100 |
However it might be ell to put a grub reinstall on the to do list as marking |
101 |
grub 0.97.5 stable is supposed to be imminent and the next emerge -uND world |
102 |
may bring it on. |
103 |
|
104 |
|
105 |
|
106 |
-- |
107 |
gentoo-amd64@l.g.o mailing list |