mateosss / matter

Customizable GRUB theme inspired by Material Design
Boost Software License 1.0
873 stars 51 forks source link

Problems that can arise if user moves matter folder, or deletes it #67

Closed heyzec closed 3 years ago

heyzec commented 3 years ago

If a user accidentally moves the matter folder or deletes it, it can lead to this error when uninstalling old kernels. It may not be easy to realise that it is caused by matter folder.

sudo apt remove 'linux-*5.6.0-*' -f

The following packages will be REMOVED:
  linux-headers-5.6.0-1056-oem linux-image-5.6.0-1056-oem linux-modules-5.6.0-1048-oem linux-modules-5.6.0-1056-oem
  linux-oem-5.6-headers-5.6.0-1048 linux-oem-5.6-headers-5.6.0-1056
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 722 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 387302 files and directories currently installed.)
Removing linux-image-5.6.0-1056-oem (5.6.0-1056.60) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.6.0-1056-oem
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Sourcing file `/etc/default/grub.d/oem-flavour.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/Matter/theme.txt
Found linux image: /boot/vmlinuz-5.10.0-1029-oem
Found initrd image: /boot/initrd.img-5.10.0-1029-oem
Found linux image: /boot/vmlinuz-5.8.0-55-generic
Found initrd image: /boot/initrd.img-5.8.0-55-generic
Found linux image: /boot/vmlinuz-5.8.0-53-generic
Found initrd image: /boot/initrd.img-5.8.0-53-generic
Found linux image: /boot/vmlinuz-5.8.0-50-generic
Found initrd image: /boot/initrd.img-5.8.0-50-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Found linux image: /boot/vmlinuz-5.10.0-1029-oem
Found initrd image: /boot/initrd.img-5.10.0-1029-oem
Found linux image: /boot/vmlinuz-5.8.0-55-generic
Found initrd image: /boot/initrd.img-5.8.0-55-generic
Found linux image: /boot/vmlinuz-5.8.0-53-generic
Found initrd image: /boot/initrd.img-5.8.0-53-generic
Found linux image: /boot/vmlinuz-5.8.0-50-generic
Found initrd image: /boot/initrd.img-5.8.0-50-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
[I] [Matter] Setting entry icons
[I] Found /usr/sbin/grub-mkconfig hook
done
/usr/sbin/grub-mkconfig: 326: /home/heyzec/Desktop/matter/matter/matter.py: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.6.0-1056-oem (--remove):
 installed linux-image-5.6.0-1056-oem package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.6.0-1056-oem
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
mateosss commented 3 years ago

Thanks for catching this! I think it should be fixed now.

mateosss commented 3 years ago

I opened a new issue (#68) for discussing ways of improving the installation process. I will close this one as this particular problem with apt remove should be patched for now. Feel free to re-open it if you see fit.