All of lore.kernel.org
 help / color / mirror / Atom feed
* kexec won't --load-panic a 2.6.22 relocatable kernel?
@ 2008-03-19  6:05 Mike Snitzer
  2008-03-21  5:32 ` Simon Horman
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Snitzer @ 2008-03-19  6:05 UTC (permalink / raw)
  To: kexec

I'm building a x86_64 2.6.22 kernel with the following options set:

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_RELOCATABLE=y
CONFIG_PHYSICAL_START=0x200000

If I try to load the kernel with the following I get:

./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
/boot/vmlinuz-2.6.22.19

./kexec: unrecognized option `--args-linux'
kexec-tools-testing 20080318-rc released 18th March 2008
Usage: kexec [OPTION]... [kernel]
...
Cannot load /boot/vmlinuz-2.6.22.19

Now if I remove --args-linux kexec successfully loads the panic kernel
but when I trigger a crash it just loads the kernel and doesn't
actually perform a kdump.  So this proves the relocatable nature of
the kernel is working right?  Its just not passing args as would be
needed to trigger a crash dump?

If I use the same commandline above (--args-linux included) with a
RHEL5U1 kernel kexec will load the panic kernel without problems and
kdump will work when I enduce a crash.

So long story short:  is there some fix that went in upstream after
2.6.22 was released that would enable kexec to load a relocatable
x86_64 kernel with the --args-linux option?  Nothing stands out to me
but I could easily be overlooking something...

Mike

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-19  6:05 kexec won't --load-panic a 2.6.22 relocatable kernel? Mike Snitzer
@ 2008-03-21  5:32 ` Simon Horman
  2008-03-21 23:54   ` Mike Snitzer
  2008-03-24  8:29   ` Simon Horman
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Horman @ 2008-03-21  5:32 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: kexec

On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
> I'm building a x86_64 2.6.22 kernel with the following options set:
> 
> CONFIG_KEXEC=y
> CONFIG_CRASH_DUMP=y
> CONFIG_RELOCATABLE=y
> CONFIG_PHYSICAL_START=0x200000
> 
> If I try to load the kernel with the following I get:
> 
> ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
> irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
> /boot/vmlinuz-2.6.22.19
> 
> ./kexec: unrecognized option `--args-linux'
> kexec-tools-testing 20080318-rc released 18th March 2008
> Usage: kexec [OPTION]... [kernel]
> ...
> Cannot load /boot/vmlinuz-2.6.22.19

Hi Mike,

that looks a lot like a problem with kexec-tools parsing command line
arguments to me. However I'm not having much luck reproducing it here.
I'll poke a bit more.

Did you get kexec-tools-testing 20080318-rc as a tarball from
kernel.org? I just want to make sure we are looking at the same code.

-- 
Horms


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-21  5:32 ` Simon Horman
@ 2008-03-21 23:54   ` Mike Snitzer
  2008-03-24  8:29   ` Simon Horman
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Snitzer @ 2008-03-21 23:54 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

On Fri, Mar 21, 2008 at 1:32 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
>  > I'm building a x86_64 2.6.22 kernel with the following options set:
>  >
>  > CONFIG_KEXEC=y
>  > CONFIG_CRASH_DUMP=y
>  > CONFIG_RELOCATABLE=y
>  > CONFIG_PHYSICAL_START=0x200000
>  >
>  > If I try to load the kernel with the following I get:
>  >
>  > ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
>  > irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
>  > /boot/vmlinuz-2.6.22.19
>  >
>  > ./kexec: unrecognized option `--args-linux'
>  > kexec-tools-testing 20080318-rc released 18th March 2008
>  > Usage: kexec [OPTION]... [kernel]
>  > ...
>  > Cannot load /boot/vmlinuz-2.6.22.19
>
>  Hi Mike,
>
>  that looks a lot like a problem with kexec-tools parsing command line
>  arguments to me. However I'm not having much luck reproducing it here.
>  I'll poke a bit more.

