Bii o ṣe le Pa Awọn kerneli ti a ko Lo Ni atijọ ni Debian ati Ubuntu
Ninu nkan wa ti o kẹhin, a ti ṣalaye bi a ṣe le paarẹ awọn kernels atijọ ti a ko lo ni CentOS/RHEL/Fedora. Ninu àpilẹkọ yii, a yoo ṣalaye bi o ṣe le paarẹ awọn kernels atijọ ti a ko lo ni awọn ọna Debian ati Ubuntu, ṣugbọn ṣaaju gbigbe siwaju, o le fẹ lati fi ẹya tuntun sori ẹrọ lati lo anfani ti: awọn atunṣe aabo, awọn iṣẹ ekuro tuntun, awọn awakọ imudojuiwọn ati bẹbẹ pelu pelu.
Lati ṣe igbesoke ekuro rẹ si ẹya tuntun ni Ubuntu ati Debian, tẹle itọsọna yii:
- Bii o ṣe le ṣe igbesoke ekuro si Ẹya Tuntun ni Ubuntu
Pataki: O ni imọran lati tọju o kere ju awọn ekuro atijọ tabi meji lati ṣubu pada si ọran ti iṣoro wa pẹlu imudojuiwọn kan.
Lati wa ẹya ti isiyi ti ekuro Linux ti n ṣiṣẹ lori ẹrọ rẹ, lo aṣẹ atẹle.
$ uname -sr Linux 4.12.0-041200-generic
Lati ṣe atokọ gbogbo awọn ekuro ti a fi sii lori ẹrọ rẹ, gbekalẹ aṣẹ yii.
$ dpkg -l | grep linux-image | awk '{print$2}' linux-image-4.12.0-041200-generic linux-image-4.8.0-22-generic linux-image-extra-4.8.0-22-generic linux-image-generic
Yọ awọn Kernels ti a Ko Lo Ni atijọ lori Debian ati Ubuntu
Ṣiṣe awọn aṣẹ ni isalẹ lati yọ aworan linux kan pato pẹlu awọn faili iṣeto rẹ, lẹhinna ṣe imudojuiwọn iṣeto grub2, ati atunbere eto nikẹhin.
$ sudo apt remove --purge linux-image-4.4.0-21-generic $ sudo update-grub2 $ sudo reboot
[sudo] password for tecmint: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: linux-generic linux-headers-4.8.0-59 linux-headers-4.8.0-59-generic linux-headers-generic linux-image-4.8.0-59-generic linux-image-extra-4.8.0-59-generic linux-image-generic Suggested packages: fdutils linux-doc-4.8.0 | linux-source-4.8.0 linux-tools Recommended packages: thermald The following packages will be REMOVED: linux-image-4.8.0-22-generic* linux-image-extra-4.8.0-22-generic* The following NEW packages will be installed: linux-headers-4.8.0-59 linux-headers-4.8.0-59-generic linux-image-4.8.0-59-generic linux-image-extra-4.8.0-59-generic The following packages will be upgraded: linux-generic linux-headers-generic linux-image-generic 3 upgraded, 4 newly installed, 2 to remove and 182 not upgraded. Need to get 72.0 MB of archives. After this operation, 81.7 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-headers-4.8.0-59 all 4.8.0-59.64 [10.2 MB] Get:2 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-headers-4.8.0-59-generic amd64 4.8.0-59.64 [811 kB] Get:3 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-generic amd64 4.8.0.59.72 [1,782 B] Get:4 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-headers-generic amd64 4.8.0.59.72 [2,320 B] Get:5 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-image-4.8.0-59-generic amd64 4.8.0-59.64 [23.6 MB] Get:6 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-image-extra-4.8.0-59-generic amd64 4.8.0-59.64 [37.4 MB] Get:7 http://us.archive.ubuntu.com/ubuntu yakkety-updates/main amd64 linux-image-generic amd64 4.8.0.59.72 [2,348 B] Fetched 72.0 MB in 7min 12s (167 kB/s) Selecting previously unselected package linux-headers-4.8.0-59. (Reading database ... 104895 files and directories currently installed.) Preparing to unpack .../0-linux-headers-4.8.0-59_4.8.0-59.64_all.deb ... Unpacking linux-headers-4.8.0-59 (4.8.0-59.64) ... Selecting previously unselected package linux-headers-4.8.0-59-generic. Preparing to unpack .../1-linux-headers-4.8.0-59-generic_4.8.0-59.64_amd64.deb ... Unpacking linux-headers-4.8.0-59-generic (4.8.0-59.64) ... Preparing to unpack .../2-linux-generic_4.8.0.59.72_amd64.deb ... Unpacking linux-generic (4.8.0.59.72) over (4.8.0.22.31) ... Preparing to unpack .../3-linux-headers-generic_4.8.0.59.72_amd64.deb ... Unpacking linux-headers-generic (4.8.0.59.72) over (4.8.0.22.31) ... Selecting previously unselected package linux-image-4.8.0-59-generic. Preparing to unpack .../4-linux-image-4.8.0-59-generic_4.8.0-59.64_amd64.deb ... Done. Removing linux-image-4.8.0-22-generic (4.8.0-22.24) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic update-initramfs: Deleting /boot/initrd.img-4.8.0-22-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.8.0-22-generic /boot/vmlinuz-4.8.0-22-generic Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.12.0-041200-generic Found initrd image: /boot/initrd.img-4.12.0-041200-generic Found linux image: /boot/vmlinuz-4.8.0-59-generic done ...
Botilẹjẹpe ọna yii n ṣiṣẹ ni itanran, o jẹ igbẹkẹle diẹ sii ati ṣiṣe daradara lati lo iwe afọwọkọ ti o ni ọwọ ti a pe ni “byobu” eyiti o ṣopọ gbogbo awọn ofin loke si eto kan pẹlu awọn aṣayan to wulo gẹgẹbi nọmba asọye awọn ekuro lati tọju lori eto naa.
Ṣafikun package iwe afọwọkọ byobu eyiti o pese eto ti a pe ni awọn kernels atijọ-atijọ ti a lo fun yiyọ awọn ekuro atijọ ati awọn idii akọsori lati inu eto naa.
$ sudo apt install byobu
Lẹhinna yọ awọn ekuro atijọ bii bẹ (aṣẹ ti o wa ni isalẹ gba awọn ekuro 2 laaye lati tọju lori eto naa).
$ sudo purge-old-kernels --keep 2
O tun le fẹ lati ka awọn nkan wọnyi ti o ni ibatan ti o wa lori ekuro Linux.
- Bii o ṣe le Fifuye ati Ṣiṣẹ Awọn modulu Ekuro ni Linux
- Bii a ṣe le Yi Awọn Iwọn asiko Kernel pada ni Ọna Itọju ati Ainidẹra
Ninu nkan yii, a ti ṣe apejuwe bi a ṣe le yọ awọn aworan ekuro atijọ ti ko lo lori awọn ọna Ubuntu ati Debian. O le pin eyikeyi awọn ero nipasẹ awọn esi lati isalẹ.