LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-19-2017, 05:58 AM   #1
Märk Owen
LQ Newbie
 
Registered: Nov 2014
Posts: 22

Rep: Reputation: Disabled
Cryptsetup wants to unmount everything right after booting


I'm running Debian Stretch on a Thinkpad laptop. My /home partition is encrypted and unlocked on boot with a key file loaded from a usb device.

So far everything works but when the boot sequence is done, it seems cryptsetup wants to unmount everything. It succeeds to do that with my SWAP but it fails with /home probably because it's in use.

I have no idea why it wants to do that. Here is an excerpt from my logs. Full logs are here.

Code:
-- L'unité (unit) upower.service a terminé son démarrage, avec le résultat done.
août 19 12:36:32 Thinkpad-machine pkexec[1472]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
août 19 12:36:32 Thinkpad-machine pkexec[1472]: user: Executing command [USER=root] [TTY=unknown] [CWD=/home/user] [COMMAND=/usr/sbin/mate-power-backlight-helper --set-brightness 1958841]
août 19 12:37:02 Thinkpad-machine kernel: usb 6-2: USB disconnect, device number 2
août 19 12:37:02 Thinkpad-machine systemd[1]: Stopped target Encrypted Volumes.
-- Subject: L'unité (unit) cryptsetup.target a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) cryptsetup.target a terminé son arrêt.
août 19 12:37:02 Thinkpad-machine systemd[1]: Stopped target Local File Systems.
-- Subject: L'unité (unit) local-fs.target a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) local-fs.target a terminé son arrêt.
août 19 12:37:02 Thinkpad-machine systemd[1]: Stopped target Swap.
-- Subject: L'unité (unit) swap.target a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) swap.target a terminé son arrêt.
août 19 12:37:02 Thinkpad-machine systemd[1]: Stopping Cryptography Setup for sda2_crypt...
-- Subject: L'unité (unit) systemd-cryptsetup@sda2_crypt.service a commencé à s'arrêter
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-cryptsetup@sda2_crypt.service a commencé à s'arrêter.
août 19 12:37:02 Thinkpad-machine systemd[1]: Deactivating swap /home/swapfile...
-- Subject: L'unité (unit) home-swapfile.swap a commencé à s'arrêter
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) home-swapfile.swap a commencé à s'arrêter.
août 19 12:37:02 Thinkpad-machine systemd[1]: Deactivated swap /home/swapfile.
-- Subject: L'unité (unit) home-swapfile.swap a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) home-swapfile.swap a terminé son arrêt.
août 19 12:37:02 Thinkpad-machine systemd[1]: Unmounting /home...
-- Subject: L'unité (unit) home.mount a commencé à s'arrêter
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) home.mount a commencé à s'arrêter.
août 19 12:37:02 Thinkpad-machine systemd[1]: home.mount: Mount process exited, code=exited status=32
août 19 12:37:02 Thinkpad-machine systemd[1]: Failed unmounting /home.
-- Subject: L'unité (unit) home.mount a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) home.mount a terminé son arrêt.
août 19 12:37:02 Thinkpad-machine systemd[1]: Stopped File System Check on /dev/mapper/sda2_crypt.
-- Subject: L'unité (unit) systemd-fsck@dev-mapper-sda2_crypt.service a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-fsck@dev-mapper-sda2_crypt.service a terminé son arrêt.
août 19 12:37:06 Thinkpad-machine systemd-cryptsetup[1651]: Failed to deactivate: Device or resource busy
août 19 12:37:06 Thinkpad-machine systemd[1]: systemd-cryptsetup@sda2_crypt.service: Control process exited, code=exited status=1
août 19 12:37:07 Thinkpad-machine systemd[1]: Stopped Cryptography Setup for sda2_crypt.
-- Subject: L'unité (unit) systemd-cryptsetup@sda2_crypt.service a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-cryptsetup@sda2_crypt.service a terminé son arrêt.
août 19 12:37:07 Thinkpad-machine systemd[1]: systemd-cryptsetup@sda2_crypt.service: Unit entered failed state.
août 19 12:37:07 Thinkpad-machine systemd[1]: systemd-cryptsetup@sda2_crypt.service: Failed with result 'exit-code'.
août 19 12:37:07 Thinkpad-machine systemd[1]: Unmounting /media/usb/crypto-user...
-- Subject: L'unité (unit) media-usb-crypto\x2duser.mount a commencé à s'arrêter
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) media-usb-crypto\x2duser.mount a commencé à s'arrêter.
août 19 12:37:07 Thinkpad-machine systemd[1]: Unmounted /media/usb/crypto-user.
-- Subject: L'unité (unit) media-usb-crypto\x2duser.mount a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) media-usb-crypto\x2duser.mount a terminé son arrêt.
août 19 12:37:32 Thinkpad-machine su[1675]: Successful su for root by user
août 19 12:37:32 Thinkpad-machine su[1675]: + /dev/pts/0 user:root
août 19 12:37:32 Thinkpad-machine su[1675]: pam_unix(su:session): session opened for user root by (uid=1000)
août 19 12:37:32 Thinkpad-machine su[1675]: pam_systemd(su:session): Cannot create session: Already running in a session
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device/stop timed out.
août 19 12:38:32 Thinkpad-machine systemd[1]: Timed out stopping /dev/disk/by-id/dm-uuid-CRYPT-LUKS1-36db99fd289b4d19bd27e312e5424700-sda2_crypt.
-- Subject: L'unité (unit) dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device a terminé son arrêt.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d36db99fd289b4d19bd27e312e5424700\x2dsda2_crypt.device/stop failed with result 'timeout'.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop timed out.
août 19 12:38:32 Thinkpad-machine systemd[1]: Timed out stopping /dev/dm-0.
-- Subject: L'unité (unit) dev-dm\x2d0.device a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) dev-dm\x2d0.device a terminé son arrêt.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop failed with result 'timeout'.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device: Job dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device/stop timed out.
août 19 12:38:32 Thinkpad-machine systemd[1]: Timed out stopping /dev/disk/by-id/dm-name-sda2_crypt.
-- Subject: L'unité (unit) dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device a terminé son arrêt.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device: Job dev-disk-by\x2did-dm\x2dname\x2dsda2_crypt.device/stop failed with result 'timeout'.
août 19 12:38:32 Thinkpad-machine systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop timed out.
août 19 12:38:32 Thinkpad-machine systemd[1]: Timed out stopping /sys/devices/virtual/block/dm-0.
-- Subject: L'unité (unit) sys-devices-virtual-block-dm\x2d0.device a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) sys-devices-virtual-block-dm\x2d0.device a terminé son arrêt.
août 19 12:38:32 Thinkpad-machine systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop failed with result 'timeout'.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device: Job dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device/stop timed out.
août 19 12:38:32 Thinkpad-machine systemd[1]: Timed out stopping /dev/disk/by-uuid/5eb92e8c-5515-4e9b-ac5d-dfa320566afc.
-- Subject: L'unité (unit) dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device a terminé son arrêt
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device a terminé son arrêt.
août 19 12:38:32 Thinkpad-machine systemd[1]: dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device: Job dev-disk-by\x2duuid-5eb92e8c\x2d5515\x2d4e9b\x2dac5d\x2ddfa320566afc.device/stop failed with result 'timeout'.
août 19 12:42:49 Thinkpad-machine wpa_supplicant[793]: wlan0: WPA: Group rekeying completed with 90:94:e4:4e:1b:14 [GTK=CCMP]
août 19 12:51:04 Thinkpad-machine systemd[1]: Starting Cleanup of Temporary Directories...
-- Subject: L'unité (unit) systemd-tmpfiles-clean.service a commencé à démarrer
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-tmpfiles-clean.service a commencé à démarrer.
août 19 12:51:04 Thinkpad-machine systemd[1]: Started Cleanup of Temporary Directories.
-- Subject: L'unité (unit) systemd-tmpfiles-clean.service a terminé son démarrage
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-tmpfiles-clean.service a terminé son démarrage, avec le résultat done.
 
