Quantcast

Upgrade problem after system failure, help please...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Upgrade problem after system failure, help please...

Jay Ridgley
Good afternoon,

System information Ubuntu 16.04 LTS

I lost my hard drive (somehow it got erased COMPLETELY). I replaced it
with an older drive and did a restore from my backup.

I was successful in getting my home directories recovered. The system
reported that updates were needed, not surprising. ONWARD!

When I attempted to do the following:

sudo apt-get check && sudo apt-get update && sudo apt-get dist-upgrade

I get an error message:

...

  286 upgraded, 34 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.

...

Fetched 31.6 MB in 15s (2,021 kB/s)

Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: script hwclock.sh: service hwclock already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
  util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I recover???

Cheers,
Jay

--
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Peter Silva
try:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f

It might fix it self after a couple of tries.


On Wed, Jan 25, 2017 at 5:19 PM, Jay Ridgley <[hidden email]> wrote:
Good afternoon,

System information Ubuntu 16.04 LTS

I lost my hard drive (somehow it got erased COMPLETELY). I replaced it with an older drive and did a restore from my backup.

I was successful in getting my home directories recovered. The system reported that updates were needed, not surprising. ONWARD!

When I attempted to do the following:

sudo apt-get check && sudo apt-get update && sudo apt-get dist-upgrade

I get an error message:

...

 286 upgraded, 34 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.

...

