Login exited

Denys Vlasenko vda.linux at googlemail.com
Thu Sep 4 19:58:13 UTC 2008


On Thursday 04 September 2008 03:50, Steven Woody wrote:
> >> And, I got see a suspicious messages just after the kernel booted:
> >> ---
> >> VFS: Mounted root (cramfs filesystem) readonly.
> >> Freeing init memory: 84K
> >> Error -3 while decompressing!
> >> c0925384(-7384812)->c3e38000(4096)
> >
> > Coming from kernel's fs/cramfs/uncompress.c:
> >
> > err:
> >        printk("Error %d while decompressing!\n", err);
> >        printk("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen);
> >        return 0;
> >
> >> I think I am so near to success, please help me! Thanks.
> >
> > Your filesystem image seems to be damaged.
> 
> Okay, we leave this 'decompressing' error for a moment.  I rebuilt
> (mostly using default options from buildroot) a very small rootfs
> image, 780k cramfs.  This time, it boots without the 'decompressing'
> error message, I still can not login in.  It's same: whatever user
> name I inputed, the getty restarted and I get nothing but another
> prompt.

Tough. I think you need to debug it. You can add debug prints.
For example, if in getty.c you will add this "bb_error_msg":

        /* Let the login program take care of password validation. */
        /* We use PATH because we trust that root doesn't set "bad" PATH,
         * and getty is not suid-root applet. */
        /* With -n, logname == NULL, and login will ask for username instead */
bb_error_msg("Execing %s", options.login);
        BB_EXECLP(options.login, options.login, "--", logname, NULL);
        bb_error_msg_and_die("%s: can't exec %s", options.tty, options.login);
}

rebuild buildroot and boot it, you will know whether getty reaches
this place. If it does, then the problem is in login. If not,
it is in getty. Add more bb_error_msg's then. For example:

                        /* Read the login name. */
                        debug("reading login name\n");
                        logname = get_logname(line_buf, sizeof(line_buf),
                                        &options, &chardata);
bb_error_msg("got logname %s", logname);
                        if (logname)
                                break;



Can you do this?
--
vda



More information about the busybox mailing list