Creating swapfile: swapon failure

Reboot is far far from my mind at the moment: I fear to even type it here :slightly_smiling_face:

DPKG.LOG
Those are hefty log files - dpkg is over 80 Mb, but fortunately much content oft repeated - (ah, so is this why the parrot name?) But it took longer to open them than it did to make the upgrade !
I am still working my way through this log file to select just the errors.
The most oft repeated lines are:

[—] EE Modeset(0): Failed to get GBM bo for flip to new front.
[—] EE Modeset(0): present flip failed

I will sort these out and make available - forgive my ignorance, but what is pastebin and how do I use it?

TERM.LOG was quicker to process, and I have extracted the error lines below:

Preparing to unpack …/util-linux_2.34-0.1_amd64.deb …
Unpacking util-linux (2.34-0.1) over (2.32.1-0.1) …
Setting up util-linux (2.34-0.1) …
insserv: FATAL: service mountdevsubfs has to be enabled to use service hwclock
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.

Setting up systemd (243-8) …
Installing new version of config file /etc/systemd/journald.conf …
Installing new version of config file /etc/systemd/resolved.conf …
Installing new version of config file /etc/systemd/system.conf …
Installing new version of config file /etc/systemd/user.conf …
Failed to reload daemon: Access denied
Failed to try-restart systemd-networkd.service: Access denied
See system logs and ‘systemctl status systemd-networkd.service’ for details.
Failed to try-restart systemd-resolved.service: Access denied
See system logs and ‘systemctl status systemd-resolved.service’ for details.
Failed to try-restart systemd-timesyncd.service: Access denied
See system logs and ‘systemctl status systemd-timesyncd.service’ for details.
Failed to try-restart systemd-journald.service: Access denied
See system logs and ‘systemctl status systemd-journald.service’ for details.

Unpacking procps (2:3.3.15-2+b1) over (2:3.3.15-2) …
Failed to reload daemon: Access denied
Preparing to unpack …/13-bc_1.07.1-2+b2_amd64.deb …
Unpacking bc (1.07.1-2+b2) over (1.07.1-2+b1) …
Preparing to unpack …/14-cups-daemon_2.3.0-6_amd64.deb …
Unpacking cups-daemon (2.3.0-6) over (2.2.8-5) …
Failed to reload daemon: Access denied

Unpacking cups-server-common (2.3.0-6) over (2.2.8-5) …
^[[1mdpkg:^[[0m libcupsmime1:amd64: dependency problems, but removing anyway as you requested:
cups depends on libcupsmime1 (>= 1.4.0).

Preparing to unpack …/libcupsimage2_2.3.0-6_amd64.deb …
Unpacking libcupsimage2:amd64 (2.3.0-6) over (2.2.8-5) …
^[[1mdpkg:^[[0m libcupscgi1:amd64: dependency problems, but removing anyway as you requested:

Preparing to unpack …/cups-ppdc_2.3.0-6_amd64.deb …
Unpacking cups-ppdc (2.3.0-6) over (2.2.8-5) …
^[[1mdpkg:^[[0m libcupsppdc1:amd64: dependency problems, but removing anyway as you requested:
cups depends on libcupsppdc1 (>= 1.4.0); however:
Package libcupsppdc1:amd64 is to be removed.

Preparing to unpack …/apt_1.8.4+parrot1_amd64.deb …
Unpacking apt (1.8.4+parrot1) over (1.8.0~alpha2) …
Failed to reload daemon: Access denied
Setting up apt (1.8.4+parrot1) …
Installing new version of config file /etc/apt/apt.conf.d/01autoremove …
Failed to reload daemon: Access denied
Failed to get unit file state for apt-daily-upgrade.timer: Access denied
Failed to retrievLog started: 2019-11-28 02:59:12
(Reading database … ^M(Reading database … 5%^M(Reading database … 10%^M(Reading database … 15%^M(Reading database … 20%^M(Read$
Removing mariadb-server-10.1 (1:10.1.37-1) …
Failed to stop mariadb.service: Access denied
See system logs and ‘systemctl status mariadb.service’ for details.
dpkg: error processing package mariadb-server-10.1 (–remove):
installed mariadb-server-10.1 package pre-removal script subprocess returned error exit status 4
dpkg: too many errors, stopping
insserv: warning: current start runlevel(s) (empty) of script mysql' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script mysql’ overrides LSB defaults (0 1 6).
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to get unit file state for mariadb.service: Access denied
Failed to retrieve unit state: Access denied
mariadb.service is a disabled or a static unit, not starting it.
Errors were encountered while processing:
mariadb-server-10.1
Processing was halted because there were too many errors.
Log ended: 2019-11-28 02:59:13e unit state: Access denied
apt-daily-upgrade.timer is a disabled or a static unit not running, not starting it.
Failed to get unit file state for apt-daily.timer: Access denied
Failed to retrieve unit state: Access denied
apt-daily.timer is a disabled or a static unit not running, not starting it.
(Reading database … ^M(Reading database … 5%^M(Reading database … 10%^M(Reading database … 15%^M(Reading database … 20%^M(Readi$
Preparing to unpack …/apt-utils_1.8.4+parrot1_amd64.deb …

Removing mariadb-server-10.1 (1:10.1.37-1) …
Failed to stop mariadb.service: Access denied
See system logs and ‘systemctl status mariadb.service’ for details.
^[[1mdpkg:^[[0m error processing package mariadb-server-10.1 (–remove):
installed mariadb-server-10.1 package pre-removal script subprocess returned error exit status 4
insserv: warning: current start runlevel(s) (empty) of script mysql' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script mysql’ overrides LSB defaults (0 1 6).
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to get unit file state for mariadb.service: Access denied
Failed to retrieve unit state: Access denied
mariadb.service is a disabled or a static unit, not starting it.
^[[1mdpkg:^[[0m mariadb-client-10.1: dependency problems, but removing anyway as you requested:
mariadb-server-10.1 depends on mariadb-client-10.1 (>= 1:10.1.37-1); however:

Package mariadb-client-10.1 is to be removed.
Removing mariadb-client-10.1 (1:10.1.37-1) …
Removing mariadb-client-core-10.1 (1:10.1.37-1) …
Errors were encountered while processing:
mariadb-server-10.1
Log ended: 2019-11-28 02:13:58

Just discovered that the log viewer was not doing what I thought it should be doing, viewing logs. I have been waiting hours for it to finish opening dpkg.log and finally my lack of patience got the better of me and I opened it in Midnight Commander.

It is full of half-configured and half-installed libraries, etc. Many many many of these type of entries, sample below.

I have not shut down as I suspect it will not start again once it tries to boot on so many errors. A shut down will put me back at square 1, and a hassle with installing and then what - never upgrade ?

So any help is greatly appreciated :slight_smile:

SAMPLE from dpkg.log of the many lines of entry like these

Edit: condensed by RTP (non essential)
2018-11-23 15:58:44 remove python-pyproj:amd64 1.9.5.1-4
2018-11-23 15:58:44 status half-configured python-pyproj:amd64 1.9.5.1-4
2018-11-23 15:58:44 status half-installed python-pyproj:amd64 1.9.5.1-4
2018-11-23 15:58:44 status config-files python-pyproj:amd64 1.9.5.1-4
2018-11-23 15:58:45 status not-installed python-pyproj:amd64
2018-11-23 15:58:45 status installed python-pyspatialite:amd64 3.0.1-13
2018-11-23 15:58:45 remove python-pyspatialite:amd64 3.0.1-13

yea that was why I mentioned pastebin :laughing:

please add these mirrors and remove any others. There was likely a mirror conflict.

deb https://deb.parrotlinux.org/parrot/ rolling main contrib non-free
#deb-src https://deb.parrotlinux.org/parrot/ rolling main contrib non-free
deb https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free
#deb-src https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free

then run:
parrot-upgrade

(never update with another command this is just a reminder so we can hopefully get this install running. parrot-upgrade command contains commands that hopefully (in most cases) can help prevent some breaks)

Any kernel errors?

Again, forgive my Born Again Newbie-ism, but add the mirrors - Where?

Any guidance on how to use Pastebin most gratefully received, for I suspect I may have issues in the future so it woul dbe good to know.

Will check Kernal errors now

sudo nano /etc/apt/sources.list.d/parrot.list

I have eyeballed my way through kern.log and found many errors that fall into these types

A lot of these types

Nov 27 00:21:44 parrot kernel: [ 0.346612] system 00:00: Plug and Play ACPI device, IDs PNP0103 PNP0c01 (active)
Nov 27 00:21:44 parrot kernel: [ 0.346688] system 00:01: [io 0xffff] has been reserve
Nov 27 00:21:44 parrot kernel: [ 0.347787] system 00:03: [mem 0xe0000000-0xefffffff] could not be reserved

And loads of these
Nov 27 00:21:44 parrot kernel: [ 0.354420] pci 0000:00:1c.2: PCI bridge to [bus 03]
Nov 27 00:21:44 parrot kernel: [ 0.354426] pci 0000:00:1c.2: bridge window [mem 0xc1000000-0xc12fffff]
Nov 27 00:21:44 parrot kernel: [ 0.354443] pci 0000:06:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
Nov 27 00:21:44 parrot kernel: [ 0.354445] pci 0000:06:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
Nov 27 00:21:44 parrot kernel: [ 0.354448] pci 0000:06:05.0: BAR 14: no space for [mem size 0x00200000]
Nov 27 00:21:44 parrot kernel: [ 0.354450] pci 0000:06:05.0: BAR 14: failed to assign [mem size 0x00200000]

Quite a collection of these as well
Nov 27 01:31:04 parrot kernel: [ 909.564320] ERROR @wl_cfg80211_get_station :
Nov 27 01:31:04 parrot kernel: [ 909.564323] Wrong Mac address, mac = 50:0f:f5:e3:9e:c8 profile =50:0f:f5:e3:97:21
Nov 27 01:31:04 parrot kernel: [ 909.564477] ERROR @wl_cfg80211_get_station

I should have been more specific. I meant kernel upgrade errors. please report any of those after upgrading using the new sources file.

Also run
uname -a

so we can see if kernel upgraded.

┌─[phil@parrot]─[~]
└──╼ $uname -a
Linux parrot 4.18.0-parrot10-amd64 #1 SMP Debian 4.18.10-2parrot10 (2018-11-17) x86_64 GNU/Linux

Re kernal upgrade - OK, now I understand
Thanks so much for all this help, I am learning and enjoying

All your suggestions now implimented, in particular parrot.list
I will try to upgrade

Well the attempt to upgrade was rather brief!

Opening lines were:
┌─[root@parrot]─[/home/phil]
└──╼ #parrot-upgrade
Get:1 https://deb.parrotlinux.org/parrot rolling InRelease [14.4 kB]
Get:2 https://deb.parrotlinux.org/parrot rolling-security InRelease [8,749 B]
Get:3 (new user restriction) rolling/main amd64 Packages [16.9 MB]
Get:4 (new user restriction) rolling/contrib amd64 Packages [129 kB]
Get:5 (new user restriction) rolling/non-free amd64 Packages [207 kB]
Get:6 (new user restriction) rolling-security/main amd64 Packages [260 kB]
Get:7 (new user restriction) rolling-security/non-free amd64 Packages [618 B]
Fetched 17.5 MB in 1min 29s (196 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
1603 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
Setting up x11-common (1:7.7+20) …
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to retrieve unit state: Access denied
Failed to restart x11-common.service: Access denied
See system logs and ‘systemctl status x11-common.service’ for details.
invoke-rc.d: initscript x11-common, action “restart” failed.
Failed to get properties: Access denied
dpkg: error processing package x11-common (–configure):
installed x11-common package post-installation script subprocess returned error exit status 1
Setting up pcscd (1.8.25-2) …
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to retrieve unit state: Access denied
Failed to restart pcscd.service: Access denied
See system logs and ‘systemctl status pcscd.service’ for details.
invoke-rc.d: initscript pcscd, action “restart” failed.
Failed to get properties: Access denied
dpkg: error processing package pcscd (–configure):
installed pcscd package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of default-mysql-server:
default-mysql-server depends on mariadb-server-10.3; however:
Package mariadb-server-10.3 is not installed.

dpkg: error processing package default-mysql-server (–configure):
dependency problems - leaving unconfigured
Setting up dbus (1.12.16-2) …
A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.

Note the request for the dreaded reboot !

Loads more errors, many dpkg errors, then finishing up with …

See system logs and ‘systemctl status mariadb.service’ for details.
dpkg: error processing package mariadb-server-10.1 (–remove):
installed mariadb-server-10.1 package pre-removal script subprocess returned error exit status 4
dpkg: too many errors, stopping
insserv: warning: current start runlevel(s) (empty) of script mysql' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script mysql’ overrides LSB defaults (0 1 6).
insserv: Script ntp has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: Script ssh has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to get unit file state for mariadb.service: Access denied
Failed to retrieve unit state: Access denied
mariadb.service is a disabled or a static unit, not starting it.
Errors were encountered while processing:
mariadb-server-10.1
Processing was halted because there were too many errors.
Configuring sandbox profiles…
Sandbox profiles updated!
E: Sub-process /usr/bin/dpkg returned an error code (1)

Suggestions most welcome please
Is this time to re-install 4.4 from USB, then make changes to parrot.list and then try upgrade?

Before jumping to reinstall from scratch, you can at least try booting regularly to see how it goes.

If it doesn’t boot/function on regular boot, you can attempt to boot into rescue mode. To get into Rescue mode on boot, on Grub screen, go down to
Advanced Boot Options.

Then select

Kernel-version-here (rescue mode).

Then look through the logs in /var/log to see what parts of Parrot failed to start.

Then you can try to repair/install these packages to repair system.

Or, if it is a crazy list of failed & broken essential apps, it might be worth the reinstall. But try the regular boot, then rescue mode first. You never know til you try. It may boot. Either way, an opportunity to experiment/learn something :grin:

Very sensible, I will give it a try.
Hopefull will be back to report on my adventures soon

1 Like

I’m up and running again after a forced hard shutdown (it just would not shutdown, even with forced shutdown command in a root window) then reboot which went straight to normal mode no problem, the followed by another parrot-install.
So far, so good, at least it boots with the updated kernel. I have taken a look at the logs nothing now stands out as being particularly nasty. Maybe all is now well.
Thanks for everything - I look forward to being able to help on this forum as well as be helped - just needs patience and effort

1 Like

Sorry for delay in reply - my newbie status on these forums limited number of replies per day, and then I forgot I had not posted the reply !

Got a little off topic but really glad you got it working without too much trouble :grin:

To bring the topic back to original subject title, I made a new encrypted swapfile the other day. Here is what I did for anyone who came here for that/interested:

First, preallocate space to the file. 8G represents 8gigs. Traditionally most use same as their ram:
fallocate -l 8G /cryptswap

then add this line below your encrypted partition line in /etc/crypttab:

cryptswap /cryptswap /dev/urandom swap

in /etc/fstab add this line:
/dev/mapper/cryptswap none swap sw 0 0

run:
mkswap /cryptswap

run:
service cryptdisks reload

run:
swapon -a

My swap file was active after rebooting.

Wanted to bring everything back to the title topic.

Now that you are running, Welcome to Parrot! :grin:

Thanks for bringing this back on topic
I ran the commands but did not get same outcome
See below

└──╼ #fallocate -l 8G /cryptswap
┌─[root@parrot]─[/home/phil]
└──╼ #mkswap /cryptswap
mkswap: /cryptswap: insecure permissions 0644, 0600 suggested.
Setting up swapspace version 1, size = 8 GiB (8589930496 bytes)
no label, UUID=d58cd47c-027a-465f-afce-b0bd9cf2fb29
┌─[root@parrot]─[/home/phil]
└──╼ #service cryptdisks reload
┌─[root@parrot]─[/home/phil]
└──╼ #swapon -a
swapon: cannot open /dev/mapper/cryptswap: No such file or directory
┌─[✗]─[root@parrot]─[/home/phil]
└──╼ #

I didn’t see if you had edited fstab & crypttab & just want to be sure you do edit them ahead of time.

Make sure to have added this line to /etc/crypttab:
cryptswap /cryptswap /dev/urandom swap

Make sure to add this line to /etc/fstab so it can keep swap for boot:
/dev/mapper/cryptswap none swap sw 0 0

rememeber to reboot

if you still have trouble finding /dev/mapper/cryptswap, try this to restart cryptdisks:
swapoff -a

/etc/init.d/cryptdisks start

swapon -a

swapon -s

then to check if /dev/mapper/cryptswap exists:

ls -al /dev/mapper

Let me know how it goes. Rebooting part is important :slightly_smiling_face:

This is now working
I followed the same procedure after undoing my previous changes. I had the same errors for cryptswap permissions and also for swapon -a not finding anything in /dev/mapper
I then followed your instructions to restart cryptdisks (not forgetting the reboot step at the appropriate juncture) and now all is well, another problem solved - thanks, brilliant.

I am now heading over to write up my Tor-launcher experience, not so positive unfortunately

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.