0

I want to have two partitions, one for home and one for work, but do not want the partitions to “see” each other, hence not-automounting the partition came in mind.

So I made two partitions, and then I went into Terminal, looked up the UUID for "work", opened up sudo vifs and entered the following:

UUID=<..> none APFS rw, noauto. 

I pressed escape and then entered :X to close the file. It did not do anything, then I thought it must be because it is encrypted. So I entered:

UUID=<..> none APFS encrypted rw, noauto 

Then I pressed escape followed by :X, but here sudo vifs asks me the encryption password. Here I messed up, I know. I do not know what to do, so I entered the normal admin password but it will not save and exit. So I stopped the file and know I get a notice that I need to choose between quit, delete etc. I did a bunch of options and I am stuck. It now says swap files found.

My Terminal screen

At this moment I repeated steps and nothing helped. I got it to go back to a file that says the first line :UUID=<..> none APFS rw, noauto. But when I try to alter it and press escape followed by :X, it will still ask for the encryption password. I tried using the admin password of that partition, but I need to enter it again and then nothing. When I try to close /etc/fstab, it will ask if I want to terminate the process.

The thing that I want is that sudo vifs is normal again. Can you help get the sudo vifs file normal again?

Then I want to add the line like Alexander Presber said (Prevent encrypted APFS volume on partition to automount / ask for password on login - Catalina):

UUID=C58A1BDC-593C-4854-B954-702A73ABD67C none auto noauto

Hopefully this line with "auto" knows what format it is and hopefully it will not ask for the encryption key.

1
  • Entering :X in Vi will encrypt the currently edited file, something you for sure don't want to do with /etc/fstab (the proper way to save and quit is Escape, followed by :wq). Assuming you have a shell prompt: Does cat /etc/fstab show readable text or something gibberish like VimCrypt~03!z?
    – nohillside
    Commented Feb 12, 2023 at 18:41

1 Answer 1

0

Your problem is coming from using the wrong keyboard commands to exit vi. Applied correctly, the answer to Prevent encrypted APFS volume on partition to automount / ask for password on login - Catalina should work in your case as well.

  • Get the UUIDs for the drives/partitions you want to NOT automount on start
  • Run sudo vifs
  • Add the lines
UUID=<UID of work partition> none auto noauto
UUID=<UID of home partition> none auto noauto
  • Press ESC
  • Type :wq to write the file to disk and quit vi.

You can check whether your update was successful by running cat /etc/fstab and looking for the lines you've inserted.

2
  • Dear nohillside, It worked with ":wq", thank you. The partition "Work" does not show up, but Work - Data still mounts and asked for its password. So, finding that UUID is next, but will do that tomorrow. This was already huge. Hence my next question: "Is there a book which teaches you "terminal" and all its functions?
    – Vids YOH
    Commented Feb 12, 2023 at 20:18
  • @VidsYOH There are tons of guides and tutorials on how to use shells :-)
    – nohillside
    Commented Feb 13, 2023 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .