FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-05-2010, 04:16 PM
Mark Knecht
 
Default CD boot - dmesg buffer depth option?

I'm trying to capture the full boot log when booting from the Gentoo
install CD but it seems the buffer isn't deep enough to get the whole
thing. Is there by chance a command line option that will increase the
depth of what's captured by dmesg so that I can get all the way back
to the beginning?

Thanks,
Mark
 
Old 07-05-2010, 07:11 PM
Willie Wong
 
Default CD boot - dmesg buffer depth option?

On Mon, Jul 05, 2010 at 09:16:14AM -0700, Mark Knecht wrote:
> I'm trying to capture the full boot log when booting from the Gentoo
> install CD but it seems the buffer isn't deep enough to get the whole
> thing. Is there by chance a command line option that will increase the
> depth of what's captured by dmesg so that I can get all the way back
> to the beginning?

pass the following parameter to the kernel on GRUB/LILO:

log_buf_len=n

where n is a power of two. By default it is 16384. You can change it
to 131072 (= 2^17) to get a much larger kernel log ring buffer. If you
put in something that is not a power of two, the kernel will ignore
the option.

You may also have to pass an additional parameter to dmesg to read the
early messages: look at 'man dmesg' and the -s flag.

Cheers,

W
--
Willie W. Wong wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton
 
Old 07-05-2010, 09:17 PM
Mark Knecht
 
Default CD boot - dmesg buffer depth option?

On Mon, Jul 5, 2010 at 12:11 PM, Willie Wong <wwong@math.princeton.edu> wrote:
> On Mon, Jul 05, 2010 at 09:16:14AM -0700, Mark Knecht wrote:
>> I'm trying to capture the full boot log when booting from the Gentoo
>> install CD but it seems the buffer isn't deep enough to get the whole
>> thing. Is there by chance a command line option that will increase the
>> depth of what's captured by dmesg so that I can get all the way back
>> to the beginning?
>
> pass the following parameter to the kernel on GRUB/LILO:
>
> log_buf_len=n
>
> where n is a power of two. By default it is 16384. You can change it
> to 131072 (= 2^17) to get a much larger kernel log ring buffer. If you
> put in something that is not a power of two, the kernel will ignore
> the option.
>
> You may also have to pass an additional parameter to dmesg to read the
> early messages: look at 'man dmesg' and the -s flag.
>
> Cheers,
>
> W
> --

Hi Willie,
Thanks for the ideas. I've been trying them but so far no luck.

In my normal booting kernel (on the system hard drive) I did push
the length up to 18. With that setting dmesg prints all the way back
to the beginning. However booting the Live CD I hit F1, it shows the
kernels, so I type

gentoo log_buf_len=18

and then boot, but dmesg never goes back to the beginning. I've also
tried dmesg -s 300000 but still the results are cut off somewhere down
in the stack and I never see the first part of the buffer.

I'm looking at this page for some info:

http://www.kernel.org/pub/linux/kernel/people/gregkh/lkn/lkn_pdf/ch09.pdf

Reading about log_buf_len I also see earlyprintk and time options. I
tried them at the Live CD command line but it didn't change what I'm
getting in dmesg like it did on my regular kernel.

I'll continue to study.

Thanks,
Mark
 
Old 07-06-2010, 09:42 AM
Willie Wong
 
Default CD boot - dmesg buffer depth option?

On Mon, Jul 05, 2010 at 02:17:26PM -0700, Mark Knecht wrote:
> On Mon, Jul 5, 2010 at 12:11 PM, Willie Wong <wwong@math.princeton.edu> wrote:
> > On Mon, Jul 05, 2010 at 09:16:14AM -0700, Mark Knecht wrote:
> >> I'm trying to capture the full boot log when booting from the Gentoo
> >> install CD but it seems the buffer isn't deep enough to get the whole
> >> thing. Is there by chance a command line option that will increase the
> >> depth of what's captured by dmesg so that I can get all the way back
> >> to the beginning?
> >
> > pass the following parameter to the kernel on GRUB/LILO:
> >
> > log_buf_len=n
> >
> > where n is a power of two. By default it is 16384. You can change it
> > to 131072 (= 2^17) to get a much larger kernel log ring buffer. If you
> > put in something that is not a power of two, the kernel will ignore
> > the option.
> >
> Thanks for the ideas. I've been trying them but so far no luck.
>
> In my normal booting kernel (on the system hard drive) I did push
> the length up to 18. With that setting dmesg prints all the way back
> to the beginning. However booting the Live CD I hit F1, it shows the
> kernels, so I type
>
> gentoo log_buf_len=18
>

18 is not a power of two.

Why didn't you just try 131072, like I suggested? In maths notation,

n = 2^k

for some natural number k. 18 fails that miserably.

Cheers,

W
--
Willie W. Wong wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton
 
Old 07-06-2010, 09:45 AM
Willie Wong
 
Default CD boot - dmesg buffer depth option?

On Mon, Jul 05, 2010 at 02:17:26PM -0700, Mark Knecht wrote:
> On Mon, Jul 5, 2010 at 12:11 PM, Willie Wong <wwong@math.princeton.edu> wrote:
> > On Mon, Jul 05, 2010 at 09:16:14AM -0700, Mark Knecht wrote:
> >> I'm trying to capture the full boot log when booting from the Gentoo
> >> install CD but it seems the buffer isn't deep enough to get the whole
> >> thing. Is there by chance a command line option that will increase the
> >> depth of what's captured by dmesg so that I can get all the way back
> >> to the beginning?
> >
> > pass the following parameter to the kernel on GRUB/LILO:
> >
> > log_buf_len=n
> >
> > where n is a power of two. By default it is 16384. You can change it
> > to 131072 (= 2^17) to get a much larger kernel log ring buffer. If you
> > put in something that is not a power of two, the kernel will ignore
> > the option.
> >
> In my normal booting kernel (on the system hard drive) I did push
> the length up to 18. With that setting dmesg prints all the way back
> to the beginning. However booting the Live CD I hit F1, it shows the
> kernels, so I type
>

to add to the confusion is probably the fact that the in-kernel
configuration parameter is a bit-shift number, and the boot-time
cmdline parameter is actually 2 to that power. So the in-kernel
configuration parameter should be k (=18 in your case), and the
boot-time parameter should be 2^k (=262144).

Cheers,

W
--
Willie W. Wong wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire
et vice versa ~~~ I. Newton
 
Old 07-06-2010, 05:44 PM
James
 
Default CD boot - dmesg buffer depth option?

Mark Knecht <markknecht <at> gmail.com> writes:


> I'm trying to capture the full boot log when booting from the Gentoo
> install CD but it seems the buffer isn't deep enough to get the whole
> thing. Is there by chance a command line option that will increase the
> depth of what's captured by dmesg so that I can get all the way back
> to the beginning?

Well here is what I use in root's .bashrc file to fix this sort
of issue:


alias dmesg='dmesg -s 262144 | less'


That way dmesg is extended....

dmesg -s 262144 is what you are looking for, I think, or
larger....

hth,
James
 
Old 07-06-2010, 07:18 PM
Mark Knecht
 
Default CD boot - dmesg buffer depth option?

On Tue, Jul 6, 2010 at 2:45 AM, Willie Wong <wwong@math.princeton.edu> wrote:
> On Mon, Jul 05, 2010 at 02:17:26PM -0700, Mark Knecht wrote:
>> On Mon, Jul 5, 2010 at 12:11 PM, Willie Wong <wwong@math.princeton.edu> wrote:
>> > On Mon, Jul 05, 2010 at 09:16:14AM -0700, Mark Knecht wrote:
>> >> I'm trying to capture the full boot log when booting from the Gentoo
>> >> install CD but it seems the buffer isn't deep enough to get the whole
>> >> thing. Is there by chance a command line option that will increase the
>> >> depth of what's captured by dmesg so that I can get all the way back
>> >> to the beginning?
>> >
>> > pass the following parameter to the kernel on GRUB/LILO:
>> >
>> > log_buf_len=n
>> >
>> > where n is a power of two. By default it is 16384. You can change it
>> > to 131072 (= 2^17) to get a much larger kernel log ring buffer. If you
>> > put in something that is not a power of two, the kernel will ignore
>> > the option.
>> >
>> * *In my normal booting kernel (on the system hard drive) I did push
>> the length up to 18. With that setting dmesg prints all the way back
>> to the beginning. However booting the Live CD I hit F1, it shows the
>> kernels, so I type
>>
>
> to add to the confusion is probably the fact that the in-kernel
> configuration parameter is a bit-shift number, and the boot-time
> cmdline parameter is actually 2 to that power. So the in-kernel
> configuration parameter should be k (=18 in your case), and the
> boot-time parameter should be 2^k (=262144).

Which is exactly why I chose 18 and not 262144. My bad.

I switched to 262144 and now I'm getting all the dmesg data back to
the very beginning.

Thanks!

Cheers,
Mark
 

Thread Tools




All times are GMT. The time now is 06:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org