如何删除不存在的initrd.img
Tofloor
poster avatar
打击越
deepin
2016-11-11 19:09
Author
我以前自己编译安装过kernel 4.6.2的版本,后来不稳定就删除了,可能没有删除干净?现在更新系统经常会出现下面这条,不知道如何解决

  1. 正在处理用于 initramfs-tools (0.125) 的触发器 ...
  2. /boot/initrd.img-4.6.2 does not exist. Cannot update.
Copy the Code



Reply Favorite View the author
All Replies
avatar
Island
deepin
2016-11-11 19:22
#1
/boot/目录下有你安装编译的内核    删除后/boot/grub/grub.cfg 里面也要对应修改。
Reply View the author
avatar
打击越
deepin
2016-11-11 19:28
#2
https://bbs.deepin.org/post/132014
/boot/目录下有你安装编译的内核    删除后/boot/grub/grub.cfg 里面也要对应修改。 ...

boot下面的对应的文件都删除了,grub.cfg里面的内容不是自动更新的吗?我进去看了,没有4.6.2相关的内容
Reply View the author
avatar
Island
deepin
2016-11-11 19:30
#3
你把完整的更新警告信息贴出来   sudo update-grub
Reply View the author
avatar
打击越
deepin
2016-11-11 19:37
#4
https://bbs.deepin.org/post/132014
你把完整的更新警告信息贴出来   sudo update-grub
  1. root@rhett-pc:/boot/grub# update-grub
  2. Generating grub configuration file ...
  3. Found theme: /boot/grub/themes/deepin/theme.txt
  4. Found background image: /boot/grub/themes/deepin/background.png
  5. Found linux image: /boot/vmlinuz-4.4.0-3-deepin-amd64
  6. Found initrd image: /boot/initrd.img-4.4.0-3-deepin-amd64
  7. Found linux image: /boot/vmlinuz-4.4.0-2-deepin-amd64
  8. Found initrd image: /boot/initrd.img-4.4.0-2-deepin-amd64
  9. Found linux image: /boot/vmlinuz-4.2.0-1-amd64
  10. Found initrd image: /boot/initrd.img-4.2.0-1-amd64
  11. Adding boot menu entry for EFI firmware configuration
  12. done
Copy the Code
  1. root@rhett-pc:/boot/grub# ls -lh ../
  2. 总用量 125M
  3. -rw-r--r-- 1 root root 166K 12月  6  2015 config-4.2.0-1-amd64
  4. -rw-r--r-- 1 root root 170K 7月   1 11:07 config-4.4.0-2-deepin-amd64
  5. -rw-r--r-- 1 root root 170K 11月  1 11:24 config-4.4.0-3-deepin-amd64
  6. drwxr-xr-x 4 root root  512 1月   1  1970 efi
  7. drwxr-xr-x 6 root root 1.0K 11月 11 11:35 grub
  8. -rw-r--r-- 1 root root  33M 1月   8  2016 initrd.img-4.2.0-1-amd64
  9. -rw-r--r-- 1 root root  37M 10月 22 10:53 initrd.img-4.4.0-2-deepin-amd64
  10. -rw-r--r-- 1 root root  37M 11月 11 11:00 initrd.img-4.4.0-3-deepin-amd64
  11. drwx------ 2 root root  12K 12月 25  2015 lost+found
  12. -rw-r--r-- 1 root root 2.8M 12月  6  2015 System.map-4.2.0-1-amd64
  13. -rw-r--r-- 1 root root 2.9M 7月   1 11:07 System.map-4.4.0-2-deepin-amd64
  14. -rw-r--r-- 1 root root 2.9M 11月  1 11:24 System.map-4.4.0-3-deepin-amd64
  15. -rw-r--r-- 1 root root 3.4M 12月  6  2015 vmlinuz-4.2.0-1-amd64
  16. -rw-r--r-- 1 root root 3.5M 7月   1 11:06 vmlinuz-4.4.0-2-deepin-amd64
  17. -rw-r--r-- 1 root root 3.6M 11月  1 11:24 vmlinuz-4.4.0-3-deepin-amd64
Copy the Code



Reply View the author
avatar
Island
deepin
2016-11-11 21:28
#5
没看出什么问题  你是怎么编译  怎么安装的? 上传下feedback-cli
Reply View the author
avatar
打击越
deepin
2016-11-11 22:09
#6
本帖最后由 imever 于 2016-11-11 14:14 编辑
https://bbs.deepin.org/post/132014
没看出什么问题  你是怎么编译  怎么安装的? 上传下feedback-cli
安装
make oldconfig
make  menuconfig
打包成DEB包
sudo make-kpkg --initrd --append-to-version=imever- kernel_image kernel-headers -j8
sudo dpkg -i *.deb  
sudo update-grub

卸载内核
sudo apt-get --purge  remove linux-image-4.2.0-1-imever-amd64   
sudo apt-get --purge  remove linux-headers-4.2.0-1-imever-amd64


deepin-feedback-cli-Deepin-15.3-all-20161111-134447.tar.gz
Reply View the author
avatar
Island
deepin
2016-11-11 22:55
#7
package checker
    ii  linux-base                                                  4.4                                                    all          Linux image base package     ii  linux-headers-4.2.0-1-common                                4.2.6-3                                                amd64        Common header files for Linux 4.2.0-1
    ii  linux-headers-4.4.0-2-deepin-amd64                          4.4.6-4                                                amd64        Header files for Linux 4.4.0-2-deepin-amd64
    ii  linux-headers-4.4.0-2-deepin-common                         4.4.6-4                                                amd64        Common header files for Linux 4.4.0-2-deepin
    ii  linux-headers-4.4.0-3-deepin-amd64                          4.4.30-1                                               amd64        Header files for Linux 4.4.0-3-deepin-amd64
    ii  linux-headers-4.4.0-3-deepin-common                         4.4.30-1                                               amd64        Common header files for Linux 4.4.0-3-deepin     ii  linux-image-4.4.0-2-deepin-amd64                            4.4.6-4                                                amd64        Linux 4.4 for 64-bit PCs
    ii  linux-image-4.4.0-3-deepin-amd64                            4.4.30-1                                               amd64        Linux 4.4 for 64-bit PCs
    ii  linux-image-deepin-amd64                                    4.4.30-1               

看下是否有没删除完的包。
Reply View the author
avatar
打击越
deepin
2016-11-12 00:05
#8
https://bbs.deepin.org/post/132014
package checker
    ii  linux-base                                                  4.4              ...

没有看到4.6.2相关的包

  1. rhett@rhett-pc:~$ sudo apt-get remove linux-image-
  2. linux-image-4.2.0-1-amd64         linux-image-4.4.0-3-deepin-amd64  
  3. linux-image-4.4.0-2-deepin-amd64  linux-image-deepin-amd64         
  4. rhett@rhett-pc:~$ sudo apt-get remove linux-headers-
  5. linux-headers-4.2.0-1-amd64          linux-headers-4.4.0-2-deepin-common  linux-headers-amd64
  6. linux-headers-4.2.0-1-common         linux-headers-4.4.0-3-deepin-amd64   linux-headers-deepin-amd64
  7. linux-headers-4.4.0-2-deepin-amd64   linux-headers-4.4.0-3-deepin-common  
  8. rhett@rhett-pc:~$ sudo apt-get remove linux-compiler-gcc-
  9. linux-compiler-gcc-4.9-x86       linux-compiler-gcc-5-x86-deepin  
  10. rhett@rhett-pc:~$ sudo apt-get remove linux-base
Copy the Code
Reply View the author