Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Unlock stopped working after cs conversion #28

Open
bombardement opened this issue Feb 7, 2021 · 1 comment
Open

Unlock stopped working after cs conversion #28

bombardement opened this issue Feb 7, 2021 · 1 comment

Comments

@bombardement
Copy link

bombardement commented Feb 7, 2021

I created the HFS partition on the external hard drive and converted it with diskutil cs convert /Volumes/EXT_SSD -passphrase.
After installation, the program worked very well as long as the core storage conversion was running. I have my home directory on the encrypted partition, and was able to log in. After the conversion was complete, the program stopped working. Is there something wrong with the CS partition?

osx 10.15.7

% diskutil list
...
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:          Apple_CoreStorage EXT_SSD                 499.8 GB   disk2s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk2s3

/dev/disk3 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS                        +499.4 GB   disk3
                                 Logical Volume EXT_SSD on disk2s2
                                 B50387F8-59FE-492C-B90F-70C5B63A148C
                                 Locked Encrypted

Offline
                                 Logical Volume EXT_SSD on disk2s2
                                 B50387F8-59FE-492C-B90F-70C5B63A148C
                                 Locked Encrypted

system.log

Feb  7 12:46:14 Mac-mini-Sasa com.apple.xpc.launchd[1] (name.ridgewell.unlock): Unknown key for string: ServiceDescription
Feb  7 12:46:14 Mac-mini-Sasa com.apple.xpc.launchd[1] (name.ridgewell.unlock): Please switch away from OnDemand to KeepAlive.
Feb  7 12:46:14 Mac-mini-Sasa name.ridgewell.unlock[553]: Unlocking volume B50387F8-59FE-492C-B90F-70C5B63A148C
Feb  7 12:46:14 Mac-mini-Sasa name.ridgewell.unlock[553]: Unlocking volume B50387F8-59FE-492C-B90F-70C5B63A148C

StandardOut:

Started CoreStorage operation
Logical Volume successfully unlocked
Logical Volume successfully attached as disk3
Core Storage disk: disk3
Finished CoreStorage operation

StandardError

2021-02-07 12:48:19.044 name.ridgewell.unlock[112:783] Unlocking volume B50387F8-59FE-492C-B90F-70C5B63A148C
2021-02-07 12:48:20.240 name.ridgewell.unlock[112:783] Unlocking volume B50387F8-59FE-492C-B90F-70C5B63A148C
B50387F8-59FE-492C-B90F-70C5B63A148C is already unlocked and is attached as disk3

When I start LaunchDaemon manually, the volume will be unlocked, but not mounted.

sudo launchctl load -w /Library/LaunchDaemons/name.ridgewell.unlock.plist

/dev/disk3 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS                        +499.4 GB   disk3
                                 Logical Volume on disk2s2
                                 B50387F8-59FE-492C-B90F-70C5B63A148C
                                 Unlocked Encrypted
diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group A090EE46-67C5-4D9C-BF35-3C2265120557
    =========================================================
    Name:         EXT_SSD
    Status:       Online
    Size:         499763888128 B (499.8 GB)
    Free Space:   18989056 B (19.0 MB)
    |
    +-< Physical Volume 69138B48-D7B3-486A-8402-97CC2BCD5595
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk2s2
    |   Status:   Online
    |   Size:     499763888128 B (499.8 GB)
    |
    +-> Logical Volume Family 191ADAFE-5526-44F8-91D3-945C454C5A80
        ----------------------------------------------------------
        Encryption Type:         AES-XTS
        Encryption Status:       Unlocked
        Conversion Status:       Complete
        High Level Queries:      Fully Secure
        |                        Passphrase Required
        |                        Accepts New Users
        |                        Has Visible Users
        |                        Has Volume Key
        |
        +-> Logical Volume B50387F8-59FE-492C-B90F-70C5B63A148C
            ---------------------------------------------------
            Disk:                  disk3
            Status:                Online
            Size (Total):          499392577536 B (499.4 GB)
            Revertible:            Yes (unlock and decryption required)
            LV Name:               EXT_SSD
            Content Hint:          Apple_HFSX
@jridgewell
Copy link
Owner

Hi @bombardement, let me start by saying it's been a long time since I've worked on Unlock, so no guarantees.

What I think it happening is the External disk isn't mounted yet when Unlock runs, so trying to unlock it won't work (I had designed this for internal disks only, which are mounted by the system immediately during boot). What should probably happen is to listen for disk mount events (I'm not sure if there's even a way to do that), then run Unlock again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants