You need to use diskutil
through Terminal to accomplish this.
The command you would use is
diskutil partitionDisk diskX 2 MBR fat32 "LINUX" 80% fat32 "RESCUE" 20%
A few notes:
- diskX is the identifier of your USB stick (use
diskutil list
to get that info)
- For this example, I am using a 1GB flash and dedicating 80% of it to the Linux partition and 20% to the Rescue. You can use actual size values like 800MB and 200MB rather than percentages.
- You will need a boot loader (like GRUB2) installed. If your rescue CD already has one, just
dd
the image to the "Rescue" partition.
- "Linux" and "Rescue" are the names of the partitions
- The partitions will be created in the order listed.
Per the man page:
partitionDisk device [numberOfPartitions] [APM[Format] | MBR[Format] | GPT[Format]] [part1Format
part1Name part1Size part2Format part2Name part2Size part3Format part3Name part3Size ...]
There are quite a few tools available on Linux that can be integrated into the system. On macOS there is only Filevault in the system.
If you are willing to install osxfuse then macOS gains a lot more possibilities.
Some solutions currently available:
Ciphershed
CipherShed is free (as in free-of-charge and free-speech) encryption software for keeping your data secure and private. It started as a fork of the now-discontinued TrueCrypt Project. Learn more about how CipherShed works and the project behind it.
CipherShed is cross-platform; It is available for Windows, Mac OS X and GNU/Linux. Although, as packages for OS X and Linux do not exist, yet, users of those platforms will need to compile CipherShed.
BestCrypt Container Encryption
Advertised as:
Lock up your private data - Use BestCrypt Container Encryption to encrypt files and folders on Windows, Mac OS and Linux.
SecurStick
The SecurStick program for Windows, Mac OS X and Linux has been developed as part of the c't article Encryption Service (c't 6/2010 p.170) and allows the encryption of data on USB sticks and others media.
And an alternative fork of truecrypt (that seems to have lost momentum): Gostcrypt
After listing these options there is the difficulty of integration to consider.
In my opinion veracrypt gives the least trouble when working cross platform. It's free, apparently well supported, actively developed and audited. They even have a canary online.
EncFS seems currently not such a good option. But at least it was audited and the problems may have been rectified by now. EncFS works easy on Mac and Linux and restarted development this year. The wikipedia page about EncFS lists the features and Prism-Break recommends it now for both: Linux and macOS. Install EncfS via e.g. homebrew. A GUI-Wrapper increases the comfort (but the provided binary is unstable on 10.12+). For Nautilus integration have a look at EncFS easy, fast and reliable.
If integration into Finder is most important then you might stick with Filevault on the macOS side and try to teach your Ubuntu some new tricks regarding decrypting Filevault with libfvde. That should be available in your standard package repositories and is not that non standard in usage.
libfvde's support status is officially:
libfvde is a library to access FileVault Drive Encryption (FVDE) (or FileVault2) encrypted volumes.
The FVDE format is used by Mac OS X, as of Lion, to encrypt data on a storage media volume.
Project information:
Status: experimental
Licence: LGPLv3+
Supported FileVault2 implementations:
Mac OS X Lion (10.7)
Mac OS X Mountain Lion (10.8)
Mac OS X Mavericks (10.9)
Mac OS X Yosemite (10.10)
Mac OS X El Capitan (10.11)
But that information might be outdated by now since there was a release just 4 days ago.
Further options might exit here: "What are current cross-platform disk encryption options?" Or just using encrypted archives like zip files.
Best Answer
I used this procedure to change uid's on macOS Tiger and Ubuntu. The info on passwords has changed.
You can change the permissions of files and directories in either OS.
I suggest that you make a complete backup of your system. You should create a second administrator account from which you use to change your original account. You should log out your original account before proceeding.
Mac OS X ... harddrive -> Applications -> Utilities -> terminal
Ubuntu ... Applications > Accessories > Terminal or where ever the Terminal is today.
Your current user is: echo $USER Let's assume myuser
To find out your UID and GID do:
Or, you can use the id command.
compare the output and write down what you find.
You best use the numeric value for your userid. In this case it is 500. To list all the files owned by a userid do:
adding a -x before the / limits the search to the current file system.
You need to adjust the uid and gid in your account definition.
In the Ubuntu terminal,
... will give you the format of the passwd file.
... the format is user-name, password, uid, gid, ...
control-o ... to save control-x ... to quit
The groups are defined in /etc/group
Now change the UID and GID of all files: You best use the numeric value for your userid. In this case it is 500.
On the Mac you get into single user mode by holding down command-s when you poweron your machine. Just in case you run into problems.
On Mac OS, there are a few files that have the old uid as part of their name. The .Trashes file will be used on removal media. Here are other directories.
You will need to look on the external drives. All the trash is in a common folder with uid based subfolders. You can use the find command to do a search:
Be patient. You can quit this command with a control-c
It similar in Linux, but based on the short user name.
On Linux, there are a few files that have the old user short name as part of their file and folder names.
Should some of the files be locked on macOS, you will need to unlock them. See – Darf Nader comments below. The macOS lock flag corresponds to the Unix layer uchg flag.
Here is another explanation of the procedure. ( It misses some files because the author checks only the most likely places. http://lissot.net/netinfo/change_user.html
Robert