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

Re: how to read the result of inittab



On Mon, 11 Oct 1999, Mickael Vera wrote:

> Hi,
> 
> When I boot linux I can read on screen the
> messages of the kernel and then the messages
> produced by inittab
> 
> When i am logged I can read the kernel messages 
> with dmesg but how can i read the messages
> that follow. If go on the console (Ctrl-Alt-F1)
> I can see the last lines but not the first ones
> I didn't find any log file.
> 
> I tried to modify inittab with a redirection
> of the rc scripts output but I couldn't boot anymore
> as the root partition was mounted read only. I could
> have a shell but the root partition was mounted read-only.
> The only solution I found was to boot on another 
> linux (on an extractible hard disk form another
> computer) with loadlin from windows and then mount 
> my root linux partition and edit inittab. 

You can remount the root partition writable by

  mount -o remount,rw /

before recovering the /etc/inittab file.

To your logging problem, try something like this: Change in the the
/etc/init.d/rc script the lines

startup() {
  case "$1" in
        *.sh)
                $debug sh "$@"
                ;;
        *)
                $debug "$@"
                ;;
  esac
}

into

startup() {
  case "$1" in
        *.sh)
                $debug sh "$@" | tee --append /tmp/rc.log
                ;;
        *)
                $debug "$@" | tee --append /tmp/rc.log
                ;;
  esac
}

Martin



 

-- 
If the box says 'Windows 95 or better', it should run on Linux, right?
                                                               - anonymous

For public PGP-key: finger mfluch@mathphys.fsk.uni-heidelberg.de


Reply to: