Bug 383126 - System Restarts During `apt upgrade` Without Asking
Summary: System Restarts During `apt upgrade` Without Asking
Status: RESOLVED NOT A BUG
Alias: None
Product: neon
Classification: KDE Neon
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-04 15:12 UTC by Ilya Ig. Petrov
Modified: 2018-11-08 14:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Ig. Petrov 2017-08-04 15:12:46 UTC
I think hard restart happens during grub updates. Once my system became unbootable, and I had to chroot and reinstall grub by following [1] during which dpkg said it was interrupted and I continued it.

[1]: https://superuser.com/a/376471/88322

Notebook is Samsung R730 from 2010, doesn't have UEFI, but EFI (which is problem with some Linux distros).
```
$ uname -a
Linux R730-LINUX 4.10.0-30-generic #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
Comment 1 Ilya Ig. Petrov 2017-08-04 15:46:30 UTC
After fixing unbootable KDE Neon this restart happens again and again:
```
$ sudo apt install kaccounts-provider 
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
$ sudo dpkg --configure -a
Setting up linux-image-extra-4.10.0-30-generic (4.10.0-30.34~16.04.1) ... 
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic 
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic 
Error! Could not locate dkms.conf file. 
File:  does not exist.                                                                                                                                                                                                           
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic                                                                                                                    
update-initramfs: Generating /boot/initrd.img-4.10.0-30-generic                                                                                                                                                                  
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic                                                                                                                           
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic                                                                                                                    
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-30-generic /boot/vmlinuz-4.10.0-30-generic 
Generating grub configuration file ... 
Found theme: /boot/grub/themes/breeze/theme.txt 
Found linux image: /boot/vmlinuz-4.10.0-30-generic 
Found initrd image: /boot/initrd.img-4.10.0-30-generic 
Found linux image: /boot/vmlinuz-4.10.0-27-generic 
Found initrd image: /boot/initrd.img-4.10.0-27-generic 
Found linux image: /boot/vmlinuz-4.8.0-58-generic 
Found initrd image: /boot/initrd.img-4.8.0-58-generic 
Found linux image: /boot/vmlinuz-4.8.0-56-generic 
Found initrd image: /boot/initrd.img-4.8.0-56-generic
Found Windows Boot Manager on /dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi 
done 
Setting up libimage-magick-perl (8:6.8.9.9-7ubuntu5.9) ... 
Setting up shim-signed (1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1) ... 
Installing for x86_64-efi platform.
<RESTART ABOUT HERE>
```
After reboot it asks to continue interrupted session again.
Comment 2 Ilya Ig. Petrov 2017-08-04 15:57:22 UTC
I restored dpkg again and it finished successfully without restarts. So in total the upgrade required 3 restarts from chroot or from the OS itself.
Comment 3 Andrew Crouthamel 2018-11-07 14:51:51 UTC
I've never experienced this during any updates. Has this occurred since the last report?
Comment 4 Ilya Ig. Petrov 2018-11-08 14:35:35 UTC
The bug is due to buggy efi implementation in old laptops, setting efi_no_storage_paranoia kernel parameter on you installer live image helps sometimes if you are lucky. Before messing with the linux installer purge all the boot records with efibootmgr, may be helpful.
Comment 5 Ilya Ig. Petrov 2018-11-08 14:37:39 UTC
Sorry, the comment is about the installer. But you should apply
Comment 6 Ilya Ig. Petrov 2018-11-08 14:39:56 UTC
Sorry, the comment is about the installer but you should apply efi_no_storage_paranoia kernel parameter to the installed image too and preferably replace grub with something like refind for better experience. Or just use old legacy BIOS (not EUFI).