XenialDog (Ubuntu 16.04 'Xenial Xerus' LTS, 32-bit)

A home for all kinds of Puppy related projects
Message
Author
keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#871 Post by keniv »

Hi Fred,
Thanks again for the help. I've now made a menu entry that starts pulseaudio, pauses for 10 secs, then starts gqrx.

Code: Select all

[Desktop Entry]
Name=Gqrx Start
Type=Application
Exec=/root/My-Applications/bin/gqrx
Icon=/usr/share/icons/hicolor/scalable/apps/gqrx.svg
Terminal=false
Categories=AudioVideo;Audio;Video;Player;TV;
Keywords=SDR;Radio;HAM;
I had to make a little script, called it gqrx, made it executable and put it in /root/My-Applications/bin. You might recognise a puppy user showing through here.

Code: Select all

#!/bin/bash
pulseaudio --start
read -t 10 -p
gqrx
I don't know if this is the best way to do it but it works. I might experiment a bit with the 10secs as it's probably to long.

Regards,

Ken.

User avatar
Max Headroom
Posts: 421
Joined: Wed 28 Jun 2006, 07:17
Location: GodZone Kiwi
Contact:

#872 Post by Max Headroom »

G'day Fred, Happy 2018, ( Perhaps Even More if yoU'Re a Hacker Who could eXploit Meltdown or Spectre ! ) ! So could yoU Please Advize How Meltdown-Proof & Spectre-Proof this XenialDog ( Ubuntu 16.04 'Xenial Xerus' LTS, 32-bit) is? Looks like it's Running 4.4.0.78 Ke*nel According 2 Conky & I've Checked in Synaptic Package Manager 4 Any Ke*nel Updates, Nuthing....

No Worries then?!?

:)K
PC is Not Political Correctness :P , it's a Personal Computer! Boycott the Evil M$ & Google!

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#873 Post by fredx181 »

Max Headroom wrote:G'day Fred, Happy 2018, ( Perhaps Even More if yoU'Re a Hacker Who could eXploit Meltdown or Spectre ! ) ! So could yoU Please Advize How Meltdown-Proof & Spectre-Proof this XenialDog ( Ubuntu 16.04 'Xenial Xerus' LTS, 32-bit) is? Looks like it's Running 4.4.0.78 Ke*nel According 2 Conky & I've Checked in Synaptic Package Manager 4 Any Ke*nel Updates, Nuthing....

No Worries then?!?

:)K
Hi Max, happy 2018 too !!, all I can say is that there's a patch for Meltdown in latest 4.4.0 kernel release, they say.
So on a frugal install only (not when boot from cd or with isobooter) you can run from Menu > System > Upgrade-Kernel and it will update to version 4.4.0-109, so then after reboot with save it would be:

Code: Select all

root@xenial:~# uname -a
Linux xenial 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:07 UTC 2018 i686 i686 i686 GNU/Linux
For the rest I cannot advice because my knowledge is too little about these matters.

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#874 Post by backi »

Hi

Now using Kernel 4.4.0-59-generic .
Tried to upgrade kernel with installed Upgrade-Programm .
No success :

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-112-generic
linux-image-extra-4.4.0-112-generic
linux-image-generic
W: Can't drop privileges for downloading as file '/var/cache/apt/archives/partial/linux-image-4.4.0-112-generic_4.4.0-112.135_i386.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nothing has been installed or something unexpected occurred
Will restore back to previous state now..
Press any key to close . . .

Any Ideas ?

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#875 Post by keniv »

Hello Fred,
I also got an error message when trying to update the kernel using the method you suggested above. However, it disappears off of the screen too quickly to copy it as a screen capture.

Regards,

Ken.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#876 Post by fredx181 »

Hi backi, keniv,

