kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Invalid module format
@ 2018-02-21 21:12 Srishti Sharma
  2018-02-21 21:24 ` valdis.kletnieks at vt.edu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Srishti Sharma @ 2018-02-21 21:12 UTC (permalink / raw)
  To: kernelnewbies

Hello,

While trying to load a module from the linux-next branch , I get the error
that the module format is invalid, this was because the kernel I compiled
was different from the kernel I was trying to load the module into, so I
installed the kernel from the same source as the module, and it booted for
only once right after the installation. When I try to boot into the same
kernel, my system reboots. What should I do so that I am able to boot into
it everytime ?

Regards,
Srishti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180222/40243662/attachment.html>

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

* Invalid module format
  2018-02-21 21:12 Invalid module format Srishti Sharma
@ 2018-02-21 21:24 ` valdis.kletnieks at vt.edu
       [not found] ` <BY1PR0101MB101393E19DAD4C4C584BD89BCDCE0@BY1PR0101MB1013.prod.exchangelabs.com>
  2018-02-23 23:29 ` Tobin C. Harding
  2 siblings, 0 replies; 11+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-02-21 21:24 UTC (permalink / raw)
  To: kernelnewbies

On Thu, 22 Feb 2018 02:42:23 +0530, Srishti Sharma said:
> When I try to boot into the same kernel, my system reboots. What should I do
> so that I am able to boot into it everytime ?

Boot into *which* "same kernel"?  The linux-next kernel or the one you had originally?

As to what you should do, the answer to that will depend on *why* your system reboots.

At what point does it reboot?  Before it outputs *anything* to the console?  Or
does it get through the initrd/initramfs (if your kernel uses one) and then
die?  Or does it get most of the way up and then blow up?

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

* Invalid module format
       [not found]   ` <CAB3L5ozA_VUAJiypue2RDN-_kuC7FnS+DaYPO7cOfTKb9dBLAw@mail.gmail.com>
@ 2018-02-21 21:39     ` Alejandro D?az
  0 siblings, 0 replies; 11+ messages in thread
From: Alejandro D?az @ 2018-02-21 21:39 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Feb 22, 2018 at 02:52:39AM +0530, Srishti Sharma wrote:
> On Thu, Feb 22, 2018 at 2:50 AM, Alejandro D?az <ealejandro@outlook.com>
> wrote:
> 
> > On Thu, Feb 22, 2018 at 02:42:23AM +0530, Srishti Sharma wrote:
> > > Hello,
> > >
> > > While trying to load a module from the linux-next branch , I get the
> > error
> > > that the module format is invalid, this was because the kernel I compiled
> > > was different from the kernel I was trying to load the module into, so I
> > > installed the kernel from the same source as the module, and it booted
> > for
> > > only once right after the installation. When I try to boot into the same
> > > kernel, my system reboots. What should I do so that I am able to boot
> > into
> > > it everytime ?
> >
> > Hi,
> >
> > Do you get an error message before the new kernel reboots?
> >
> 
>  No, I don't get any error messages.

Do you get anything on the screen? Grub might be passing "quiet" as a
parameter which I believe suppresses messages(you want to disable for
troubleshooting purposes)

> 
> > Did you use the same config provided by your distribution(or a hand-rolled
> > config)?
> >
> 
> I used the same config provided.
> 
> Regards,
> Srishti

Regards,

Alex

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

* Invalid module format
  2018-02-21 21:12 Invalid module format Srishti Sharma
  2018-02-21 21:24 ` valdis.kletnieks at vt.edu
       [not found] ` <BY1PR0101MB101393E19DAD4C4C584BD89BCDCE0@BY1PR0101MB1013.prod.exchangelabs.com>
@ 2018-02-23 23:29 ` Tobin C. Harding
  2018-02-24  3:06   ` valdis.kletnieks at vt.edu
  2018-02-24  5:06   ` Srishti Sharma
  2 siblings, 2 replies; 11+ messages in thread
From: Tobin C. Harding @ 2018-02-23 23:29 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Feb 22, 2018 at 02:42:23AM +0530, Srishti Sharma wrote:
> Hello,
> 
> While trying to load a module from the linux-next branch

Do you mean from linux-next tree or from a branch called linux-next in
some other tree?  (Not that it matters that much :)

>, I get the error
> that the module format is invalid, this was because the kernel I compiled
> was different from the kernel I was trying to load the module into, so I
> installed the kernel from the same source as the module, and it booted for
> only once right after the installation. When I try to boot into the same
> kernel, my system reboots. What should I do so that I am able to boot into
> it everytime ?

What are you trying to achieve?  Are you doing testing on linux-next or
do you just want to use the module?  If you just want to use the module
you could build the module for the current running kernel instead of
rebuilding the kernel.  Copy the module someplace and write a new
makefile same as you would if you were developing your own [test]
modules.

(For the record I happened to be trying to learn about linux-next myself
this morning and built a kernel that just goes into a reboot loop
without even getting to the grub menu.  It boots in a VM though so now
I'm playing with the cofig.)

Hope this helps,
Tobin.

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

* Invalid module format
  2018-02-23 23:29 ` Tobin C. Harding
@ 2018-02-24  3:06   ` valdis.kletnieks at vt.edu
  2018-02-25  2:34     ` Tobin C. Harding
  2018-02-24  5:06   ` Srishti Sharma
  1 sibling, 1 reply; 11+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-02-24  3:06 UTC (permalink / raw)
  To: kernelnewbies

On Sat, 24 Feb 2018 10:29:33 +1100, "Tobin C. Harding" said:

> (For the record I happened to be trying to learn about linux-next myself
> this morning and built a kernel that just goes into a reboot loop
> without even getting to the grub menu.

OK, I'll bite - how can the kernel go into a reboot loop that doesn't get to the
grub menu?  (Hint: How does your system get from the BIOS splash screen to
starting the kernel? :)

(Though I've seen kernels that flash the screen like they're rebooting but they're
actually hung in a loop, and I've heard some great bar stories about kexec/kdump
gone horribly astray and re-invoking the current kernel rather than the kexec target
kernel....)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180223/8085c91b/attachment.sig>

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

* Invalid module format
  2018-02-23 23:29 ` Tobin C. Harding
  2018-02-24  3:06   ` valdis.kletnieks at vt.edu
@ 2018-02-24  5:06   ` Srishti Sharma
  1 sibling, 0 replies; 11+ messages in thread
From: Srishti Sharma @ 2018-02-24  5:06 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Feb 24, 2018 at 4:59 AM, Tobin C. Harding <me@tobin.cc> wrote:

> On Thu, Feb 22, 2018 at 02:42:23AM +0530, Srishti Sharma wrote:
> > Hello,
> >
> > While trying to load a module from the linux-next branch
>
> Do you mean from linux-next tree or from a branch called linux-next in
> some other tree?  (Not that it matters that much :)
>
> >, I get the error
> > that the module format is invalid, this was because the kernel I compiled
> > was different from the kernel I was trying to load the module into, so I
> > installed the kernel from the same source as the module, and it booted
> for
> > only once right after the installation. When I try to boot into the same
> > kernel, my system reboots. What should I do so that I am able to boot
> into
> > it everytime ?
>
> What are you trying to achieve?  Are you doing testing on linux-next or
> do you just want to use the module?  If you just want to use the module
> you could build the module for the current running kernel instead of
> rebuilding the kernel.  Copy the module someplace and write a new
> makefile same as you would if you were developing your own [test]
> modules.
>
> (For the record I happened to be trying to learn about linux-next myself
> this morning and built a kernel that just goes into a reboot loop
> without even getting to the grub menu.  It boots in a VM though so now
> I'm playing with the cofig.)
>
> Something was wrong with the configuration file, so I copied the
configuration of my running kernel and it boots now, but after running
make, the modules don't get generated, so there is something I am missing
in the configuration options again :(

Regards,
Srishti



> Hope this helps,
> Tobin.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180224/1b1bafe2/attachment.html>

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

* Invalid module format
@ 2018-02-24  5:15 Alex Arvelaez
  2018-02-24  5:17 ` Srishti Sharma
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Arvelaez @ 2018-02-24  5:15 UTC (permalink / raw)
  To: kernelnewbies


On Feb 24, 2018 12:07 AM, Srishti Sharma <srishtishar@gmail.com> wrote:
>
>
>
> On Sat, Feb 24, 2018 at 4:59 AM, Tobin C. Harding <me@tobin.cc> wrote:
>>
>> On Thu, Feb 22, 2018 at 02:42:23AM +0530, Srishti Sharma wrote:
>> > Hello,
>> >
>> > While trying to load a module from the linux-next branch
>>
>> Do you mean from linux-next tree or from a branch called linux-next in
>> some other tree?  (Not that it matters that much :)
>>
>> >, I get the error
>> > that the module format is invalid, this was because the kernel I compiled
>> > was different from the kernel I was trying to load the module into, so I
>> > installed the kernel from the same source as the module, and it booted for
>> > only once right after the installation. When I try to boot into the same
>> > kernel, my system reboots. What should I do so that I am able to boot into
>> > it everytime ?
>>
>> What are you trying to achieve?  Are you doing testing on linux-next or
>> do you just want to use the module?  If you just want to use the module
>> you could build the module for the current running kernel instead of
>> rebuilding the kernel.  Copy the module someplace and write a new
>> makefile same as you would if you were developing your own [test]
>> modules.
>>
>> (For the record I happened to be trying to learn about linux-next myself
>> this morning and built a kernel that just goes into a reboot loop
>> without even getting to the grub menu.  It boots in a VM though so now
>> I'm playing with the cofig.)
>>
> Something was wrong with the configuration file, so I copied the configuration of my running kernel and it boots now, but after running make, the modules don't get generated, so there is something I am missing in the configuration options again :(

Are they getting built? did you do make modules_install?

> Regards,
> Srishti
>
>
>>
>> Hope this helps,
>> Tobin.
>
>

Regards,

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180224/30677f9f/attachment-0001.html>

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

* Invalid module format
  2018-02-24  5:15 Alex Arvelaez
@ 2018-02-24  5:17 ` Srishti Sharma
  0 siblings, 0 replies; 11+ messages in thread
From: Srishti Sharma @ 2018-02-24  5:17 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Feb 24, 2018 at 10:45 AM, Alex Arvelaez <ealejandro@outlook.com>
wrote:

>
> On Feb 24, 2018 12:07 AM, Srishti Sharma <srishtishar@gmail.com> wrote:
> >
> >
> >
> > On Sat, Feb 24, 2018 at 4:59 AM, Tobin C. Harding <me@tobin.cc> wrote:
> >>
> >> On Thu, Feb 22, 2018 at 02:42:23AM +0530, Srishti Sharma wrote:
> >> > Hello,
> >> >
> >> > While trying to load a module from the linux-next branch
> >>
> >> Do you mean from linux-next tree or from a branch called linux-next in
> >> some other tree?  (Not that it matters that much :)
> >>
> >> >, I get the error
> >> > that the module format is invalid, this was because the kernel I
> compiled
> >> > was different from the kernel I was trying to load the module into,
> so I
> >> > installed the kernel from the same source as the module, and it
> booted for
> >> > only once right after the installation. When I try to boot into the
> same
> >> > kernel, my system reboots. What should I do so that I am able to boot
> into
> >> > it everytime ?
> >>
> >> What are you trying to achieve?  Are you doing testing on linux-next or
> >> do you just want to use the module?  If you just want to use the module
> >> you could build the module for the current running kernel instead of
> >> rebuilding the kernel.  Copy the module someplace and write a new
> >> makefile same as you would if you were developing your own [test]
> >> modules.
> >>
> >> (For the record I happened to be trying to learn about linux-next myself
> >> this morning and built a kernel that just goes into a reboot loop
> >> without even getting to the grub menu.  It boots in a VM though so now
> >> I'm playing with the cofig.)
> >>
> > Something was wrong with the configuration file, so I copied the
> configuration of my running kernel and it boots now, but after running
> make, the modules don't get generated, so there is something I am missing
> in the configuration options again :(
>
> Are they getting built? did you do make modules_install?
>
  After compilation I got .o files and not .ko , I used make .

  Regards,
  Srishti

> > Regards,
> > Srishti
> >
> >
> >>
> >> Hope this helps,
> >> Tobin.
> >
> >
>
> Regards,
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180224/38438bf4/attachment.html>

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

* Invalid module format
  2018-02-24  3:06   ` valdis.kletnieks at vt.edu
@ 2018-02-25  2:34     ` Tobin C. Harding
  2018-02-25  5:04       ` valdis.kletnieks at vt.edu
  0 siblings, 1 reply; 11+ messages in thread
From: Tobin C. Harding @ 2018-02-25  2:34 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Feb 23, 2018 at 10:06:14PM -0500, valdis.kletnieks at vt.edu wrote:
> On Sat, 24 Feb 2018 10:29:33 +1100, "Tobin C. Harding" said:
> 
> > (For the record I happened to be trying to learn about linux-next myself
> > this morning and built a kernel that just goes into a reboot loop
> > without even getting to the grub menu.
> 
> OK, I'll bite - how can the kernel go into a reboot loop that doesn't get to the
> grub menu?  (Hint: How does your system get from the BIOS splash screen to
> starting the kernel? :)

That's not biting.  Having to pointed out when I say something
ridiculous is one of the reasons I like the kernel mailing lists so
much.

Re-reading my original comment in your response makes it bleedingly
obvious that what I said was ridiculous.  I must have been selecting the
broken kernel in grub for it to boot - I still don't remember doing so
but it wouldn't be the first time my memory has bent reality.

> (Though I've seen kernels that flash the screen like they're rebooting but they're
> actually hung in a loop, and I've heard some great bar stories about kexec/kdump
> gone horribly astray and re-invoking the current kernel rather than the kexec target
> kernel....)

I appreciate your response Valdis, you always take the time to answer
nood questions.


thanks,
Tobin.

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

* Invalid module format
  2018-02-25  2:34     ` Tobin C. Harding
@ 2018-02-25  5:04       ` valdis.kletnieks at vt.edu
  2018-02-25  7:29         ` Tobin C. Harding
  0 siblings, 1 reply; 11+ messages in thread
From: valdis.kletnieks at vt.edu @ 2018-02-25  5:04 UTC (permalink / raw)
  To: kernelnewbies

On Sun, 25 Feb 2018 13:34:41 +1100, "Tobin C. Harding" said:
> On Fri, Feb 23, 2018 at 10:06:14PM -0500, valdis.kletnieks at vt.edu wrote:
> > OK, I'll bite - how can the kernel go into a reboot loop that doesn't get to the
> > grub menu?  (Hint: How does your system get from the BIOS splash screen to
> > starting the kernel? :)
>
> That's not biting.  Having to pointed out when I say something
> ridiculous is one of the reasons I like the kernel mailing lists so
> much.
>
> Re-reading my original comment in your response makes it bleedingly
> obvious that what I said was ridiculous.  I must have been selecting the
> broken kernel in grub for it to boot - I still don't remember doing so
> but it wouldn't be the first time my memory has bent reality.

Actually, there *is* a way you can end up in a reboot loop like that - if
you set the grub menu timeout to zero.  That's actually pretty useful if
you're building an embedded system that can't display the grub menu anyhow,
or you want to save the few seconds of boot time (important if you're
a wireless router or a smart TV or similar).

Of course, anybody who's done that to their system probably knows it,
because if they installed a bum kernel, they've effectively bricked the box
until they re-flash the image.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180225/97fb23f6/attachment.sig>

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

* Invalid module format
  2018-02-25  5:04       ` valdis.kletnieks at vt.edu
@ 2018-02-25  7:29         ` Tobin C. Harding
  0 siblings, 0 replies; 11+ messages in thread
From: Tobin C. Harding @ 2018-02-25  7:29 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Feb 25, 2018 at 12:04:30AM -0500, valdis.kletnieks at vt.edu wrote:
> On Sun, 25 Feb 2018 13:34:41 +1100, "Tobin C. Harding" said:
> > On Fri, Feb 23, 2018 at 10:06:14PM -0500, valdis.kletnieks at vt.edu wrote:
> > > OK, I'll bite - how can the kernel go into a reboot loop that doesn't get to the
> > > grub menu?  (Hint: How does your system get from the BIOS splash screen to
> > > starting the kernel? :)
> >
> > That's not biting.  Having to pointed out when I say something
> > ridiculous is one of the reasons I like the kernel mailing lists so
> > much.
> >
> > Re-reading my original comment in your response makes it bleedingly
> > obvious that what I said was ridiculous.  I must have been selecting the
> > broken kernel in grub for it to boot - I still don't remember doing so
> > but it wouldn't be the first time my memory has bent reality.
> 
> Actually, there *is* a way you can end up in a reboot loop like that - if
> you set the grub menu timeout to zero.  That's actually pretty useful if
> you're building an embedded system that can't display the grub menu anyhow,
> or you want to save the few seconds of boot time (important if you're
> a wireless router or a smart TV or similar).

Being the type of guy who crashes his kernel constantly and breaks it
every other build this would be suicide.

> Of course, anybody who's done that to their system probably knows it,
> because if they installed a bum kernel, they've effectively bricked the box
> until they re-flash the image.

It's not bricked if you can re-flash it.


	Tobin

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

end of thread, other threads:[~2018-02-25  7:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 21:12 Invalid module format Srishti Sharma
2018-02-21 21:24 ` valdis.kletnieks at vt.edu
     [not found] ` <BY1PR0101MB101393E19DAD4C4C584BD89BCDCE0@BY1PR0101MB1013.prod.exchangelabs.com>
     [not found]   ` <CAB3L5ozA_VUAJiypue2RDN-_kuC7FnS+DaYPO7cOfTKb9dBLAw@mail.gmail.com>
2018-02-21 21:39     ` Alejandro D?az
2018-02-23 23:29 ` Tobin C. Harding
2018-02-24  3:06   ` valdis.kletnieks at vt.edu
2018-02-25  2:34     ` Tobin C. Harding
2018-02-25  5:04       ` valdis.kletnieks at vt.edu
2018-02-25  7:29         ` Tobin C. Harding
2018-02-24  5:06   ` Srishti Sharma
  -- strict thread matches above, loose matches on Subject: below --
2018-02-24  5:15 Alex Arvelaez
2018-02-24  5:17 ` Srishti Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).