LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-26-2018, 06:06 PM   #1
tuxthegreat
Member
 
Registered: Mar 2018
Distribution: Ubuntu Mate, OSX, Win10, ODROID-N2+
Posts: 176

Rep: Reputation: Disabled
A kernel update gone wrong due to power outage, please help


Distro Ubuntu 16.04.4 Mate
Kernel 4.13.9.38-generic
Problem update to 4.13.9.39-generic cut short due to power outage, I managed to revert back to 4.13.9.38-generic, here is the output from apt-get install -f
Quote:
root@#######:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.13.0-39-generic linux-image-extra-4.13.0-39-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 239 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 281278 files and directories currently installed.)
Removing linux-image-extra-4.13.0-39-generic (4.13.0-39.44~16.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-39-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-39-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_IxEvfW/lib/modules/4.13.0-39-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_IxEvfW/lib/modules/4.13.0-39-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: acpi=force: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-extra-4.13.0-39-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.13.0-39-generic (4.13.0-39.44~16.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
update-initramfs: Deleting /boot/initrd.img-4.13.0-39-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-39-generic /boot/vmlinuz-4.13.0-39-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: acpi=force: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-39-generic.postrm line 330.
dpkg: error processing package linux-image-4.13.0-39-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.13.0-39-generic
linux-image-4.13.0-39-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
I noticed in synaptic that the package linux-signed-image-4.13.0-39-generic stated : not configured.I am unable to update to .39 , I get Software Index is broken box which says to run sudo apt-get install -f, but as you can see I have done that to no avail. What can I do?
When I try to reinstall linux-image-4.13.0-39-generic:amd64 i get an error E:Internal Error, No File name for linux-image-4.13.0-39-generic, I am trying to install all the packages that were going to be upgraded.

Update I somehow managed to install all the .39 packages yet my uname -a states i am on 4.13.0-38-generic, what can I do to switch it to .39
Do I need to purge all those linux-image-4.13.0-39-generic packages and reinstall from fresh? Would that help any, but anytime I try to manage the image-4.13.0-39 i get that E:Internal Error.
These are the files that need to be upgraded / installed
Quote:
Linux-image-4.13.0-39-generic
linux-image-generic-hwe-16.04
linux-image-extra-4.13.0-39-generic
linux-signed-image-4.13.0-39-generic not configured
linux-signed-image-generic-hwe-16.04
linux-generic-hwe-16.04
linux-signed-generic-hwe-16.04

Last edited by tuxthegreat; 04-26-2018 at 06:51 PM.
 
Old 04-28-2018, 03:48 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,484

Rep: Reputation: Disabled
Maybe using dpkg -i on those .deb files will work(?).
 
Old 04-28-2018, 08:35 AM   #3
tuxthegreat
Member
 
Registered: Mar 2018
Distribution: Ubuntu Mate, OSX, Win10, ODROID-N2+
Posts: 176

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
Maybe using dpkg -i on those .deb files will work(?).
This is the part of syslog that was a clue
Quote:
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: acpi=force: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
I had a lot of help solving this issue with someone who is much more skilled with linux OS than me,I will post how I did it here in case anyone else finds themselves in this situation; a halfway installed kernel, thank god I was able to boot into it. First I checked my
Quote:
/etc/default/grub
-> "quiet splash" and I noticed that it was missing a little line inside
Quote:
GRUB_CMDLINE_LINUX_DEFAULT="acpi=force"
I recalled there used to be a second option in there "quiet splash", so instead of doing the nano way, I decided to purge grub-common and remove the 5 other dependencies ( I made sure to write each one of them down so I could reinstall later on.
And here is how this went down, I was on the machine, not via ssh, too many variables can go wrong doing such work with ssh
Code:
dpkg --get-selections | grep grub - this allowed me to see all the dependencies
   apt-get purge grub2-common - this removed my grub2
   apt-get install grub2-common - this reinstalled my grub2
   update-grub - always run this after any grub2 work
   apt-get install shim - dependency
   apt-get install grub-efi-amd64-bin - dependency
   apt-get install grub-efi-amd64- dependency
   apt-get install grub-efi-amd64-signed- dependency
   apt-get install grub2-themes-ubuntu-mate- dependency
   dpkg --configure -a
   update -grub -to finish off the process
I later checked my /etc/default/grub and as I have suspected that option was there
Code:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
GRUB_CMDLINE_LINUX=""
I was now able to reinstall the latest kernel and no more errors. By the way guys, what option can I input here /etc/default/grub during the bootup phase which would allow me to pick which kernel or kernel recovery I can choose, this would come in very handy, as it stands now, it all goes by so fast I can't even get into the grub options by holding down the shift button

Last edited by tuxthegreat; 04-28-2018 at 10:26 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] timelapse to video fail due to power outage rbees Linux - Newbie 4 01-24-2016 07:28 AM
[solved] Hardware issue (?) after power outage, "Kernel panic [...]" help_please Linux - Hardware 1 07-30-2011 02:20 AM
power outage blackmamba11 Linux - Server 1 12-03-2007 11:51 AM
power outage jbzy3000 Linux - General 2 02-24-2005 09:11 PM
Power Outage notslim General 30 08-28-2003 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration