Kernelã®æ°ããæ©è½ããã«ã«ä½¿ããã¨ããã¨ãæ°ããkernelã使ãå¿ è¦ãããã®ã§ãããä¾ãã°CentOS6ç³»ã§ã·ã¹ãã ãéç¨ãã¦ããå ´åã«ãæ°ããKernelã使ãã¹ãCentOS7ã¨ãã«ãããã¨systemdå«ãéç¨ã大ããå¤ãã£ã¦ãã¾ãããä¸ã è¸ã¿åºããªãã¨ããç¶æ³ãããã¨æãã¾ãã
ããã§ãéç¨ãå«ããæ¤è¨¼ãã¦ãCentOS6ç¨ï¼ä»ã®ãã¼ã¸ã§ã³ã§ãåãããï¼ã®Kernel4ç³»ãããã¯3ç³»ã®ã¤ã¡ã¼ã¸ã®rpmãç°¡åã«ãã«ãããã·ã¹ãã ãä½ãã¾ããã
使ãæ¹
Macä¸ã§git clone https://github.com/matsumoto-r/kernel-4-build-system-for-centos6.git
ãã¦ã
make
ããã ãã§ãã
ããã¨ãããã©ã«ãã§ã¯build/linux-4.1.1
以ä¸ã«ä»¥ä¸ã®ããã«å¿
è¦ãªrpmãçæããã¾ãã
ls build/linux-4.1.1/ kernel-4.1.1-2.x86_64.rpm kernel-devel-4.1.1-2.x86_64.rpm kernel-headers-4.1.1-2.x86_64.rpm
ç°¡åï¼ï¼ï¼
å¾ã¯ããã対象ã®ãµã¼ãã«æã£ã¦è¡ã£ã¦rpmãã¤ã³ã¹ãã¼ã«ãã¦grub.confã®defaultã¤ã¡ã¼ã¸ãå¤æ´ãã¦åèµ·åããã ãã§ããã
ã¾ããå¥ãã¼ã¸ã§ã³ãæå®ãããå ´åã¯ã
make KERNEL_VER=3.18.18
ã¨ã
make KERNEK_VER=4.1.2
ã¨ãã§ãã¾ãã
å é¨çãªå¦ç
å é¨ã§ã¯ã
- vagrant
- vagrant-persistent-storage
- Itamae
ã使ã£ã¦ãã¾ããvagrantä¸ã®boxã«å¯¾ãã¦itamaeã§ãã«ãç°å¢ãä½ãããã®å¾ã«localã§åä½ãããã«ãã·ã¹ãã ã§ããã
ãæã£ã¦ãã¦ãã«ããã¦ãã¾ãã
ãã®ãã¼ã«ã«ã§åä½ãããã«ãã·ã¹ãã ã¯ãä¾ãã°ãã§ã«Kernelã®ãã«ãç°å¢ããæã¡ã®æ¹ã¯ãããããMacã¨vagrantã§ãã«ãããäºãªããbuild-kernel-4.x-for-centos6
ãªãã¸ããªãlinuxã®ãã«ãç°å¢ä¸ã§cloneãã¦ãã«ããã¦ãè¯ãã§ãããã®éã¯ãREADMEãåèã«ãã¦ä¸ããã
Kernel2.6ããkernel4.1.1ã¸ã®configä½ææã®ã¨ã©ã¼ã«ã¤ãã¦
ä»åãæ¢ã«ä½æããkernelãã«ãç¨ã®configããªãã¸ããªã«åå°ãã¦ããã®ã§ãããããã¯åºæ¬CentOS6ã«å ¥ã£ã¦ããKernel2.6ã®configãåå©ç¨ãã¦ä½ã£ã¦ãã¾ãã
ã¾ãããã®éã«å¹¾ã¤ãã¨ã©ã¼ãåºã¦ããã®ã§ãããåèã¾ã§ã«ããã®å¯¾å¿ãç°¡åã«ç´¹ä»ãã¾ãã
ERROR: modinfo: could not find module ipt_LOG
Kernelã®rpmã®é©ç¨æã«åºåãããå ´åãããã®ã§ãããipt_LOGã®ã«ã¼ãã«ã¢ã¸ã¥ã¼ã«ã¯3ç³»ããxt_LOGã«ååå¤æ´ã«ãªã£ãã®ã§ããã®kernelã¢ã¸ã¥ã¼ã«ä½ãããã«configãä¿®æ£ãã¾ããã
ERROR: modinfo: could not find module power_meter
poer_meterã®ã¨ã©ã¼ã¯3ç³»ããkernelã¢ã¸ã¥ã¼ã«åãacpi_power_meterã«ãªã£ãã®ã§ãã®kernelã¢ã¸ã¥ã¼ã«ãä½ãããã«configãä¿®æ£ãã¾ããã
ERROR: modinfo: could not find module crc_t10dif
crc_t10difã®ã¨ã©ã¼ã¯ã¢ã¸ã¥ã¼ã«ãããã«ãã¤ã³ã«ãªã£ãã®ã§ãã¼ãã®å¿ è¦ããªããªãã¾ããã
cgconfigã/cgroup/memroy
é¢é£ã§åä½ããªã
- CONFIG_MEMCG
- CONFIG_CGROUP_HUGETLB
- CONFIG_CHECKPOINT_RESTORE
ããããäºæå«ãã¦æ©è½ã«çãè¾¼ãããã«configãä¿®æ£ãã¾ãããCONFIG_CHECKPOINT_RESTOREã«é¢ãã¦ã¯CRIUã使ããããã追å ã§çãè¾¼ãã§ãã¾ãã
ä¸è¨ã®ããã«å¯¾å¿ãã¦ããæãã®configãä½ã£ã¦ãã¾ãã
åºæ¬çã«kernelãã¼ã¸ã§ã³ã¢ãã㧠ERROR: modinfo: could not find module
ã«é¢ãã¦èª¿æ»ãã¦ãããã¤ã³ãã¨ãã¦ã
- kernelã¢ã¸ã¥ã¼ã«åãå¤ãã£ããã©ãã
- kernelçµè¾¼ã¿æ©è½ã«ãªã£ããã©ãã
- CONFIGåãå¤æ´ã«ãªã£ãå ´åï¼ãã¨ãã°cgroupã®memoryæ©è½ã®CONFIGåãå¤æ´ãããä¸ã§ã§ããã©ã«ã使ããªãã¨ãªã£ã¦ããã¨ã/cgroup/memoryæ©è½ã使ãã¦ãã®ã«ä½¿ããªãã¨ãï¼
- åç´ã«configæ¼ãã§ã¢ã¸ã¥ã¼ã«ã足ãã¦ããªããã©ãã
ã§ããããåkernelã®configãã³ãã¼ãã¦ããmake oldconfig
ãã¦ä½ã£ãkernelã§ããã°ãåºæ¬çã«ã¯1ã2ã3ãçãã°è¯ãããã«æãã¾ããè²ã
ä¾å¤ã¯ããã¨æãã¾ããã
ã¾ã¨ã
ã¨ãããã¨ã§ãç´°ããé¨åã¾ã§è§£èª¬ãã¾ããããMacä¸ã§makeä¸çºã§Kernel4ã®ã¤ã¡ã¼ã¸ããã«ããããã«ãã·ã¹ãã ãä½ã£ã¦ã¿ã¾ãããä¸å¿ãä»å¾ã®ãã¼ã¸ã§ã³ã¢ããããµã¾ãã¦æ°ãããã¼ã¸ã§ã³ãç°¡åã«ãã«ãã§ããããã«æã¯å ¥ãã¦ãã¾ãããããã¯ä½¿ãåæãè¦ãªããä¿®æ£ãã¦ãããã¨æãã¾ãã
åããããªåé¡æèãæ±ãã¦ããæ¹ã¯ãã¾ãã¯æ¤è¨¼çã§ä½¿ã£ã¦é ãã¨è²ã æãã¨æãã¾ãã®ã§æ¯éãæ´»ç¨ä¸ããï¼