Strange..., can't reproduce the error. I just upgraded kernel with upgrade-kernel from 4.4.0-59 to 4.4.0-112 without problems.
backi wrote:W: Can't drop privileges for downloading as file '/var/cache/apt/archives/partial/linux-image-4.4.0-112-generic_4.4.0-112.135_i386.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Looks like a gereral dpkg (permission?) problem, are you able to install other packages with apt-get ?
@ken, can you try again and run from terminal instead from menu:

Code: Select all

upgrade-kernel
And paste the error part here ?

And can you both check the output of:

Code: Select all

ls -l /var/cache/apt/archives/ | grep partial
it should be owned by "_apt", e.g. :
drwx------ 2 _apt root 4096 jan 20 16:14 partial

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#877 Post by backi »

Hi Fred !
This is the complete Terminal Output when doing "upgrade-Kernel".
root@xenial:~# upgrade-kernel
What this script does is:
- Upgrade the kernel (linux-image-generic) that's in use (if there is an update available)
- Upgrade the initrd and vmlinuz files inside /mnt/sdb1//XENIALDOG1/casper
(and create backup of the older ones to *.bak)
Note: this only works when frugally installed, not from read-only media e.g CD
Also, this script assumes that the initrd and vmlinuz files are
located in the same folder as the main filesystem.squashfs, e.g. in 'casper'
Press ENTER to continue