Fetched 31.6 MB in 15s (2,021 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: script hwclock.sh: service hwclock already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I recover???

Cheers,
Jay

--
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Ralf Mardorf-2
Hi,

On Wed, 25 Jan 2017 23:30:17 -0500, Peter Silva wrote:
>On Wed, 25 Jan 2017 16:19:40 -0600, Jay Ridgley wrote:
>I replaced it with an older drive and did a restore from my backup.
>
>I was successful in getting my home directories recovered. The system
>reported that updates were needed, not surprising.

You only restored /home, not the complete install?

>>1 not fully installed or removed.
>try:
>
>sudo apt-get update
>sudo apt-get upgrade
>sudo apt-get install -f
>
>It might fix it self after a couple of tries.

First trying to fix the issue might be more promising.

sudo apt update
sudo apt install -f
sudo dpkg --configure -a
sudo apt full-upgrade

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Jay Ridgley
On 01/25/2017 11:36 PM, Ralf Mardorf wrote:

> Hi,
>
> On Wed, 25 Jan 2017 23:30:17 -0500, Peter Silva wrote:
>> On Wed, 25 Jan 2017 16:19:40 -0600, Jay Ridgley wrote:
>> I replaced it with an older drive and did a restore from my backup.
>>
>> I was successful in getting my home directories recovered. The system
>> reported that updates were needed, not surprising.
>
> You only restored /home, not the complete install?
>
>>> 1 not fully installed or removed.
>> try:
>>
>> sudo apt-get update
>> sudo apt-get upgrade
>> sudo apt-get install -f
>>
>> It might fix it self after a couple of tries.
>
> First trying to fix the issue might be more promising.
>
> sudo apt update
> sudo apt install -f
> sudo dpkg --configure -a
> sudo apt full-upgrade
>
> Regards,
> Ralf
>
>
THANKS for the response Ralf...

sudo apt-get update reports:


286 packages can be upgraded. Run 'apt list --upgradable' to see them.

running sudo apt list --upgradable list the 286 packages

sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 286 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: script hwclock.sh: service hwclock already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
  subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
  util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo dpkg --configure -a
Setting up util-linux (2.27.1-6ubuntu3.2) ...
insserv: script hwclock.sh: service hwclock already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
  subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent processing triggers for systemd:
  systemd depends on util-linux (>= 2.27.1); however:
   Package util-linux is not configured yet.

dpkg: error processing package systemd (--configure):
  dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
  util-linux
  systemd

sudo apt full-upgrade

lists the 286 packages  and ends with an error much like that reported
above...

How do I identify the package that is reported as not fully installed or
removed? Can it be reinstalled or removed?

Regards,
Jay


--
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Ralf Mardorf-2
On Thu, 26 Jan 2017 02:35:11 -0600, Jay Ridgley wrote:
>sudo dpkg --configure -a
>Setting up util-linux (2.27.1-6ubuntu3.2) ...
>insserv: script hwclock.sh: service hwclock already provided!
>insserv: exiting now!
>update-rc.d: error: insserv rejected the script header
>dpkg: error processing package util-linux (--configure):
>  subprocess installed post-installation script returned error exit
> status 1

Strange, as a workaround the Internet e.g. provides
BAD_INSSERV_HACKER=true dpkg-reconfigure insserv
but I wouldn't use this workaround.

Actually I'm running the same LTS as you and I don't experience the
issue you experience.

Google for all the above output, using one phrase of it, after the
other.



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please... **update**

Jay Ridgley
On 01/26/2017 06:53 AM, Ralf Mardorf wrote:

> On Thu, 26 Jan 2017 02:35:11 -0600, Jay Ridgley wrote:
>> sudo dpkg --configure -a
>> Setting up util-linux (2.27.1-6ubuntu3.2) ...
>> insserv: script hwclock.sh: service hwclock already provided!
>> insserv: exiting now!
>> update-rc.d: error: insserv rejected the script header
>> dpkg: error processing package util-linux (--configure):
>>  subprocess installed post-installation script returned error exit
>> status 1
>
> Strange, as a workaround the Internet e.g. provides
> BAD_INSSERV_HACKER=true dpkg-reconfigure insserv
> but I wouldn't use this workaround.
>
> Actually I'm running the same LTS as you and I don't experience the
> issue you experience.
>
> Google for all the above output, using one phrase of it, after the
> other.
>
>
>
Ralf

I got around the problem...

removed /etc/init.d/hwclock.sh
replaced it with a copy from another system
sudo apt-get install util-linux
sudo apt update
sudo apt upgrade

That worked!

A final sudo apt upgrade reported:

All packages are up to date.

Later I will reboot the system, if all is still well I will declare the
problem solved.

Thanks,
Jay
--
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Liam Proven
In reply to this post by Jay Ridgley
On 26 January 2017 at 00:19, Jay Ridgley <[hidden email]> wrote:
> sudo apt-get check && sudo apt-get update && sudo apt-get dist-upgrade


Wrong in multiple ways.

[1] Don't chain them unless you know what you're doing. No offence but
you don't appear to know. So don't.

[2]

> sudo apt-get check

Not needed.

> && sudo apt-get update

Obsolete. Use:

sudo apt update

> && sudo apt-get dist-upgrade

Obsolete. Use:

sudo apt full-upgrade

Optionally add ``-y'' on the end if you want to automate it, as you seem to.



--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Ralf Mardorf-2
On Fri, 27 Jan 2017 13:45:28 +0200, Liam Proven wrote:
>On 26 January 2017 at 00:19, Jay Ridgley <[hidden email]>
>> sudo apt-get dist-upgrade  
>
>Obsolete. Use:
>
>sudo apt full-upgrade

FWIW by default there's one difference, that might be important for
those, who expect that downloaded packages are cached. Packages are
stored in the cache when running

  sudo apt -o APT::Keep-Downloaded-Packages=1 full-upgrade

In some situations the colour might be an issue, if required getting
rid of it could be done by adding

  -o APT::Color=0

The -o option just temporarily changes the default options. A
permanent customization of those and other options is possible, too.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

compdoc
In reply to this post by Liam Proven

On 01/27/2017 04:45 AM, Liam Proven wrote:

&& sudo apt-get dist-upgrade
Obsolete. Use:

sudo apt full-upgrade

Its nice that apt is now used instead on apt-get, but apt-get does not seem to be completely obsolete. I still use 'sudo apt-get autoremove' to delete old kernels that stack up like Donald's tweets over time, along with the occasional stray program.

Is there an apt equivalent?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Colin Law
On 27 January 2017 at 14:46, compdoc <[hidden email]> wrote:

> On 01/27/2017 04:45 AM, Liam Proven wrote:
>
> && sudo apt-get dist-upgrade
>
> Obsolete. Use:
>
> sudo apt full-upgrade
>
>
> Its nice that apt is now used instead on apt-get, but apt-get does not seem
> to be completely obsolete. I still use 'sudo apt-get autoremove' to delete
> old kernels that stack up like Donald's tweets over time, along with the
> occasional stray program.
>
> Is there an apt equivalent?

apt autoremove is available on Ubuntu 16.10

I believe functions have been added over a period so maybe versions of
apt on earlier versions of ubuntu do not support all commands.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Ralf Mardorf-2
On Sat, 28 Jan 2017 08:58:57 +0000, Colin Law wrote:
>I believe functions have been added over a period so maybe versions of
>apt on earlier versions of ubuntu do not support all commands.

The apt man page and the apt WARNING are a PITA. I guess that at least
Ubuntu releases >= 15.10 provide a version of apt that doesn't miss
options. However, regarding the WARNING apt-get and dpkg could not be
completely replaced. It might be safer to still use apt-get for scripts.

[root@moonstudio ~]# apt show dash | grep V      

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

Version: 0.5.8-2.1ubuntu2
[root@moonstudio ~]# apt show dash 2>/dev/null | grep V
Version: 0.5.8-2.1ubuntu2
[root@moonstudio ~]#


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

compdoc
In reply to this post by Colin Law
On 01/28/2017 01:58 AM, Colin Law wrote:

> apt autoremove is available on Ubuntu 16.10

Its confusing. I have several systems running 16.04 in different
locations. I update them when I login, but some dont get updated very
often. On a few I've tried when there are old kernels present, apt
autoremove threw errors. But on one, when there were no kernels yet
there was a stray package to be removed, it worked.

So, dont know if its because there are different versions of apt
involved, or if apt doesn't handle removing old kernels.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please... **SOLVED**

Jay Ridgley
In reply to this post by Jay Ridgley
On 01/26/2017 09:52 AM, Jay Ridgley wrote:

> I got around the problem...
>
> removed /etc/init.d/hwclock.sh
> replaced it with a copy from another system
> sudo apt-get install util-linux
> sudo apt update
> sudo apt upgrade
>
> That worked!
>
> A final sudo apt upgrade reported:
>
> All packages are up to date.
>
> Later I will reboot the system, if all is still well I will declare the
> problem solved.
>
> Thanks,
> Jay

All,

The problems I was having are fixed.

The root cause was a bad power cord between the ups and my computer.
This caused, among others some disk drive failures.

Replaced the power cord and reinstalled 16.04 LTS.

Thanks,
Jay
--
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Liam Proven
In reply to this post by compdoc
On 27 January 2017 at 15:46, compdoc <[hidden email]> wrote:
> Is there an apt equivalent?


Take a guess. Go on. Bet you your first try is correct.

--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

compdoc

On 01/31/2017 06:24 AM, Liam Proven wrote:

Is there an apt equivalent?
Take a guess. Go on. Bet you your first try is correct.

user@kvm:~$ sudo apt autoremove
E: Invalid operation autoremove

It's ok. There's no shame in not knowing...



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Colin Law
On 11 February 2017 at 19:35, compdoc <[hidden email]> wrote:

> On 01/31/2017 06:24 AM, Liam Proven wrote:
>
> Is there an apt equivalent?
>
> Take a guess. Go on. Bet you your first try is correct.
>
>
> user@kvm:~$ sudo apt autoremove
> E: Invalid operation autoremove
>
> It's ok. There's no shame in not knowing...

Your first guess *is* correct, it is just that the version you have
does not support it. Truth is a function of time.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Liam Proven
In reply to this post by compdoc
On 11 February 2017 at 20:35, compdoc <[hidden email]> wrote:
> user@kvm:~$ sudo apt autoremove
> E: Invalid operation autoremove
>
> It's ok. There's no shame in not knowing...


You're on an outdated or obsolete version of Ubuntu.


--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Colin Law
On 12 February 2017 at 13:46, Liam Proven <[hidden email]> wrote:
> On 11 February 2017 at 20:35, compdoc <[hidden email]> wrote:
>> user@kvm:~$ sudo apt autoremove
>> E: Invalid operation autoremove
>>
>> It's ok. There's no shame in not knowing...
>
>
> You're on an outdated or obsolete version of Ubuntu.

apt autoremove does not work for the version of apt on 14.04, which I
would not describe as outdated or obsolete.
$ apt-cache policy apt
apt:
  Installed: 1.0.1ubuntu2.17
  Candidate: 1.0.1ubuntu2.17
  Version table:
 *** 1.0.1ubuntu2.17 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty-updates/main
amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main
amd64 Packages
        100 /var/lib/dpkg/status
     1.0.1ubuntu2 0
        500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

$ sudo apt autoremove
E: Invalid operation autoremove


Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

Liam Proven
On 12 February 2017 at 15:31, Colin Law <[hidden email]> wrote:
>
> apt autoremove does not work for the version of apt on 14.04, which I
> would not describe as outdated or obsolete.


It is. The ``apt'' command was not yet fully implemented yet in 14.04.
That is 5 whole releases ago. I'd definitely call that outdated and
obsolete, even if it is still getting patches.




--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Upgrade problem after system failure, help please...

compdoc
In reply to this post by Colin Law
On 02/12/2017 07:31 AM, Colin Law wrote:

> apt autoremove does not work for the version of apt on 14.04, which I
> would not describe as outdated or obsolete.

yes. I ran sudo apt autoremove on all the machines in use, and found one
that caused the error I was originally asking about.

And it was 14.04, but doing its job perfectly so never needed to upgrade.

you'll be happy to know the release upgrade went well, and apt works as
expected.

That's why I made my little joke. :)

goodbye to apt-get...



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...