கையேடு:பாகங்கள்/நிறுவல்/கருநிரல்/பகிர்ந்தளிப்பு-கருநிரல்

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:Parts/Installation/Kernel/Dist-Kernel and the translation is 47% complete.
Outdated translations are marked like this.

பகிர்ந்தளிப்பு கருநிரல்கள்

பகிர்ந்தளிப்பு கருநிரல்கள் கருநிரலை கட்டவிழ்த்து உள்ளமைத்து தொகுத்து பின் நிறுவும் மொத்த செயல்களையும் செய்யும் ebuild களாகும். @world இற்றைப்படுத்தலின் ஒரு பாகமாக கருநிரலை புதிய பதிப்பிற்குத் தொகுப்பு மேலாளர் இற்றைப்படுத்துவது இந்த வழிமுறையால் விளையும் முதன்மை பயனாகும். இதற்கு அதிமாக ஈடுபட தேவையில்லை. emerge கட்டளையை இயக்கினால் போதும். பகிர்ந்தளிப்பு கருநிரல்கள் முன்னிருப்பாகப் பெரும்பான்மையான வன்பொருட்களை ஆதரிக்கும் உள்ளமைவை கொண்டுள்ளது. இருப்பினும் இவற்றைத் தனிப்பயனாக்க savedconfig மற்றும் config துண்டுகளைப் பயன்படுத்தலாம். மேலும் விவரங்களுக்கு கருநிரல் உள்ளமைவை திருத்தியமைத்தல் பற்றிய செயல்திட்ட பக்கத்தை காணவும்.

பகிர்ந்தளிப்பு கருநிரலை நிறுவுதல்

Before installing the kernel package the dracut USE flag needs to be added for the package sys-kernel/installkernel in /etc/portage/package.use:

கோப்பு /etc/portage/package.use/installkernelEnable dracut support
sys-kernel/installkernel dracut

Users may also wish to enable additional sys-kernel/installkernel USE flags at this stage. See the Installation/Kernel#Installkernel section for details.

மூலத்திலிருந்து சென்டூ ஒட்டுகளுடன் கருநிரலை உருவாக்க இதைச் செய்யவும்:

root #emerge --ask sys-kernel/gentoo-kernel

கருநிரலை மூலங்களை உள்ளூரில் தொகுக்க விரும்பாத முறைமை செயலாட்சியர்கள் இதற்குப் பதிலாக முன்-தொகுக்கப்பட்ட கருநிரல் படங்களைப் பயன்படுத்தலாம்:

root #emerge --ask sys-kernel/gentoo-kernel-bin
Optional: Signed kernel modules

The kernel modules in the prebuilt distribution kernel (sys-kernel/gentoo-kernel-bin) are already signed. To sign the modules of kernels built from source enable the modules-sign USE flag, and optionally specify which key to use for signing in /etc/portage/make.conf:

கோப்பு /etc/portage/make.confEnable module signing
USE="modules-sign"
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
# Optionally, to use custom signing keys.
MODULES_SIGN_KEY="/path/to/kernel_key.pem"
MODULES_SIGN_CERT="/path/to/kernel_key.pem" # Only required if the MODULES_SIGN_KEY does not also contain the certificate.
MODULES_SIGN_HASH="sha512" # Defaults to sha512.

If MODULES_SIGN_KEY is not specified the kernel build system will generate a key, it will be stored in /usr/src/linux-x.y.z/certs. It is recommended to manually generate a key to ensure that it will be the same for each kernel release. A key may be generated with:

root #openssl req -new -nodes -utf8 -sha256 -x509 -outform PEM -out kernel_key.pem -keyout kernel_key.pem
குறிப்பு
The MODULES_SIGN_KEY and MODULES_SIGN_CERT may be different files. For this example the pem file generated by OpenSSL includes both the key and the accompanying certificate, and thus both variables are set to the same value.

OpenSSL will ask some questions about the user generating the key, it is recommended to fill in these questions as detailed as possible.

Store the key in a safe location, at the very least the key should be readable only by the root user. Verify this with:

root #ls -l kernel_key.pem
 -r-------- 1 root root 3164 Jan  4 10:38 kernel_key.pem 

If this outputs anything other then the above, correct the permissions with:

root #chown root:root kernel_key.pem
root #chmod 400 kernel_key.pem
Optional: Signing the kernel image (Secure Boot)

