WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Question on the microcore Linux kernel  (Read 17327 times)

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #15 on: November 14, 2012, 09:12:58 AM »
The links under chapter "initramfs" here:
http://www.landley.net/writing/
should pretty much cover the whole subject.

To me it looks like the patch is replacing ramfs with tmpfs, though from what I had read I had always understood that tmpfs could be enabled without a patch, so I am not really sure about that.

Thanks for the link. Looks it has a lot of good info.

I recompiled the tinycore kernel and on pxeboot, it immediately hit the following line:

panic("No init found.  Try passing init= option to kernel. "
         "See Linux Documentation/init.txt for guidance.");

I kind of suspect my kernel didn't unpack the initrd cpio file correctly so it couldn't find the init script to run. Does anyone have any suggestions where to look?


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Question on the microcore Linux kernel
« Reply #16 on: November 14, 2012, 09:25:08 AM »
Show your pxe entry.
See the network booting examples in the wiki.

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #17 on: November 14, 2012, 10:34:41 AM »
Show your pxe entry.
See the network booting examples in the wiki.

Which pxe entry? pxelinux.cfg/default?

It boots ok if I just use the TC kernel and core.gz.
It only failed when I compiled the kernel downloaded from linux-3.0.21-patched.txz and config-3.0.21-tinycore. It must be something missing from my own config and compiling process.




Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Question on the microcore Linux kernel
« Reply #18 on: November 14, 2012, 11:09:55 AM »
Did you update the cpio archive to reflect changes of modules?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Question on the microcore Linux kernel
« Reply #19 on: November 14, 2012, 12:09:56 PM »
Why are you recompiling the kernel?

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Re: Question on the microcore Linux kernel
« Reply #20 on: November 14, 2012, 07:25:48 PM »
Did you update the cpio archive to reflect changes of modules?
Don't quite understand this. What module is changed? 



Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Re: Question on the microcore Linux kernel
« Reply #21 on: November 14, 2012, 07:28:04 PM »
Why are you recompiling the kernel?
Must want to understand the TC kernel patch by playing it.

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #22 on: November 15, 2012, 07:22:50 AM »
Did you update the cpio archive to reflect changes of modules?

I am not sure I understand your point. 

I don't really want to change any kernel modules but maybe accidentally I did it by running make oldconfig using the downloaded config file. There is indeed a diff for .config after make oldconfig.  But I am not sure how I need to update cpio.

Can you explain?


Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Question on the microcore Linux kernel
« Reply #23 on: November 15, 2012, 07:42:05 AM »
Noone could possibly ever guess what you did without you providing exact documentation...

Your safest bet might be to follow regular procedure of installing different kernel.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #24 on: November 15, 2012, 08:43:14 AM »
Noone could possibly ever guess what you did without you providing exact documentation...

Your safest bet might be to follow regular procedure of installing different kernel.

Here is what I did step-by-step. Prior to these, I was able to pxeboot the microcore with vmlinuz and coregz as initrd.

1. download linux-3.0.21-patched.txz, unpack to a directory linux-3.0.21/
2. download config-3.0.21-tinycore and copy it to linux-3.0.21/ as .config
3. cd linux-3.0.21/, do make oldconfig and accept all defaults
4. make
5. copy linux-3.0.21/arch/x86/boot/bzImage to tftpboot/ directory as vmlinuz (overwrite the previous one)
6. try pxeboot again.

Anything I might have missed in the above?




Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10969
Re: Question on the microcore Linux kernel
« Reply #25 on: November 15, 2012, 08:57:52 AM »
"accept defaults" sounds wrong, as the config is for the same version, it should ask nothing.
The only barriers that can stop you are the ones you create yourself.

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #26 on: November 15, 2012, 03:32:36 PM »
"accept defaults" sounds wrong, as the config is for the same version, it should ask nothing.

I was also wondering too about this. make oldconfig with the existing .config should be enough. But maybe the kernel source doesn't match the config file.

Can I just do make without "make oldconfig"?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10969
Re: Question on the microcore Linux kernel
« Reply #27 on: November 16, 2012, 06:56:16 AM »
It does match, if you grabbed the same versions (3.0.21 instead of 3.0.3). Something in your environment is weird.

One of the *config targets is necessary; if you don't run any of them, the makefiles will run oldconfig for you.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Question on the microcore Linux kernel
« Reply #28 on: November 16, 2012, 10:09:40 AM »
You could run a diff between some newly built modules and their correspondent ones in stock cpio archive.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline lid

  • Jr. Member
  • **
  • Posts: 62
Re: Question on the microcore Linux kernel
« Reply #29 on: November 16, 2012, 08:29:22 PM »
It does match, if you grabbed the same versions (3.0.21 instead of 3.0.3). Something in your environment is weird.

One of the *config targets is necessary; if you don't run any of them, the makefiles will run oldconfig for you.

Ok, I made some progress. I ran make oldconfig using the 64 bit config file and this time it passed without asking questions. So I rebuilt the kernel and pxebooted. This time there is no kernel panic. However the problem now is the boot process stops after this:

modprobe: chdir (3.0.21-tinycore 64+) No such file or dir
...
Switching to clocksource tsc.

Maybe I am missing some modules in the initramfs ?

David