I agree it does look like a parsing bug but if I use the same
commandline with a different kernel (e.g. RHEL5's kernel) kexec
doesn't error out.

>  Did you get kexec-tools-testing 20080318-rc as a tarball from
>  kernel.org? I just want to make sure we are looking at the same code.

Yes, I got 20080318-rc from kernel.org.

I can provide the problematic vmlinuz offlist if you'd like.  I've not
yet had a chance to trace kexec with gdb and really dig into this
issue.

Mike

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-21  5:32 ` Simon Horman
  2008-03-21 23:54   ` Mike Snitzer
@ 2008-03-24  8:29   ` Simon Horman
  2008-03-24 14:18     ` Mike Snitzer
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Horman @ 2008-03-24  8:29 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: kexec

On Fri, Mar 21, 2008 at 02:32:36PM +0900, Simon Horman wrote:
> On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
> > I'm building a x86_64 2.6.22 kernel with the following options set:
> > 
> > CONFIG_KEXEC=y
> > CONFIG_CRASH_DUMP=y
> > CONFIG_RELOCATABLE=y
> > CONFIG_PHYSICAL_START=0x200000
> > 
> > If I try to load the kernel with the following I get:
> > 
> > ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
> > irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
> > /boot/vmlinuz-2.6.22.19
> > 
> > ./kexec: unrecognized option `--args-linux'
> > kexec-tools-testing 20080318-rc released 18th March 2008
> > Usage: kexec [OPTION]... [kernel]
> > ...
> > Cannot load /boot/vmlinuz-2.6.22.19
> 
> Hi Mike,
> 
> that looks a lot like a problem with kexec-tools parsing command line
> arguments to me. However I'm not having much luck reproducing it here.
> I'll poke a bit more.
> 
> Did you get kexec-tools-testing 20080318-rc as a tarball from
> kernel.org? I just want to make sure we are looking at the same code.

Sorry for being a bit slow, I have managed to reproduce the problem,
which is that --args-linux can't be used if the image is a bzImage.
Could you try with a vmlinux image instead?

-- 
Horms


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-24  8:29   ` Simon Horman
@ 2008-03-24 14:18     ` Mike Snitzer
  2008-03-24 15:22       ` Mike Snitzer
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Snitzer @ 2008-03-24 14:18 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

On Mon, Mar 24, 2008 at 4:29 AM, Simon Horman <horms@verge.net.au> wrote:
>
> On Fri, Mar 21, 2008 at 02:32:36PM +0900, Simon Horman wrote:
>  > On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
>  > > I'm building a x86_64 2.6.22 kernel with the following options set:
>  > >
>  > > CONFIG_KEXEC=y
>  > > CONFIG_CRASH_DUMP=y
>  > > CONFIG_RELOCATABLE=y
>  > > CONFIG_PHYSICAL_START=0x200000
>  > >
>  > > If I try to load the kernel with the following I get:
>  > >
>  > > ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
>  > > irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
>  > > /boot/vmlinuz-2.6.22.19
>  > >
>  > > ./kexec: unrecognized option `--args-linux'
>  > > kexec-tools-testing 20080318-rc released 18th March 2008
>  > > Usage: kexec [OPTION]... [kernel]
>  > > ...
>  > > Cannot load /boot/vmlinuz-2.6.22.19
>  >
>  > Hi Mike,
>  >
>  > that looks a lot like a problem with kexec-tools parsing command line
>  > arguments to me. However I'm not having much luck reproducing it here.
>  > I'll poke a bit more.
>  >
>  > Did you get kexec-tools-testing 20080318-rc as a tarball from
>  > kernel.org? I just want to make sure we are looking at the same code.
>
>  Sorry for being a bit slow, I have managed to reproduce the problem,
>  which is that --args-linux can't be used if the image is a bzImage.
>  Could you try with a vmlinux image instead?

Interesting, makes sense.

Sure enough RedHat's image is a "ELF 64-bit LSB shared object" and a
vmlinux is "ELF 64-bit LSB executable".

I wonder how RedHat gets their kernel image to be an ELF image?

Mike

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-24 14:18     ` Mike Snitzer
@ 2008-03-24 15:22       ` Mike Snitzer
  2008-04-02 17:26         ` Vivek Goyal
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Snitzer @ 2008-03-24 15:22 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

On Mon, Mar 24, 2008 at 10:18 AM, Mike Snitzer <snitzer@gmail.com> wrote:
>
> On Mon, Mar 24, 2008 at 4:29 AM, Simon Horman <horms@verge.net.au> wrote:
>  >
>  > On Fri, Mar 21, 2008 at 02:32:36PM +0900, Simon Horman wrote:
>  >  > On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
>  >  > > I'm building a x86_64 2.6.22 kernel with the following options set:
>  >  > >
>  >  > > CONFIG_KEXEC=y
>  >  > > CONFIG_CRASH_DUMP=y
>  >  > > CONFIG_RELOCATABLE=y
>  >  > > CONFIG_PHYSICAL_START=0x200000
>  >  > >
>  >  > > If I try to load the kernel with the following I get:
>  >  > >
>  >  > > ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
>  >  > > irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
>  >  > > /boot/vmlinuz-2.6.22.19
>  >  > >
>  >  > > ./kexec: unrecognized option `--args-linux'
>  >  > > kexec-tools-testing 20080318-rc released 18th March 2008
>  >  > > Usage: kexec [OPTION]... [kernel]
>  >  > > ...
>  >  > > Cannot load /boot/vmlinuz-2.6.22.19
>  >  >
>  >  > Hi Mike,
>  >  >
>  >  > that looks a lot like a problem with kexec-tools parsing command line
>  >  > arguments to me. However I'm not having much luck reproducing it here.
>  >  > I'll poke a bit more.
>  >  >
>  >  > Did you get kexec-tools-testing 20080318-rc as a tarball from
>  >  > kernel.org? I just want to make sure we are looking at the same code.
>  >
>  >  Sorry for being a bit slow, I have managed to reproduce the problem,
>  >  which is that --args-linux can't be used if the image is a bzImage.
>  >  Could you try with a vmlinux image instead?
>
>  Interesting, makes sense.
>
>  Sure enough RedHat's image is a "ELF 64-bit LSB shared object" and a
>  vmlinux is "ELF 64-bit LSB executable".
>
>  I wonder how RedHat gets their kernel image to be an ELF image?

RedHat includes the following (which never made it upstream):
http://lkml.org/lkml/2006/8/14/203

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kexec won't --load-panic a 2.6.22 relocatable kernel?
  2008-03-24 15:22       ` Mike Snitzer
@ 2008-04-02 17:26         ` Vivek Goyal
  0 siblings, 0 replies; 7+ messages in thread
From: Vivek Goyal @ 2008-04-02 17:26 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: Simon Horman, kexec

On Mon, Mar 24, 2008 at 11:22:59AM -0400, Mike Snitzer wrote:
> On Mon, Mar 24, 2008 at 10:18 AM, Mike Snitzer <snitzer@gmail.com> wrote:
> >
> > On Mon, Mar 24, 2008 at 4:29 AM, Simon Horman <horms@verge.net.au> wrote:
> >  >
> >  > On Fri, Mar 21, 2008 at 02:32:36PM +0900, Simon Horman wrote:
> >  >  > On Wed, Mar 19, 2008 at 02:05:46AM -0400, Mike Snitzer wrote:
> >  >  > > I'm building a x86_64 2.6.22 kernel with the following options set:
> >  >  > >
> >  >  > > CONFIG_KEXEC=y
> >  >  > > CONFIG_CRASH_DUMP=y
> >  >  > > CONFIG_RELOCATABLE=y
> >  >  > > CONFIG_PHYSICAL_START=0x200000
> >  >  > >
> >  >  > > If I try to load the kernel with the following I get:
> >  >  > >
> >  >  > > ./kexec --args-linux -p '--command-line=ro root=LABEL=/1 rhgb quiet
> >  >  > > irqpoll maxcpus=1' --initrd=/boot/initrd-2.6.22.19.img
> >  >  > > /boot/vmlinuz-2.6.22.19
> >  >  > >
> >  >  > > ./kexec: unrecognized option `--args-linux'
> >  >  > > kexec-tools-testing 20080318-rc released 18th March 2008
> >  >  > > Usage: kexec [OPTION]... [kernel]
> >  >  > > ...
> >  >  > > Cannot load /boot/vmlinuz-2.6.22.19
> >  >  >
> >  >  > Hi Mike,
> >  >  >
> >  >  > that looks a lot like a problem with kexec-tools parsing command line
> >  >  > arguments to me. However I'm not having much luck reproducing it here.
> >  >  > I'll poke a bit more.
> >  >  >
> >  >  > Did you get kexec-tools-testing 20080318-rc as a tarball from
> >  >  > kernel.org? I just want to make sure we are looking at the same code.
> >  >
> >  >  Sorry for being a bit slow, I have managed to reproduce the problem,
> >  >  which is that --args-linux can't be used if the image is a bzImage.
> >  >  Could you try with a vmlinux image instead?
> >
> >  Interesting, makes sense.
> >
> >  Sure enough RedHat's image is a "ELF 64-bit LSB shared object" and a
> >  vmlinux is "ELF 64-bit LSB executable".
> >
> >  I wonder how RedHat gets their kernel image to be an ELF image?
> 
> RedHat includes the following (which never made it upstream):
> http://lkml.org/lkml/2006/8/14/203
> 

Yep. Andrew Morton's one machine with lilo boot-loader did not
boot with ELF header for bzImage and we did not know what was
wrong. So above patch never made upstream.

Anyway, it was not a necessary patch though..

Thanks
Vivek


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-02 17:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19  6:05 kexec won't --load-panic a 2.6.22 relocatable kernel? Mike Snitzer
2008-03-21  5:32 ` Simon Horman
2008-03-21 23:54   ` Mike Snitzer
2008-03-24  8:29   ` Simon Horman
2008-03-24 14:18     ` Mike Snitzer
2008-03-24 15:22       ` Mike Snitzer
2008-04-02 17:26         ` Vivek Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.