The kernel image in the prebuilt distribution kernel (sys-kernel/gentoo-kernel-bin) is already signed for use with Secure Boot. To sign the kernel image of kernels built from source enable the secureboot USE flag, and optionally specify which key to use for signing in /etc/portage/make.conf. Note that signing the kernel image for use with secureboot requires that the kernel modules are also signed, the same key may be used to sign both the kernel image and the kernel modules:

கோப்பு /etc/portage/make.confEnable custom signing keys
USE="modules-sign secureboot"
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
# Optionally, to use custom signing keys.
MODULES_SIGN_KEY="/path/to/kernel_key.pem"
MODULES_SIGN_CERT="/path/to/kernel_key.pem" # Only required if the MODULES_SIGN_KEY does not also contain the certificate.
MODULES_SIGN_HASH="sha512" # Defaults to sha512.
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
# Optionally, to boot with secureboot enabled, may be the same or different signing key.
SECUREBOOT_SIGN_KEY="/path/to/kernel_key.pem"
SECUREBOOT_SIGN_CERT="/path/to/kernel_key.pem"
குறிப்பு
The SECUREBOOT_SIGN_KEY and SECUREBOOT_SIGN_CERT may be different files. For this example the pem file generated by OpenSSL includes both the key and the accompanying certificate, and thus both variables are set to the same value.
குறிப்பு
For this example the same key that was generated to sign the modules is used to sign the kernel image. It is also possible to generate and use a second separate key for signing the kernel image. The same OpenSSL command as in the previous section may be used again.

See the above section for instructions on generating a new key, the steps may be repeated if a separate key should be used to sign the kernel image.

To successfully boot with Secure Boot enabled, the used bootloader must also be signed and the certificate must be accepted by the UEFI firmware or Shim. This will be explained later in the handbook.

இற்றைப்படுத்தலும் சுத்தம் செய்தலும்

கருநிரல் நிறுவப்பட்டதும் இனி வரும் காலங்களில் தொகுப்பு மேலாளரானது இதன் புதிய பதிப்புகளுக்குத் தானியக்கமாக இற்றைப்படுத்தும். சுத்தம் செய்யுமாறு கோரும்வரை முந்தைய பதிப்புகளைத் தொகுப்பு மேலாளர் வைத்திருக்கும். வட்டு வெற்றிடத்தை அதிகப்படுத்த அவ்வப்போது emerge ஐ --depclean விருப்பத்தேர்வுடன் இயக்கவும்:

root #emerge --depclean

இதற்குப் பதிலாகக் குறிப்பிட்ட பழைய கருநிரல் பதிப்பை மட்டும் நீக்குவதற்கு:

root #emerge --prune sys-kernel/gentoo-kernel sys-kernel/gentoo-kernel-bin

நிறுவலுக்கு/இற்றைப்படுத்தலுக்கு பின் செய்ய வேண்டிய பணிகள்

பகிர்ந்தளிப்பு கருநிரலானது மற்ற தொகுப்புகளால் நிறுவப்பட்டுள்ள கருநிரல் கூறுகளை மீள் உருவாக்கும் ஆற்றல் கொண்டவை. linux-mod.eclass ஆனது dist-kernel USE கொடி ஒன்றை அளிக்கிறது. இது virtual/dist-kernel இனுள் துணை செருகுவாய் சார்புநிலையைக் கட்டுப்படுத்துகிறது.

sys-fs/zfs sys-fs/zfs-kmod போன்ற தொகுப்புகளில் இந்த USE கொடியைச் செயல்படுத்துவதன் மூலம் ஒவ்வொரு புதிய கருநிரல் இற்றைப்படுத்தலின்போது தானியக்கமாக இதை மீள் உருவாக்கித் தேவைப்பட்டால் initramfs ஐ மீண்டும் உற்பத்தி செய்யும்.

initramfs ஐ கைமுறையாக மீள் உருவாக்கல்

தேவைப்பட்டால் கருநிரல் இற்றைப்படுத்தலுக்குப் பின் கைமுறையாக மீள் உருவாக்கத்தைத் தூண்ட இதை இயக்கவும்:

root #emerge --ask @module-rebuild

துவக்கத்தில் கருநிரல் கூறுகள் (எ.கா. ZFS) ஏதேனும் தேவைப்பட்டால் இந்த கட்டளையைக் கொண்டு initramfs ஐ மீள் உருவாக்கவும்:

root #emerge --config sys-kernel/gentoo-kernel
root #emerge --config sys-kernel/gentoo-kernel-bin