Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to enable logging of the init-process?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
qeldroma
Guru
Guru


Joined: 17 Oct 2002
Posts: 370

PostPosted: Thu Sep 21, 2006 7:13 am    Post subject: How to enable logging of the init-process? Reply with quote

Hi again,

i can't get the logging to a file activated for the init-process, how do i enable it?
Of course, i tried araound with the different rc.conf-flags, but none of them is responsible for generating a boot/init-log, as it seems. And yes, i installed "showconsole".

Can anyone give me the decicicive hint, where i do have to set this up?

Kind regards, Florian
Back to top
View user's profile Send private message
libero
Tux's lil' helper
Tux's lil' helper


Joined: 26 Mar 2004
Posts: 87
Location: Tokyo

PostPosted: Mon Oct 30, 2006 6:06 am    Post subject: Reply with quote

hi

after installing "showconsole", i edited the /etc/conf.d/rc adding
Code:
RC_BOOTLOG="yes"

and rebooted the system. There was no config required.

After rebooting, there was automatically a new logfile here:
/var/log/boot.msg
which contained what I was looking for.

Sprotte also commented here
https://forums.gentoo.org/viewtopic-t-479838-highlight-showconsole.html
that
typing "dmesg" is better, and that rc_bootlog is not very good.

I just tried "dmesg" though, and got some useful info, but not all the useful info that occurred at startup. Since I don't reboot a lot, I only have this one case so far, but I'm 1 for 1 in success at getting a useful boot log this way, so I don't know what Sprotte was talking about.

also one person wrote that typing "shift" + "page up" or some combination of buttons would scroll up the boot buffer, if used before starting X.

Oh yeah, and I guess it's bad to have a boot splash in your boot process, which I do not.

Your mileage may vary. Good luck

Leo
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Mon Oct 30, 2006 12:35 pm    Post subject: Reply with quote

[Edit: "startup messages" but nothing after init has started so no "logging of the init-process", sorry, my mistake :oops: ]

Well there is a method to get all the startup messages (even up to "Kernel panic..." :D ) but you need a second machine (wired) networked to the booting one.

Still OK?

Next step: let's call the machines bootsie and snudge: you want to see the startup messages that the kernel issues on bootsie and you will be using snudge to view them.

In bootsie's kernel configuration enable netconsole
Code:
     -> Device Drivers
       -> Network device support
<*> Network console logging support (EXPERIMENTAL)
and, if the (wired) ethernet driver is a module, make it compiled in.

Now add something like
Code:
netconsole=6665@192.168.1.2/eth0,6666@192.168.1.3/00:50:8D:ED:9F:96
as an additional parameter to the kernel line in bootsie's grub.conf, i.e.
Code:
kernel kernel-genkernel-x86-2.6.17-gentoo-r8 netconsole=6665@192.168.1.2/eth0,6666@192.168.1.37/00:50:8D:ED:9F:96 real_root=/dev/hda3
Your kernel line will be different, this is just to show how the netconsole parameter appears on the line.

The netconsole arguments may be different too:
  • "192.168.1.2" is the address that bootsie will be given, you may need to change this
  • "192.168.1.3" is snudge's address, this may need changing
  • "00:50:8D:ED:9F:96" is the HWaddr or the MAC address of the ethernet card on snudge, you can find out the address of your card by
    Code:
    # ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 00:50:8D:ED:9F:96
Now, before starting bootsie, start netcat (emerge net-analyzer/netcat if you haven't got it) on snudge
Code:
nc -u -l -p 6666
"6666" is the port which appears in the netconsole settings followed by "@" and snudge's address.

Now start bootsie and all the kernel boot messages should appear on snudge where they can be saved to a file
Code:
nc -u -l -p 6666 | tee bootsie.out
A cautionary note: if bootsie has two NICs and nothing appears on snudge, you will have to switch the cable to the other one :D
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.


Last edited by wynn on Tue Oct 31, 2006 10:57 am; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Oct 30, 2006 6:42 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Other Things Gentoo.
Not about getting gentoo installed, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum