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

Re: dbootstrap now working, busybox needs serial con change.



On Thu Nov 11, 1999 at 05:04:39PM +0100, Eric Delaunay wrote:
> Matt Porter wrote:
> > After a short delay to fight a virus, I squashed the last known (to me)
> > dbootstrap bug.  I can now go through a full install successfully until
> > reboot.
> > 
> > There is one small problem with busybox (a bug report for Erik here).  On
> > a serial console system, busybox's log mechanism is not real friendly yet.
> > It whenever the run() calls are used it logs the "pid ? exited." messages
> > to ttyS0 which spams the running dbootstrap.  Since busybox already has
> > primary and secondary ser console called out up front, it should log these
> > kind of messages to the ttyS1 if it is available (yes, there are systems
> > with only one serial port these days) or send them to /dev/null if only
> > one serial port exists.  Alternatively, this could be a build option where
> > in the case of dbootstrap we would junk the messages, other applications
> > may want the primary serial console or VT console to be sent those
> > messages.
> 
> Oops, it was introduced after the patch I posted.
> Systems with more than one serial console are not so common I guess (I never
> seen one btw).
> We could either disable logging or better redirect it to a file.  Maybe logging
> to /var/log/messages or /tmp/log ?  An advanced user could then see what
> happens by reading this file.  Even adding an item in dbootstrap menu to show
> the contents of this file would be best.

I don't think logging to /var/log/messages would work well, since we
have no guarantee that the root filesystem is writable, and even if it
is writable, there are lots of cases where eternal, persistent spammage
of /var would not be nice. 

Hmm. I've been thinking about writing a micro syslogd for busybox, and I
could have busybox just log this crap to to the syslog. Then those that
want to see logging stuff could add something like this to /etc/init.d/rcS:

    # Setup a 256k ramdisk on /dev/ram2 and mount it over /var
    # so syslogd can log stuff...
    #
    echo -n "Building ramdisks: "
    dd if=/dev/zero of=/dev/ram2 bs=1k count=256 > /dev/null 2>&1
    /bin/mkfs.ext2 -n30 /dev/ram2 256 > /dev/null 2>&1
    mount /dev/ram2 /var -t ext2 -o rw
    mkdir /var/log
    echo "done."

Isn't mkfs.ext2 already on the boot-floppies? If not, the busybox
version of mkfs.minix costs 9k. 

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--


Reply to: