You are not logged in.

#1 2016-10-13 17:50:26

jbodhorn
Member
Registered: 2015-12-11
Posts: 130

Arch turning on the swap for Ubuntu each boot

I have a separate swap partition for both Arch and Ubuntu. Each boot instead of just using the swap partition for Arch, Arch takes it upon itself to also use the swap partition for Ubuntu. In my fstab the only swap listed is the swap partition I made for Arch. I'm guessing that systemd is the culprit here.

Partition /dev/sda10 was made for Arch and /dev/sda5 was made for Ubuntu. Seeing as the systemd unit is generated at boot how do I stop /dev/sda5 from being used? Would making two systemd units, one for /dev/sda10 and one for /dev/sda5, enabling the unit for /dev/sda10 and disabling the unit for /dev/sda5 be a working solution that won't end up causing problems down the line? I've heard that when using hibernation the swap is used and that using the same swap for two *nix distros will make hibernation fail or cause coruption. Are there any other reasons that using the same swap for two different *nix OS's is a bad idea? If the hibernation is the only issue then there is no reason to hurry to fix this because I don't use hibernation. I do use sleep though, will the swap issue cause a problem for sleep?

This is from systemctl list-unit-files complete output is at the end of my post

dev-disk-by\x2duuid-c5e...x2d63cd\x2d4480\x2d9e86\x2ddbe01315c566.swap generated
dev-sda10.swap                                                         generated
dev-sda5.swap                                                          generated
[joe@Arch-Flex-3 media]$ lsblk -f
NAME    FSTYPE LABEL       UUID                                 MOUNTPOINT
sda                                                             
├─sda1  vfat   SYSTEM_DRV  1485-FC1C                            /boot
├─sda2                                                          
├─sda3  ntfs   Windows     01D223DDD42F4D20                     
├─sda4  ext4               e934b849-0d63-4816-920c-ab56f63de49a 
├─sda5  swap               a9e1214e-8658-465d-b3c0-1bf27cbbf5cc [SWAP]
├─sda6  ntfs   LENOVO      704C9B8D4C9B4CAA                     
├─sda7  ntfs   WINRE_DRV   969C859B9C857691                     
├─sda8  ntfs   LENOVO_PART D45A2BE55A2BC35A                     
├─sda9  vfat   LRS_ESP     5A2D-7084                            
├─sda10 swap   Arch_Swap   c5ec2853-63cd-4480-9e86-dbe01315c566 [SWAP]
└─sda11 ext4   Arch_Linux  137157ab-0008-4c71-8f8f-69a240c93a8c /
UNIT FILE                                                              STATE    
proc-sys-fs-binfmt_misc.automount                                      static   
org.freedesktop.hostname1.busname                                      static   
org.freedesktop.import1.busname                                        static   
org.freedesktop.locale1.busname                                        static   
org.freedesktop.login1.busname                                         static   
org.freedesktop.machine1.busname                                       static   
org.freedesktop.network1.busname                                       static   
org.freedesktop.resolve1.busname                                       static   
org.freedesktop.systemd1.busname                                       static   
org.freedesktop.timedate1.busname                                      static   
-.mount                                                                generated
boot.mount                                                             generated
dev-hugepages.mount                                                    static   
dev-mqueue.mount                                                       static   
proc-sys-fs-binfmt_misc.mount                                          static   
sys-fs-fuse-connections.mount                                          static   
sys-kernel-config.mount                                                static   
sys-kernel-debug.mount                                                 static   
tmp.mount                                                              static   
var-lib-machines.mount                                                 static   
org.cups.cupsd.path                                                    enabled  
systemd-ask-password-console.path                                      static   
systemd-ask-password-wall.path                                         static   
session-c1.scope                                                       transient
accounts-daemon.service                                                disabled 
autovt@.service                                                        enabled  
avahi-daemon.service                                                   enabled  
avahi-dnsconfd.service                                                 disabled 
blk-availability.service                                               disabled 
bluetooth.service                                                      enabled  
brltty.service                                                         disabled 
bumblebeed.service                                                     enabled  
canberra-system-bootup.service                                         disabled 
canberra-system-shutdown-reboot.service                                disabled 
canberra-system-shutdown.service                                       disabled 
ceph-create-keys@.service                                              static   
ceph-disk@.service                                                     static   
ceph-mds@.service                                                      disabled 
ceph-mon@.service                                                      disabled 
ceph-osd@.service                                                      disabled 
ceph-radosgw@.service                                                  disabled 
ceph-rbd-mirror@.service                                               disabled 
colord.service                                                         static   
console-getty.service                                                  disabled 
console-shell.service                                                  disabled 
container-getty@.service                                               static   
cups-browsed.service                                                   enabled  
dbus-org.bluez.service                                                 enabled  
dbus-org.freedesktop.Avahi.service                                     enabled  
dbus-org.freedesktop.hostname1.service                                 static   
dbus-org.freedesktop.import1.service                                   static   
dbus-org.freedesktop.locale1.service                                   static   
dbus-org.freedesktop.login1.service                                    static   
dbus-org.freedesktop.machine1.service                                  static   
dbus-org.freedesktop.network1.service                                  disabled 
dbus-org.freedesktop.NetworkManager.service                            enabled  
dbus-org.freedesktop.nm-dispatcher.service                             enabled  
dbus-org.freedesktop.resolve1.service                                  disabled 
dbus-org.freedesktop.timedate1.service                                 static   
dbus.service                                                           static   
debug-shell.service                                                    disabled 
dhcpcd.service                                                         disabled 
dhcpcd@.service                                                        disabled 
display-manager.service                                                enabled  
dm-event.service                                                       disabled 
emergency.service                                                      static   
flatpak-system-helper.service                                          static   
fluidsynth.service                                                     disabled 
fstrim.service                                                         static   
ftpd.service                                                           disabled 
gdm.service                                                            enabled  
geoclue.service                                                        static   
getty@.service                                                         enabled  
git-daemon@.service                                                    static   
gpm.service                                                            disabled 
hplip-printer@.service                                                 static   
httpd.service                                                          disabled 
initrd-cleanup.service                                                 static   
initrd-parse-etc.service                                               static   
initrd-switch-root.service                                             static   
initrd-udevadm-cleanup-db.service                                      static   
ip6tables.service                                                      disabled 
iptables.service                                                       disabled 
kmod-static-nodes.service                                              static   
krb5-kadmind.service                                                   disabled 
krb5-kdc.service                                                       disabled 
krb5-kpropd.service                                                    disabled 
krb5-kpropd@.service                                                   static   
ldconfig.service                                                       static   
libvirt-guests.service                                                 disabled 
libvirtd.service                                                       disabled 
logrotate.service                                                      static   
lvm2-lvmetad.service                                                   disabled 
lvm2-monitor.service                                                   disabled 
lvm2-pvscan@.service                                                   static   
man-db.service                                                         static   
mdadm-grow-continue@.service                                           static   
mdadm-last-resort@.service                                             static   
mdmon@.service                                                         static   
mdmonitor.service                                                      static   
mkinitcpio-generate-shutdown-ramfs.service                             static   
netctl-auto@.service                                                   disabled 
netctl-ifplugd@.service                                                disabled 
netctl-sleep.service                                                   disabled 
netctl.service                                                         disabled 
netctl@.service                                                        static   
NetworkManager-dispatcher.service                                      enabled  
NetworkManager-wait-online.service                                     enabled  
NetworkManager.service                                                 enabled  
nmbd.service                                                           enabled  
nscd.service                                                           disabled 
nvidia-persistenced.service                                            enabled  
openvpn@.service                                                       disabled 
org.cups.cups-lpd@.service                                             static   
org.cups.cupsd.service                                                 enabled  
ostree-prepare-root.service                                            static   
ostree-remount.service                                                 disabled 
packagekit-offline-update.service                                      static   
packagekit.service                                                     static   
polkit.service                                                         static   
quotaon.service                                                        static   
rbdmap.service                                                         static   
rescue.service                                                         static   
rlogin@.service                                                        static   
rsh@.service                                                           static   
rsyncd.service                                                         disabled 
rsyncd@.service                                                        static   
rtkit-daemon.service                                                   disabled 
samba.service                                                          disabled 
serial-getty@.service                                                  disabled 
shadow.service                                                         static   
smbd.service                                                           enabled  
smbd@.service                                                          static   
snmpd.service                                                          disabled 
snmptrapd.service                                                      disabled 
speech-dispatcherd.service                                             disabled 
sshd.service                                                           enabled  
sshd@.service                                                          static   
sshdgenkeys.service                                                    static   
svnserve.service                                                       disabled 
systemd-ask-password-console.service                                   static   
systemd-ask-password-wall.service                                      static   
systemd-backlight@.service                                             static   
systemd-binfmt.service                                                 static   
systemd-coredump@.service                                              static   
systemd-exit.service                                                   static   
systemd-firstboot.service                                              static   
systemd-fsck-root.service                                              static   
systemd-fsck@.service                                                  static   
systemd-halt.service                                                   static   
systemd-hibernate-resume@.service                                      static   
systemd-hibernate.service                                              static   
systemd-hostnamed.service                                              static   
systemd-hwdb-update.service                                            static   
systemd-hybrid-sleep.service                                           static   
systemd-importd.service                                                static   
systemd-initctl.service                                                static   
systemd-journal-catalog-update.service                                 static   
systemd-journal-flush.service                                          static   
systemd-journal-gatewayd.service                                       indirect 
systemd-journal-remote.service                                         indirect 
systemd-journal-upload.service                                         disabled 
systemd-journald.service                                               static   
systemd-kexec.service                                                  static   
systemd-localed.service                                                static   
systemd-logind.service                                                 static   
systemd-machine-id-commit.service                                      static   
systemd-machined.service                                               static   
systemd-modules-load.service                                           static   
systemd-networkd-wait-online.service                                   disabled 
systemd-networkd.service                                               disabled 
systemd-nspawn@.service                                                disabled 
systemd-poweroff.service                                               static   
systemd-quotacheck.service                                             static   
systemd-random-seed.service                                            static   
systemd-reboot.service                                                 static   
systemd-remount-fs.service                                             static   
systemd-resolved.service                                               disabled 
systemd-rfkill.service                                                 static   
systemd-suspend.service                                                static   
systemd-sysctl.service                                                 static   
systemd-sysusers.service                                               static   
systemd-timedated.service                                              static   
systemd-timesyncd.service                                              enabled  
systemd-tmpfiles-clean.service                                         static   
systemd-tmpfiles-setup-dev.service                                     static   
systemd-tmpfiles-setup.service                                         static   
systemd-udev-settle.service                                            static   
systemd-udev-trigger.service                                           static   
systemd-udevd.service                                                  static   
systemd-update-done.service                                            static   
systemd-update-utmp-runlevel.service                                   static   
systemd-update-utmp.service                                            static   
systemd-user-sessions.service                                          static   
systemd-vconsole-setup.service                                         static   
talk.service                                                           indirect 
teamd@.service                                                         static   
telnet@.service                                                        static   
udisks2.service                                                        disabled 
updatedb.service                                                       static   
upower.service                                                         disabled 
usbmuxd.service                                                        static   
user@.service                                                          static   
uuidd.service                                                          indirect 
virtlockd.service                                                      indirect 
virtlogd.service                                                       indirect 
winbindd.service                                                       disabled 
wpa_supplicant-nl80211@.service                                        disabled 
wpa_supplicant-wired@.service                                          disabled 
wpa_supplicant.service                                                 disabled 
wpa_supplicant@.service                                                disabled 
-.slice                                                                static   
machine.slice                                                          static   
system.slice                                                           static   
user-1000.slice                                                        transient
user.slice                                                             static   
avahi-daemon.socket                                                    enabled  
dbus.socket                                                            static   
dm-event.socket                                                        static   
git-daemon.socket                                                      disabled 
krb5-kpropd.socket                                                     disabled 
lvm2-lvmetad.socket                                                    static   
org.cups.cups-lpd.socket                                               disabled 
org.cups.cupsd.socket                                                  enabled  
rlogin.socket                                                          disabled 
rsh.socket                                                             disabled 
rsyncd.socket                                                          disabled 
smbd.socket                                                            disabled 
sshd.socket                                                            disabled 
syslog.socket                                                          static   
systemd-coredump.socket                                                static   
systemd-initctl.socket                                                 static   
systemd-journal-gatewayd.socket                                        disabled 
systemd-journal-remote.socket                                          disabled 
systemd-journald-audit.socket                                          static   
systemd-journald-dev-log.socket                                        static   
systemd-journald.socket                                                static   
systemd-networkd.socket                                                disabled 
systemd-rfkill.socket                                                  static   
systemd-udevd-control.socket                                           static   
systemd-udevd-kernel.socket                                            static   
talk.socket                                                            disabled 
telnet.socket                                                          disabled 
uuidd.socket                                                           disabled 
virtlockd.socket                                                       disabled 
virtlogd.socket                                                        disabled 
dev-disk-by\x2duuid-c5e...x2d63cd\x2d4480\x2d9e86\x2ddbe01315c566.swap generated
dev-sda10.swap                                                         generated
dev-sda5.swap                                                          generated
basic.target                                                           static   
bluetooth.target                                                       static   
busnames.target                                                        static   
ceph-mds.target                                                        disabled 
ceph-mon.target                                                        disabled 
ceph-osd.target                                                        disabled 
ceph-radosgw.target                                                    disabled 
ceph-rbd-mirror.target                                                 disabled 
ceph.target                                                            disabled 
cryptsetup-pre.target                                                  static   
cryptsetup.target                                                      static   
ctrl-alt-del.target                                                    disabled 
default.target                                                         static   
emergency.target                                                       static   
exit.target                                                            disabled 
final.target                                                           static   
getty.target                                                           static   
graphical.target                                                       static   
halt.target                                                            disabled 
hibernate.target                                                       static   
hybrid-sleep.target                                                    static   
initrd-fs.target                                                       static   
initrd-root-device.target                                              static   
initrd-root-fs.target                                                  static   
initrd-switch-root.target                                              static   
initrd.target                                                          static   
kexec.target                                                           disabled 
local-fs-pre.target                                                    static   
local-fs.target                                                        static   
machines.target                                                        disabled 
multi-user.target                                                      static   
network-online.target                                                  static   
network-pre.target                                                     static   
network.target                                                         static   
nss-lookup.target                                                      static   
nss-user-lookup.target                                                 static   
paths.target                                                           static   
poweroff.target                                                        disabled 
printer.target                                                         static   
reboot.target                                                          disabled 
remote-fs-pre.target                                                   static   
remote-fs.target                                                       enabled  
rescue.target                                                          disabled 
rpcbind.target                                                         static   
shutdown.target                                                        static   
sigpwr.target                                                          static   
sleep.target                                                           static   
slices.target                                                          static   
smartcard.target                                                       static   
sockets.target                                                         static   
sound.target                                                           static   
suspend.target                                                         static   
swap.target                                                            static   
sysinit.target                                                         static   
system-update.target                                                   static   
time-sync.target                                                       static   
timers.target                                                          static   
umount.target                                                          static   
fstrim.timer                                                           disabled 
logrotate.timer                                                        static   
man-db.timer                                                           static   
mdadm-last-resort@.timer                                               static   
shadow.timer                                                           static   
systemd-tmpfiles-clean.timer                                           static   
updatedb.timer                                                         static   

314 unit files listed.

Offline

#2 2016-10-13 18:18:05

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: Arch turning on the swap for Ubuntu each boot

Did you examine the unit file in question it should list which generator produced it.
There should also be related output in the journal.

Offline

Board footer

Powered by FluxBB