Remove pinned entries for package linux-image-*
OK
Update the package lists . . .
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Hit:3 http://nl.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://nl.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://nl.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:6 https://debiandog.github.io/xenialdog/Packages ./ InRelease
Fetched 102 kB in 1s (60.9 kB/s)
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 171 not upgraded.
3 not fully installed or removed.
Need to get 0 B/42.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 49126 files and directories currently installed.)
Preparing to unpack .../casper_1%3a1.373_i386.deb ...
Unpacking casper (1:1.373) over (1:1.373) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-112-generic
vmlinuz(/boot/vmlinuz-4.4.0-112-generic
) points to /boot/vmlinuz-4.4.0-112-generic
(/boot/vmlinuz-4.4.0-112-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-112-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-112-generic:
linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-112-generic; however:
Package linux-image-extra-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Setting up casper (1:1.373) ...
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
/boot/initrd.img-4.4.0-59-generic does not exist. Cannot update.
Errors were encountered while processing:
linux-image-4.4.0-112-generic
linux-image-extra-4.4.0-112-generic
linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists...
Building dependency tree...
Reading state information...
linux-image-generic is already the newest version (4.4.0.112.118).
0 upgraded, 0 newly installed, 0 to remove and 171 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-112-generic
vmlinuz(/boot/vmlinuz-4.4.0-112-generic
) points to /boot/vmlinuz-4.4.0-112-generic
(/boot/vmlinuz-4.4.0-112-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-112-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-112-generic:
linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-112-generic; however:
Package linux-image-extra-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-112-generic
linux-image-extra-4.4.0-112-generic
linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nothing has been installed or something unexpected occurred
Will restore back to previous state now..
Press any key to close . . .

This when doing " ls -l /var/cache/apt/archives/ | grep partial"

root@xenial:~# ls -l /var/cache/apt/archives/ | grep partial
drwx------ 2 _apt root 40 Jan 24 13:38 partial

If it does mean anything casper Folder is located in a Folder named XENIALDOG located on a Usb-Stick

Regards !

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#878 Post by fredx181 »

Thanks backi,
Hmm.. complicated, I can give some things to try, but not sure if works as expected (but probably can't do any harm).
Something went wrong earlier, I guess, btw, the dpkg message in your previous post was different (mentioned about permission, which is correct now, looking at your ls -l output)

So, please try:

Code: Select all

rm -f /var/cache/apt/archives/partial/*  # remove what's left in partial (just in case there is)
apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic  # completely remove v4.4.0-112
upgrade-kernel
If the purge command above gives errors, don't run upgrade-kernel yet, you may try first "dpkg --configure -a":

Code: Select all

dpkg --configure -a
apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic
upgrade-kernel
Hope this helps.

EDIT: If you open Synaptic first before doing any of the above, does it give a message about broken packages ?
If it does, you can close Synaptic and try first:

Code: Select all

apt-get -f install
And then do the above commands (purging both linux-image-* packages is important, I think)

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#879 Post by backi »

Hi Fred !

EDIT:
Step by Step :
1.Step :
root@xenial:~# rm -f /var/cache/apt/archives/partial/*
root@xenial:~# apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-4.4.0-112-generic* linux-image-extra-4.4.0-112-generic*
linux-image-generic*
0 upgraded, 0 newly installed, 3 to remove and 171 not upgraded.
3 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 49125 files and directories currently installed.)
Removing linux-image-generic (4.4.0.112.118) ...
Removing linux-image-extra-4.4.0-112-generic (4.4.0-112.135) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-112-generic (--purge):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-112-generic
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz
you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
Purging configuration files for linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
Errors were encountered while processing:
linux-image-extra-4.4.0-112-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@xenial:~#


2.Step:
root@xenial:~# dpkg --configure -a

3.Step:

root@xenial:~# apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'linux-image-4.4.0-112-generic' is not installed, so not removed
The following packages will be REMOVED:
linux-image-extra-4.4.0-112-generic
0 upgraded, 0 newly installed, 1 to remove and 171 not upgraded.
1 not fully installed or removed.
After this operation, 113 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 43386 files and directories currently installed.)
Removing linux-image-extra-4.4.0-112-generic (4.4.0-112.135) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-112-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
WARNING: missing /lib/modules/4.4.0-112-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-112-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-112-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-112-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@xenial:~#


Step4:
ile or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-112-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-112-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@xenial:~# upgrade kernel
bash: upgrade: command not found
root@xenial:~# upgrade-kernel
What this script does is:
- Upgrade the kernel (linux-image-generic) that's in use (if there is an update available)
- Upgrade the initrd and vmlinuz files inside /mnt/sdb1//XENIALDOG1/casper
(and create backup of the older ones to *.bak)
Note: this only works when frugally installed, not from read-only media e.g CD
Also, this script assumes that the initrd and vmlinuz files are
located in the same folder as the main filesystem.squashfs, e.g. in 'casper'
Press ENTER to continue

Remove pinned entries for package linux-image-*
OK
Update the package lists . . .
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://nl.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://nl.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:5 http://nl.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Hit:6 https://debiandog.github.io/xenialdog/Packages ./ InRelease
Get:7 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [658 kB]
Get:8 http://nl.archive.ubuntu.com/ubuntu xenial-updates/restricted i386 Packages [7,524 B]
Get:9 http://nl.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [536 kB]
Get:10 http://nl.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [15.3 kB]
Fetched 1,523 kB in 2s (522 kB/s)
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
linux-image-extra-4.4.0-112-generic
0 upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 171 not upgraded.
1 not fully installed or removed.
Need to get 0 B/42.1 kB of archives.
After this operation, 113 MB disk space will be freed.
(Reading database ... 43386 files and directories currently installed.)
Removing linux-image-extra-4.4.0-112-generic (4.4.0-112.135) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-112-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
WARNING: missing /lib/modules/4.4.0-112-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-112-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-112-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-112-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
linux-image-4.4.0-112-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
linux-headers-4.4.0-112-generic
Recommended packages:
grub-pc | grub-efi-ia32 | grub | lilo thermald
The following NEW packages will be installed:
linux-image-4.4.0-112-generic linux-image-generic
0 upgraded, 2 newly installed, 0 to remove and 171 not upgraded.
1 not fully installed or removed.
Need to get 0 B/56.3 MB of archives.
After this operation, 48.8 MB of additional disk space will be used.
Selecting previously unselected package linux-image-4.4.0-112-generic.
(Reading database ... 43387 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-112-generic_4.4.0-112.135_i386.deb ...
Done.
Unpacking linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Selecting previously unselected package linux-image-generic.
Preparing to unpack .../linux-image-generic_4.4.0.112.118_i386.deb ...
Unpacking linux-image-generic (4.4.0.112.118) ...
Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-112-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):
package linux-image-extra-4.4.0-112-generic is not ready for configuration
cannot configure (current status 'half-installed')
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-112-generic; however:
Package linux-image-extra-4.4.0-112-generic is not installed.

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-112-generic
linux-image-extra-4.4.0-112-generic
linux-image-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nothing has been installed or something unexpected occurred
Will restore back to previous state now..
Press any key to close . . .

root@xenial:~#
No luck so far :roll:
Last edited by backi on Wed 24 Jan 2018, 14:36, edited 3 times in total.

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#880 Post by keniv »

Hi Fred,
Here is the output I get from

Code: Select all

upgrade-kernel

Code: Select all

root@xenial:~# upgrade-kernel
What this script does is:
- Upgrade the kernel (linux-image-generic) that's in use (if there is an update available)
- Upgrade the initrd and vmlinuz files inside /mnt/sdb1//17xendog/casper
(and create backup of the older ones to *.bak)
Note: this only works when frugally installed, not from read-only media e.g CD
Also, this script assumes that the initrd and vmlinuz files are
located in the same folder as the main filesystem.squashfs, e.g. in 'casper'
Press ENTER to continue 

Sorry, it seems that /mnt/sdb1//17xendog/casper is on read-only media, booting from CD maybe?
Cannot write here, exiting...
root@xenial:~# 
Here is the output from

Code: Select all

ls -l /var/cache/apt/archives/ | grep partial

Code: Select all

root@xenial:~# ls -l /var/cache/apt/archives/ | grep partial
drwx------ 2 _apt root     4096 Jan  6 15:41 partial
root@xenial:~# 
In terms of "Sorry, it seems that /mnt/sdb1//17xendog/casper is on read-only media, booting from CD maybe?" I'm booting from sdb1 which is an idehd. I don't understand why it sees this as read only.
The output from

Code: Select all

ls -l /var/cache/apt/archives/ | grep partial
looks similar to yours so I assume thats OK.

Regards,

Ken.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#881 Post by backi »

Did another :


root@xenial:~# dpkg --configure -a
Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-112-generic
vmlinuz(/boot/vmlinuz-4.4.0-112-generic
) points to /boot/vmlinuz-4.4.0-112-generic
(/boot/vmlinuz-4.4.0-112-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-112-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-4.4.0-112-generic; however:
Package linux-image-4.4.0-112-generic is not configured yet.
linux-image-generic depends on linux-image-extra-4.4.0-112-generic; however:
Package linux-image-extra-4.4.0-112-generic is not installed.

dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-4.4.0-112-generic
linux-image-generic
root@xenial:~#

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#882 Post by fredx181 »

Hi backi, it seems to get stuck at this point:

Code: Select all

mktemp: failed to create directory via template ‘/var/tmp/mkinitramfs_XXXXXX’: No such file or directory
So something is wrong there.
Can you look if you have /var/tmp directory ?
If not, create it:

Code: Select all

mkdir /var/tmp
EDIT: Correct permissions should be 777 for /var/tmp, so should be (thanks rcrsn51):

Code: Select all

mkdir -m 1777 /var/tmp
And try running upgrade-kernel again.

@Ken, thanks, that's a very different problem, I'll look into it and get back later.
EDIT: So you can create new file or folder in /mnt/sdb1//17xendog/casper ? (is writable?)
Output from:

Code: Select all

ls -l  /mnt/sdb1//17xendog/
Should be for casper folder:

Code: Select all

drwxr-xr-x ... ... ....
Fred
Last edited by fredx181 on Wed 24 Jan 2018, 16:11, edited 2 times in total.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#883 Post by backi »

Hi Fred !
You`re the Man . :D :D :D
Thanks a lot
Did help ........

Another silly Question ,,,,,do i have to save the Session afterwards .?

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#884 Post by fredx181 »

backi wrote:Hi Fred !
You`re the Man . :D :D :D
Thanks a lot
Did help ........

Another silly Question ,,,,,do i have to save the Session afterwards .?
Hey, backi, great !! :D
Kind of a mystery that you didn't have /var/tmp, it should be there by default.
Yes, you must save the session and after reboot you can uninstall the older kernel if you want.

Fred

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#885 Post by rcrsn51 »

You should check that /var/tmp has 777 permissions. Some printer drivers use it and CUPS can be fussy about permissions.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#886 Post by backi »

Hi Fred !

Me once again .....
Yes, you must save the session and after reboot you can uninstall the older kernel if you want.

How to? Removing the old one ?Is this correct ?:

apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-59-generic

Can it be done also with Bleachbit ?

Thanks rcrsn51 for the Advice !

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#887 Post by fredx181 »

rcrsn51 wrote:You should check that /var/tmp has 777 permissions. Some printer drivers use it and CUPS can be fussy about permissions.
Ah, thanks, correct me if I'm wrong, so permissions should be this:

Code: Select all

root@live:~# ls -l /var | grep tmp
drwxrwxrwt  2 root root    60 jan 24 16:44 tmp
Removing:

Code: Select all

rm -fr /var/tmp
Then recreate with the 777 permissions

Code: Select all

mkdir -m 1777 /var/tmp
And:

Code: Select all

root@live:~# ls -l /var | grep tmp
drwxrwxrwt  2 root root    60 jan 24 16:46 tmp
@backi edited my post above adding the correct mkdir command (-m 1777)
How to? Removing the old one ?Is this correct ?:

apt-get purge linux-image-4.4.0-112-generic linux-image-extra-4.4.0-59-generic
No, both should be 4.4.0-59 to be removed, so (after reboot check conky or "uname -a" if the new kernel 4.4.0-112 is in use)

Code: Select all

apt-get purge linux-image-4.4.0-59-generic linux-image-extra-4.4.0-59-generic
EDIT: Not sure, but I don't think bleachbit can do it.

Fred

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#888 Post by keniv »

Hi Fred,
I tried your code

Code: Select all

ls -l  /mnt/sdb1//17xendog/
Then I thought there was an extra back-slash(/) so I tried this

Code: Select all

ls -l  /mnt/sdb1/17xendog/
When that did not work I used the path to casper I get if I click through to it from sdb1 ie

Code: Select all

ls -1 /mnt/live/mnt/sdb1/17xendog/casper
The output from them all is shown below

Code: Select all

root@xenial:~# ls -l  /mnt/sdb1//17xendog/
ls: cannot access '/mnt/sdb1//17xendog/': No such file or directory
root@xenial:~# ls -l  /mnt/sdb1/17xendog/
ls: cannot access '/mnt/sdb1/17xendog/': No such file or directory
root@xenial:~# ls -1 /mnt/live/mnt/sdb1/17xendog/casper
01-filesystem.squashfs
base
changes.dat
initrd1.xz
modules
optional
rootcopy
vmlinuz
xenial-i486.sgn
root@xenial:~# 
Can I use the last path to upgrade the kernel?

Regards,

Ken.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#889 Post by fredx181 »

Hi Ken.
ls -1 /mnt/live/mnt/sdb1/17xendog/casper
That explains it, it happens in some cases that the mountpoint of the frugal install folder changes to that.
Thanks for the info, this is a bug, I'll work on new version of upgrade-kernel to make it work somehow with /mnt/live/mnt/....., will get back later about it.

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#890 Post by backi »

Hi Fred !
Hope i do not become to annoying .

But there is some strange Effect .The mystery of the non existing /var/temp Folder in my Xenial Dog System......becomes even more mysterious .

mkdir -m 1777 /var/tmp during Session did create such a Folder.
But ......saving Session .....after Reboot .....looked into /var.....but no such Folder
/var/tmp to find . Did several Trials .
Despite creating /var/tmp and saving Session it did not survive after Reboot .
What about this ?????

Post Reply