Old 08-19-2017, 01:44 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,285

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Not doing great with the logs 'en francais.' I have been forgetting my schoolboy French since 1970 :-o.

Home is probably mounted before cryptsetup is run. Could you put a 'noauto'option in fstab for home, and then mount /home with cryptsetup or in rc.local or suchlike? Also, if it's only /home you have encrypted, why is it farting about with swap and other kit? There may be a config issue there. In the movie version of Oliver Twist, Fagan had a great line in his song:
Quote:
"I think I'd better think it out again!"
 
Old 08-19-2017, 02:08 PM   #3
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 687
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
I noticed you seem to have a swap file/partition on /home, seems that was turned off prior to /home unmount error. having a swap on /home seems a bit unusual to me, but per the log seems that is a non-issue

Do you have anything else attached to /home ? Like an executing process or a mount point ?

Before the next reboot, try disabling swap and see if any processes are using /home via lsof(8). Maybe a process accessing /home prior to unmount cannot be cancelled ?

This seems suspicious
Quote:
19 12:37:02 Thinkpad-machine kernel: usb 6-2: USB disconnect, device number 2
Maybe your usb key is disabled prior to unmounting /home ? Or was it removed after power on and unmount needs it ?

John

Last edited by jmccue; 08-19-2017 at 02:17 PM. Reason: edit: notcied the full log link, adjusted
 
Old 08-27-2017, 03:06 AM   #4
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
It's always fascinating to see these schizoid operating systems in other languages than English. And it's one thing to use non-English gui, and a completely different thing to use it in logs. They're as idiotic as they're funny: "L'unité (unit) home.mount a terminé son arrêt" and next "Stopped File System Check on /dev/mapper/sda2_crypt." It's not actually using linux in French, it's just... silly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cannot compile cryptsetup jr_bob_dobbs Linux From Scratch 7 07-02-2017 06:07 PM
shutdown tumbleweed: failed to unmount /home; failed to unmount /var JZL240I-U Linux - Software 3 04-03-2017 07:23 AM
Missing unmount and unmount.cifs johnmccarthy Linux - Newbie 3 11-19-2011 07:01 AM
Cryptsetup : Arrrrg ! kemkem42 Linux - Software 0 09-28-2005 04:10 AM
command 'unmount' not found - how can i unmount??? GloVe Linux - General 1 10-04-2003 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration