You are not logged in.

#1 2015-10-06 03:16:50

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

[Solved - post install] Bunsen uses other distro's swap .

This behaviour is undesirable as it can trash the other distro's hibernated state (if it's hibernated).

Edit wrote:

A word to the wise for anyone installing alongside another distro and wishing to prevent problems caused by shared swap:

1. Make sure that your other distro is shut down not hibernated during the install of BL.

2. Post install when you first boot, follow HoAS's advice to get the BL install to leave distro #1's swap alone!

Head_on_a_Stick wrote:

Run this command to find the guilty party:

systemctl --type swap

Then use:

sudo systemctl mask name_of_unit

Replace "name_of_unit" with the full name listed in the output of the first command.

That should fix it!

Original post follows:

https://wiki.debian.org/Swap wrote:

<snip>
Things to consider when deciding how to setup swap space on your machine

1. ...<snip>... If you intend to use Hibernate you should ensure that your Debian installation has access to a swap partition or file that is NOT shared with another instance of GNU/Linux.

later on the same page wrote:

In order for the installer not to format a swap partition, it must manually be marked "Do not use" during partitioning. The installer will format any swap partition not marked "Do not use" and use it for swap space on the installed system.

Installed using manual partitioning and explicitly told the installer "Do not use" for the swapspace at /dev/sda3 as noted above. Allowed it to use (and format) /dev/sda5

Also not sure if this belongs here or in bug reports, if it's reproduceable it belongs in the latter for the reason stated above, as it's clearly acting otherwise than documented..

When booted, the system shows double the expected swapspace in conky and as confirmation:

beardy@bunsen-dc:~$ cat /proc/swaps
Filename				Type		Size	Used	Priority
/dev/sda5                               partition	2097148	0	-1
/dev/sda3                               partition	2097148	0	-2
beardy@bunsen-dc:~$ 

I have to manually issue

sudo swapoff /dev/sda3

to correct this.

There is NO entry for /dev/sda3 in /etc/fstab that would account for this

beardy@bunsen-dc:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID=0cb10fbc-96b5-4f6d-8773-00b062e484da /               ext4    user_xattr,errors=remount-ro 0       1
# /backup-target was on /dev/sda7 during installation
UUID=5a84ff54-2cf9-4fcb-97e6-20a06d547481 /backup-target  ext4    defaults        0       2
# /home was on /dev/sda6 during installation
UUID=fd3966b9-bda7-46ed-81b3-854204553d35 /home           ext4    user_xattr      0       2
# swap was on /dev/sda5 during installation
UUID=1fc4b11f-209d-443c-ad1f-21c3ab52d449 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
beardy@bunsen-dc:~$ 

As a sanity check, in case I'd won the chance lottery and gotten UNunique UUIDs

 
beardy@bunsen-dc:~$ blkid
/dev/sda2: LABEL="root" UUID="cd0ad123-91cc-4376-b069-cf79496dd1f8" TYPE="ext4" PARTUUID="db40f34e-a2cf-4aeb-a9e9-29f232295943"
/dev/sda3: UUID="d2657bda-f2f2-4a2b-b687-f4bb679fe472" TYPE="swap" PARTUUID="aee007bb-1cbb-43e9-9e22-64de61ae89ef"
/dev/sda4: UUID="0cb10fbc-96b5-4f6d-8773-00b062e484da" TYPE="ext4" PARTUUID="d6b67206-ce55-4312-b927-9cd95bf3428b"
/dev/sda5: UUID="1fc4b11f-209d-443c-ad1f-21c3ab52d449" TYPE="swap" PARTUUID="325fd7e3-763c-48a9-a999-4d3a574caa62"
/dev/sda6: LABEL="bl-home" UUID="fd3966b9-bda7-46ed-81b3-854204553d35" TYPE="ext4" PARTUUID="88b8313a-a2d3-4a3b-b5b3-736369ba239e"
/dev/sda7: LABEL="backups" UUID="5a84ff54-2cf9-4fcb-97e6-20a06d547481" TYPE="ext4" PARTUUID="72af14fc-b1d6-4473-9503-d1c587403e8b"
beardy@bunsen-dc:~$ 
 

Which seems in order (no duplicates) apart from the fact /dev/sda3 should NOT be mounted and in use, as it's nowhere in fstab.

What I've tried so far:
Disabling volume management in both Thunar and "Thunar as root" and rebooting. 
No change.

Adding a line to fstab specifying UUID mount point as none filesystem as none and options noauto then rebooting.
No change.

Labelling the swaps differently per the info here: https://wiki.debian.org/Part-UUID then rebooting.
Before:

beardy@bunsen-dc:~$ ls -lR /dev/disk/by-label
/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 10 Oct  6 02:19 backups -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct  6 02:19 bl-home -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct  6 02:28 root -> ../../sda2

beardy@bunsen-dc:~$ sudo swapoff /dev/sda5
beardy@bunsen-dc:~$ sudo mkswap -L swap /dev/sda5
mkswap: /dev/sda5: warning: wiping old swap signature.
Setting up swapspace version 1, size = 2097148 KiB
LABEL=swap, UUID=54d4814e-1152-47a1-ba49-23ec8751a9db
beardy@bunsen-dc:~$ sudo swapon /dev/sda5
beardy@bunsen-dc:~$ sudo swapoff /dev/sda3
beardy@bunsen-dc:~$ sudo mkswap -L hands-off /dev/sda3
mkswap: /dev/sda3: warning: wiping old swap signature.
Setting up swapspace version 1, size = 2097148 KiB
LABEL=hands-off, UUID=581dac8f-734b-495d-a116-4abd8044a6c9

After:

beardy@bunsen-dc:~$ ls -lR /dev/disk/by-label
/dev/disk/by-label:
total 0
lrwxrwxrwx 1 root root 10 Oct  6 02:19 backups -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct  6 02:19 bl-home -> ../../sda6
lrwxrwxrwx 1 root root 10 Oct  6 03:32 hands-off -> ../../sda3
lrwxrwxrwx 1 root root 10 Oct  6 02:28 root -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct  6 03:28 swap -> ../../sda5
beardy@bunsen-dc:~$ 

Updating fstab for the new UUID for /dev/sda5 & rebooting.
STILL no change.
I'm now at a loss what to try, any further guidance would be appreciated.

Last edited by Bearded_Blunder (2015-10-10 07:44:05)


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#2 2015-10-06 06:34:43

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [Solved - post install] Bunsen uses other distro's swap .

BunsenLabs uses systemd as init and this will mount all swap partitions automatically even in the absence of an fstab entry (on GPT disks).

To prevent this happening, add this to the options on the fstab line for the swap partition you wish to deactivate:

noauto

Leave all the other details in the fstab line as they are.

See systemd.swap(5)

It's not clear whether you tried "noauto" in isolation.

Offline

#3 2015-10-07 03:47:17

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

Re: [Solved - post install] Bunsen uses other distro's swap .

Did indeed try noauto in isolation, still uses it, also still uses it with no line in fstab, which is what the install produced.

Last edited by Bearded_Blunder (2015-10-07 03:47:32)


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#4 2015-10-07 06:36:03

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [Solved - post install] Bunsen uses other distro's swap .

Yeah sorry I was being a bit thick there sad

You will have to mask the systemd unit responsible for the swap partition you wish to deactivate.

Run this command to find the guilty party:

systemctl --type swap

Then use:

sudo systemctl mask name_of_unit

Replace "name_of_unit" with the full name listed in the output of the first command.

Offline

#5 2015-10-10 07:30:21

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

Re: [Solved - post install] Bunsen uses other distro's swap .

Thanks, muchly HoAS that got it to behave finally.

Marking as [Solved - post install] and editing first post.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

Board footer

Powered by FluxBB