Re: cannot open initial console

From: Vitaly Fertman
Date: Fri Feb 24 2006 - 05:32:34 EST


On Thursday 23 February 2006 09:46, Matheus Izvekov wrote:
> On 2/23/06, Matheus Izvekov <mizvekov@xxxxxxxxx> wrote:
> > On 2/22/06, Matheus Izvekov <mizvekov@xxxxxxxxx> wrote:
> > > Hi all
> > >
> > > When i tried kernel 2.6.15.4, i noticed i cant boot it, i get
> > > "warning: cannot open initial console" then it reboots. I've searched
> > > for it and found the breakage occurs from 2.6.15.1 to 2.6.15.2
> > >
> > > Before i start to bisect to find the culpirit, and as there were few
> > > changes, anyone has a good guess about what broke it?
> > >
> > > Thanks all in advance.
> > >
> >
> > Found the bad patch by reversing by hand.
> >
> > diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
> > index 42afb5b..9c38f10 100644
> > --- a/fs/reiserfs/super.c
> > +++ b/fs/reiserfs/super.c
> > @@ -1131,7 +1131,7 @@ static void handle_attrs(struct super_bl
> > REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
> > }
> > } else if (le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared) {
> > - REISERFS_SB(s)->s_mount_opt |= REISERFS_ATTRS;
> > + REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ATTRS);
> > }
> > }
> >
> > Reversing this fixes the problem, double checked it. What was that
> > patch supposed to do anyway?
> >
>
> Adding Vitaly Fertman to this thread, as he is the one who seems to
> have submitted that patch.

this line enables attribues by default -- sets the mount option flag.
the problem was that the value itself, instead of the flag, was set.

reiserfs_attrs_cleared on-disk super block flag indicates if attributes
of all files were cleared initially or not -- fs is ready to use attributes.
if they were not cleared, files may contain garbage instead of attribute flags.

reiserfs_attrs_cleared flag may lie, garbage in file attributes may appear
due to using old kernels/reiserfsprogs, before attributes were supported by
reiserfs; or due to a corruption.

so it seems better to disable the enable-by-default behaviour -- look into
the attachment please -- and clear the file attributes before using them:
reiserfsck --clean-attributes <device>

--
Vitaly
--- Begin Message --- Unfortunately, the reiserfs_attrs_cleared bit in the superblock flag can lie.
File systems have been observed with the bit set, yet still contain garbage
in the stat data field, causing unpredictable results.

This patch backs out the enable-by-default behavior.

It eliminates the changes from: d50a5cd860ce721dbeac6a4f3c6e42abcde68cd8, and
ef5e5414e7a83eb9b4295bbaba5464410b11e030.

fs/reiserfs/super.c | 2 --
1 files changed, 2 deletions(-)

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>

diff -ruNpX dontdiff linux-2.6.15/fs/reiserfs/super.c linux-2.6.15-reiserfs/fs/reiserfs/super.c
--- linux-2.6.15/fs/reiserfs/super.c 2006-02-06 19:54:27.000000000 -0500
+++ linux-2.6.15-reiserfs/fs/reiserfs/super.c 2006-02-12 11:19:15.000000000 -0500
@@ -1121,8 +1121,6 @@ static void handle_attrs(struct super_bl
"reiserfs: cannot support attributes until flag is set in super-block");
REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS);
}
- } else if (le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared) {
- REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ATTRS);
}
}

--
Jeff Mahoney
SuSE Labs


--- End Message ---