WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling new kernel for corepure64  (Read 18305 times)

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Compiling new kernel for corepure64
« on: January 14, 2016, 01:18:18 PM »
Hi All,

I'm new to TC, but want to use it to pxe boot compute nodes for a HPC cluster. I've gotten everything to work using CorePure64-5.4.iso, but only for dual quad-core nodes. I am now adding dual 12-core nodes and it seems that the kernel (3.8) that comes with this TC does not work for these newer nodes (only 8 total cpus are recognized). I've booted a 24-core node using Fedora 23, which comes with 4.2 kernel as standard, so I'm thinking that it is a kernel issue. If not, I would be glad to hear how to get my existing CorePure64-5.4 to recognize more cores. If a newer kernel is indeed needed, I would appreciate any help in how to compile a 4.2 kernel for TC.

Thanks,

Dan

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #1 on: January 14, 2016, 01:54:48 PM »
Hi xrayman2016
What happens if you add the following boot code:
Code: [Select]
maxcpus=12

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Re: Compiling new kernel for corepure64
« Reply #2 on: January 14, 2016, 02:00:50 PM »
Would this be put into the "default" file as APPEND maxcpus=12?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #3 on: January 14, 2016, 02:03:46 PM »
Hi xrayman2016
It goes in the  .conf  file used by your boot loader. Same line that contains  initread=.

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Re: Compiling new kernel for corepure64
« Reply #4 on: January 14, 2016, 02:12:40 PM »
If I understand correctly, the TC image doesn't use or have a bootloader, like GRUB when booting via PXE. There is no /boot/ directory in the image, at least. Tried this kernel boot code in the PXE "default" file. Didn't work.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #5 on: January 14, 2016, 02:42:03 PM »
Hi xrayman2016
According to this (scroll all the way down):
http://support.tabernus.com/support/solutions/articles/3000033502-how-to-boot-tabernus-lan-wan-in-existing-pxe-environment
it goes on the  APPEND  line. However, if  NR_CPUS  in the kernel config file was set to 8 (which I suspect it was) that
would limit you to 8 CPUs max. So you probably would need to increase  NR_CPUS  and recompile the kernel.

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Re: Compiling new kernel for corepure64
« Reply #6 on: January 14, 2016, 02:47:59 PM »
This is great news, Rich! Thank you so much. I should be able to recompile a new kernel inside Fedora 21, but use the .conf file from TC, right? Except to change that configuration entry, of course.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #7 on: January 14, 2016, 02:53:14 PM »
Hi xrayman2016
I think others have managed to compile under other distros, though compiling under Tinycore is probably preferred.
You said you are running a 5.x version, so config files can be found here:
http://tinycorelinux.net/5.x/x86/release/src/kernel/

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Compiling new kernel for corepure64
« Reply #8 on: January 15, 2016, 12:01:06 AM »
I would appreciate any help in how to compile a 4.2 kernel for TC.

Already done  :) tc-7.x beta is 4.2.7 kernel

http://www.tinycorelinux.net/7.x/x86_64/release_candidates/

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #9 on: January 15, 2016, 12:20:44 AM »
Hi Juanito
His problem isn't that he needs a 4.2 kernel. It's the kernel was compiled with  CONFIG_NR_CPUS=8  but he's running
hardware with more than 8 CPUs and he wants to utilize them.

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Re: Compiling new kernel for corepure64
« Reply #10 on: January 15, 2016, 12:08:16 PM »
Just tried recompiling the 3.8.13 kernel using config-3.8.13-tinycore64 and linux-3.8.13-patched.txz, after changing CONFIG_NR_CPUS=64 in .config file. Node did not boot up. I only did make bzImage, as I didn't think a whole compile was necessary, given that none of the modules were changed. Did I miss something? Would it be possible to set CONFIG_NR_CPUS=64 in the new beta version? That would future-proof TC for the newer multi-core processors. Just a thought...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #11 on: January 15, 2016, 03:41:49 PM »
Hi xrayman2016
Just a thought, but you did rename  bzImage  to  vmlinuz  so it would be found, right?

Offline xrayman2016

  • Newbie
  • *
  • Posts: 13
Re: Compiling new kernel for corepure64
« Reply #12 on: January 15, 2016, 04:04:59 PM »
Yes, I did that first thing. From one of the posts in the Remaster forum section, it sounds like a compile modules issue, but I didn't recompile any modules, since I just need the new kernel. Maybe this is not correct...

This is the link to that forum article:
http://forum.tinycorelinux.net/index.php/topic,16995.msg101928.html#msg101928

My node stops booting at about the same place as his. Although I didn't try to add any kernel modules, just changed NR_CPUS.

I'm compiling the kernel on Fedora 21 so far. Maybe I should try within TC? Can't see how that should matter, though.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Compiling new kernel for corepure64
« Reply #13 on: January 16, 2016, 05:18:18 AM »
Just tried recompiling the 3.8.13 kernel using config-3.8.13-tinycore64 and linux-3.8.13-patched.txz, after changing CONFIG_NR_CPUS=64 in .config file. Node did not boot up.

Since you used a different compiler, you must recompile modules as well. A different version of gcc invalidates everything, even if your config change would not.

Quote
Would it be possible to set CONFIG_NR_CPUS=64 in the new beta version? That would future-proof TC for the newer multi-core processors. Just a thought...

Yes, in the 64-bit kernel this will be done.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11703
Re: Compiling new kernel for corepure64
« Reply #14 on: January 16, 2016, 10:07:05 AM »
Hi curaga
Since you used a different compiler, you must recompile modules as well. A different version of gcc invalidates everything, even if your config change would not.

I'm guessing some extensions might be affected too. For example, things like  alsa-modules, ndiswrapper-modules,
wl-modules, etc.