![]() |
|
ForumSun Nov 19 12:55:36 2023 UTC Help: Installationndawka ![]() Wed Nov 8 02:20:10 2023 UTC Documentation: Tips and Tricksedulof ![]() Sun Oct 1 15:09:38 2023 UTC General: NuTyXThierry ![]() Wed Sep 27 12:34:35 2023 UTC Help: GeneralThierry ![]() Wed Sep 27 12:30:24 2023 UTC Help: GeneralPeppe123$$$ ![]() Wed Sep 27 11:30:55 2023 UTC Help: GeneralThierry ![]() Wed Sep 27 07:31:22 2023 UTC Help: GeneralPeppe123$$$ ![]() Tue Sep 26 09:53:25 2023 UTC Help: GeneralPeppe123$$$ ![]() Mon Sep 25 20:38:46 2023 UTC Help: Generalspiky ![]() Mon Sep 25 17:08:09 2023 UTC Help: GeneralThierry ![]() |
Sun Nov 20 19:04:03 2022 UTC Building an initrdContentsWhat's an initrd ?If we stick to Wikipedia, in computing (specifically as regards Linux computing), initrd (initial ramdisk) is a scheme for loading a temporary root file system into memory, which may be used as part of the Linux startup process.initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted. What would you need an initrd for ?The first file your computer is loading is the kernel which is responsible of almost everything regarding hardware. The kernel is his name means, the core of the system. Unfortunatly, it can not guess things alone. You might use a RAID, LVM, NFS systems or an encrypted partition. For all thoses reason, and perhaps more other, you need an initrd image to complete that task.How does it work on NuTyXAn initrd has a naming schema that follows the name and the version of the kernel that is associate with. For example, if you are running on the latest kernel version as today. The name of the kernel is: kernel-stable . If we look in the directory where all the kernels reside, we find indeed a kernel with such a name file to it:ls -al /boot/kernel* -rw-r--r-- 1 root root 9.7M 7 oct 15:09 /boot/kernel-stable In this example, the name of the initrd file would be: initrd-stable Build an initrdIf you decide to use an initrd image at boot time, you need to build the initrd yourself ONES. To build this file, the only restriction is that you have the root credentials rights. Either you use sudo command either you activate the root account and switch to root:To know which kernel you are running on, use this command: uname -r 5.10.155-NuTyX-510I'm running on the kernel 5.10 LTS version and going to build an initrd for it. The command mkinitramfs needs one argument which is exactly the result of the uname -r above. sudo mkinitramfs $(uname -r) [sudo] Mot de passe de thierry : Creating ... done. If we look in the directory where all the kernels reside, we find indeed a new file named: initrd-5.10.155-NuTyX-510 l /boot -tr ..... ... .. -rw-r--r-- 1 root root 80M 10 oct 19:47 initrd-5.10.155-NuTyX-510 drwxr-xr-x 4 root root 4.0K 10 oct 19:47 . As a convention, the name of the initrd is ALWAYS made of initrd and last part of the initrd filename separated by a dash, in our example: initrd-510 We can now make the link with following command: sudo ln -svf initrd-5.10.155-NuTyX-510 /boot/initrd-510 [sudo] Mot de passe de thierry : '/boot/initrd-510' -> 'initrd-5.10.155-NuTyX-510' That's it, we are done and ready to check if the upgrade process works. Check the upgrade processChecking the upgrade consist just of reinstalling the kernel-510 package: sudo cards install kernel-510 [sudo] Mot de passe de thierry : kernel-510 5.10.155-1 62.70 MB (111.97 MB/s) 100 % - 0 s Obtenir les infos sur les 704 paquets: 100 % SUPPRIME: (cli-extra) kernel-510 5.10.155-1, 5138 fichiers: 100 % AJOUTE: (cli-extra) kernel-510 5.10.155-1, 5146 fichiers: 100 % post-installation: démarrée This is a bios installation Creating ... done. post-installation: finie post-installation: démarrée /sbin/ldconfig -r / post-installation: finie We can see by the result above that an new initrd have been created. Still with following command, everything should be clear: l /boot -tr ..... ... lrwxrwxrwx 1 root root 23 10 oct 20:13 kernel-510 lrwxrwxrwx 1 root root 23 10 oct 20:13 initrd-510 drwxr-xr-x 35 root root 4.0K 10 oct 20:13 .. drwxr-xr-x 4 root root 4.0K 10 oct 20:13 . Adjusting your GRUBAdjusting the grub is explain here. Only adjust the name of initrd with your.Good luck !!! |