差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

下次修改
前次修改
tech:debian10 [2021/04/07 16:29] – 建立 jonathantech:debian10 [2024/01/01 22:15] (目前版本) – [移除已經不再使用的 Kernel 安裝檔] jonathan
行 12: 行 12:
         gateway 10.20.0.254         gateway 10.20.0.254
         dns-nameserver 8.8.8.8         dns-nameserver 8.8.8.8
-</file>修改之後 reboot 重新開機才會正常生效, 之前的 <cli>/etc/init.d/networking restart</cli>執行後 ens18 的 IP 設定會消失+</file>修改之後 reboot 重新開機才會正常生效, 之前的 <cli>/etc/init.d/networking restart</cli>執行後可以完成 ens18 的 IP 設定 
 + 
 +<note tip> 
 +  * Debian 11 執行 restart 發現沒有正確設定 IP 的狀況, 可透過 <cli>ifup ens18</cli>方式來解決 
 +</note>
  
 ===== 更改 hostname ===== ===== 更改 hostname =====
行 27: 行 31:
 </code> </code>
  
 +===== Kernel 更新但重開機仍舊版 =====
 +  * 直接執行 <cli>update-grub</cli>後再重新開機
 +  * ++看操作紀錄|<cli>
 +root@pve-49:~# update-grub
 +Generating grub configuration file ...
 +Found linux image: /boot/vmlinuz-5.4.114-1-pve
 +Found initrd image: /boot/initrd.img-5.4.114-1-pve
 +Found linux image: /boot/vmlinuz-5.4.73-1-pve
 +Found initrd image: /boot/initrd.img-5.4.73-1-pve
 +Found memtest86+ image: /boot/memtest86+.bin
 +Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
 +Adding boot menu entry for EFI firmware configuration
 +done
 +root@pve-49:~# reboot
 +</cli>++
 +
 +===== 移除已經不再使用的 Kernel 安裝檔 =====
 +  * 參考 - https://www.tutorialspoint.com/how-to-delete-old-unused-kernels-in-debian-and-ubuntu
 +  - 先確認目前已安裝哪些 Kernel 版本<cli>dpkg --list | grep linux-image</cli>
 +    * ++看操作紀錄|<cli>
 +# dpkg --list | grep linux-image
 +ii  linux-image-5.10.0-0.bpo.11-amd64   5.10.92-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.12-amd64   5.10.103-1~bpo10+1                  amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.15-amd64   5.10.120-1~bpo10+1                  amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.3-amd64    5.10.13-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.4-amd64    5.10.19-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.5-amd64    5.10.24-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.7-amd64    5.10.40-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.8-amd64    5.10.46-4~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.bpo.9-amd64    5.10.70-1~bpo10+1                   amd64        Linux 5.10 for 64-bit PCs (signed)
 +ii  linux-image-5.10.0-0.deb10.16-amd64 5.10.127-2~bpo10+1                  amd64        Linux 5.10 for 64-bit PCs (signed)
 +rc  linux-image-5.4.0-0.bpo.4-amd64     5.4.19-1~bpo10+1                    amd64        Linux 5.4 for 64-bit PCs (signed)
 +ii  linux-image-5.6.0-0.bpo.2-amd64     5.6.14-2~bpo10+1                    amd64        Linux 5.6 for 64-bit PCs (signed)
 +ii  linux-image-5.7.0-0.bpo.2-amd64     5.7.10-1~bpo10+1                    amd64        Linux 5.7 for 64-bit PCs (signed)
 +ii  linux-image-5.8.0-0.bpo.2-amd64     5.8.10-1~bpo10+1                    amd64        Linux 5.8 for 64-bit PCs (signed)
 +ii  linux-image-5.9.0-0.bpo.2-amd64     5.9.6-1~bpo10+1                     amd64        Linux 5.9 for 64-bit PCs (signed)
 +ii  linux-image-5.9.0-0.bpo.5-amd64     5.9.15-1~bpo10+1                    amd64        Linux 5.9 for 64-bit PCs (signed)
 +ii  linux-image-amd64                   5.10.127-2~bpo10+1                  amd64        Linux for 64-bit PCs (meta-package)
 +</cli>++
 +  - 確認目前使用哪個 Kernel <cli>uname -na</cli>
 +    * ++看操作紀錄|<cli>
 +# uname -na
 +Linux pve-omv5-246 5.10.0-0.deb10.16-amd64 #1 SMP Debian 5.10.127-2~bpo10+1 (2022-07-28) x86_64 GNU/Linux
 +</cli>++
 +  - 移除不需要的 Kernel
 +    * 自動清除 : 可使用 <cli>apt-get autoremove --purge</cli> 來自動清除, 如果無法自動清除就要依照以下方式進行手動清除
 +    * 手動清除 : 可使用 <cli> apt-get purge linux-image-[version-number]*</cli> 方式來清除, 依照以上的範例, 只要保留現在正在使用的 Kernel - Debian 5.10.127-2~bpo10+1, 可參考一下的作法<cli>
 +apt-get purge linux-image-5.4.*
 +apt-get purge linux-image-5.6.*
 +apt-get purge linux-image-5.7.*
 +apt-get purge linux-image-5.8.*
 +apt-get purge linux-image-5.9.*
 +apt-get purge linux-image-5.10.0-0.bpo.*
 +</cli>
 {{tag>debian}} {{tag>debian}}
  • tech/debian10.1617784173.txt.gz
  • 上一次變更: 2021/04/07 16:29
  • jonathan