bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: grub can't read large initrd on flash hdc1


From: Skahan, Vince
Subject: RE: grub can't read large initrd on flash hdc1
Date: Fri, 8 Jul 2005 14:54:55 -0700

Think I have it solved.

The problem is definitely related to how mke2fs
automagically set the various filesystem settings.

If the partition is 512 MB or smaller, mke2fs picks
1k block and fragment size, and 8k blocks and fragments
per group.  The 130MB initrd takes 'forever' to read
on a filesystem with 1k blocks.

If I make the partition bigger (600 MB), it uses
4k block and fragment sizes, and 32k blocks and fragments
per group.  The same initrd reads at about the rate
you'd expect from testing the bulk-read speed of the flash.

Simply changing the partitions from 500/1000/548MB
to look like 600/850/600MB results in the same initrd
booting just fine from the hdc1 partition.

My wild guess is that reading 32,000 4k blocks to
read the initrd is ok, but grub is horribly slow
trying to read 135,000 1k blocks.

Bottom line appears to be that there's some kind of
limit in grub regarding reading a big initrd consisting
of a 'lot' of blocks to go through.

Setting the block size to something bigger than 1k for
particular use (very few relatively large files) seems
to be the solution.

Kind of like the old USENET server problem where you needed
to optimize the filesystem to have many small files.

If there's something you'd like tested to figure out where
the limits are, such as varying mke2fs settings or the like,
let me know privately.  There's some kind of limit in 
grub-legacy that appears undocumented, perhaps we can figure
out that limit to document it or to put it on the to-do list
for grub2.

-- address@hidden -- Cabin Network --
             connexion by Boeing sm
           www.connexionbyboeing.com



-----Original Message-----
From: Skahan, Vince 
Sent: Friday, July 08, 2005 6:47 AM
To: 'Yoshinori K. Okuji'; address@hidden
Subject: RE: grub can't read large initrd on flash hdc1



This output is for the 'not working well' partitioning
of hdc1=500M, hdc2=1000M, hdc3=rest (524M).

Reinstalling with manual mke2fs options or adjusted
partition sizes is not a problem, whatever tests we need
to do to figure it out are no problem.  Thanks.

(/dev/hdc1 -h)
dumpe2fs 1.32 (09-Nov-2002)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          9abde293-bb9e-40d9-b78a-5752a0ce154e
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      filetype sparse_super
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122400
Block count:              488848
Reserved block count:     24442
Free blocks:              146505
Free inodes:              122294
First block:              1
Block size:               1024
Fragment size:            1024
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2040
Inode blocks per group:   255
Filesystem created:       Fri May 20 02:51:08 2005
Last mount time:          Thu Jul  7 23:12:30 2005
Last write time:          Fri Jul  8 00:12:34 2005
Mount count:              8
Maximum mount count:      -1
Last checked:             Thu Jun 30 02:36:01 2005
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128

address@hidden sw]# dumpe2fs /dev/hdc2 -h
dumpe2fs 1.32 (09-Nov-2002)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          ed428062-4b66-4fbf-8a12-4a8f59d89cc6
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      filetype sparse_super
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122368
Block count:              244314
Reserved block count:     12215
Free blocks:              202522
Free inodes:              121836
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         15296
Inode blocks per group:   478
Filesystem created:       Fri May 20 02:51:28 2005
Last mount time:          Thu Jul  7 23:12:30 2005
Last write time:          Fri Jul  8 13:25:28 2005
Mount count:              8
Maximum mount count:      -1
Last checked:             Thu Jun 30 02:36:09 2005
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128

address@hidden sw]# dumpe2fs /dev/hdc3 -h
dumpe2fs 1.32 (09-Nov-2002)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          53a32559-c4e4-45f9-918b-78347abe9033
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      filetype sparse_super
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              66880
Block count:              133686
Reserved block count:     6684
Free blocks:              92404
Free inodes:              66865
First block:              0
Block size:               4096
Fragment size:            4096
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         13376
Inode blocks per group:   418
Filesystem created:       Fri May 20 02:51:38 2005
Last mount time:          Thu Jul  7 23:12:30 2005
Last write time:          Thu Jul  7 23:12:30 2005
Mount count:              8
Maximum mount count:      -1
Last checked:             Thu Jun 30 02:36:13 2005
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128

(output of fdisk -l)
Disk /dev/hdc: 2048 MB, 2048901120 bytes
16 heads, 63 sectors/track, 3970 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1             1       970    488848+  83  Linux
/dev/hdc2           971      2909    977256   83  Linux
/dev/hdc3          2910      3970    534744   83  Linux

(output of hdparm -v)
/dev/hdc:
 multcount    =  0 (off)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 3970/16/63, sectors = 4001760, start = 0


-- address@hidden -- Cabin Network --
             connexion by Boeing sm
           www.connexionbyboeing.com



-----Original Message-----
From: Yoshinori K. Okuji [mailto:address@hidden 
Sent: Thursday, July 07, 2005 10:27 PM
To: address@hidden
Cc: Skahan, Vince
Subject: Re: grub can't read large initrd on flash hdc1


On Friday 08 July 2005 01:05, Skahan, Vince wrote:
> I took a little peek with dumpe2fs, looks like mke2fs
> calculated a 1k block size with the smaller partition,
> since there are very few (under 100) files on this partition,
> would manually setting the block size increase grub's
> read performance on the initrd perhaps ?

Can you show the results of dumpe2fs?

Okuji




reply via email to

[Prev in Thread] Current Thread [Next in Thread]