Gentoo Archives: gentoo-amd64

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

Replies

Subject Author
RE: [gentoo-amd64] ext2, ext3, inodes, and grub Nadav Horesh <nadavh@×××××××××××.com>