How to create a hidden file system in Linux using Shufflecake
This article will show you how to install Shufflecake on Ubuntu to create and maintain a hidden and encrypted file system in Linux.
Install Shufflecake
The first step to get Shufflecake is to install its dependencies onto your system. To do that, run the following command:
sudo apt install linux-headers-$(uname -r) libdevmapper-dev libgcrypt-dev make gcc
Download the latest tarball release from the project's Codeberg page.
Navigate to the Downloads folder on your computer, then extract the release archive using Tar:
tar xzf ./Downloads/v0.4.4.tar.gz
Open the folder containing the Shufflecake source code, then run the following command to compile its binary on your system:
cd ./Downloads/shufflecake-c make
Note: Shufflecake compilation may take 2 to 5 minutes depending on your computer system resources.
Copy Shufflecake from the release folder to the binary path on your computer:
cp ./shufflecake /usr/bin/
Check if your machine can run Shufflecake properly from your system path:
shufflecake --help
Create dummy volume for Shufflecake
For the most part, Shufflecake can work on any type of block storage device. This includes physical disks as well as logical partitions. This is useful for creating an external drive with an encrypted file system while still being accessible as a regular device.
To create a dummy volume, open the Gnome Disks utility from your application launcher, then select the drive you want to format.
Click the dotted button in the upper right corner of the window, then select Format Disk…
Click the drop-down list next to the Erase: label, then select Overwrite existing data with zeroes (Slow).
Select Format… to start the formatting process.
Once done, click the + icon to create a new partition on your drive.
Provide a partition size equal to one-fourth of your total drive capacity. This will serve as unencrypted space on the drive that you can access without Shufflecake.
Select the remaining Free Space block on the Disks utility, then click the + sign to create a new partition.
Allocate all free disk space to your dummy partition. This will allow you to create multiple hidden volumes inside your Shufflecake drive.
Initial setting of hidden Shufflecake volume
At this point, you've got Shufflecake in your system's binary directory and a dummy drive partition. To create an encrypted file system from it, you need to initially set it up in Shufflecake.
Navigate to your release folder, then load the Shufflecake kernel module on your computer:
cd ./Downloads/shufflecake-c sudo insmod dm-sflc.ko
Run lsblk to find the drive letter where you want to install Shufflecake. In this case, the example will create a hidden volume inside the dummy partition '/dev/sda2'.
Run the following command to initially set up Shufflecake for your dummy partition:
sudo shufflecake init /dev/sda2
Note: Shufflecake will only work on non-system drives. Running Shufflecake on the main drive will make your operating system unbootable.
This will run a wizard prompt where Shufflecake will ask you for details about your hidden volume. Type '5', then press Enter to create 5 hidden volumes.
Provide a password for each of your hidden volumes, then press Enter. Make sure you're in a private location before importing because the Shufflecake wizard won't hide your imports.
Note: Initialization may take 5 to 10 minutes depending on the size of your partition.
Create a file system for your hidden volume
Once done, create the file system for your hidden volumes. To do this, open the hidden volume you want to format with the following command:
sudo shufflecake open /dev/sda2
This will prompt you to enter the password for the volume you want to open.
Confirm that Shufflecake has correctly loaded your hidden volume by running lsblk.
Create the file system you want to install on your hidden volume. For example, running mkfs.fat will create a FAT file system inside 'Volume 2':
sudo mkfs.fat -F 32 /dev/mapper/sflc_0_2
Note: Volume Shufflecake acts as a virtual device inside your computer. As such, you will always find its hidden volumes in '/dev/mapper/sflc_0_n' instead of the usual '/dev'.
Ubuntu will then automatically mount the new hidden volume to your current session. To access it, click the Drive icon on the left sidebar of the screen.
Check if your file system is working properly by creating files or folders within it.
Unmount and convert hidden volumes
Unlike regular drives, unmounting a Shufflecake volume requires you to unmount the virtual volume and close its Shufflecake connection. To do this, Right Click on the drive icon on the Ubuntu taskbar, then select Unmount.
Open a new terminal, then run the following command for your drive:
sudo shufflecake close /dev/sda2
You can also switch to another part of the Shufflecake drive by running sudo shufflecake open /dev/sda2 again, then providing the appropriate password for your hidden volume.
Change password for hidden volumes
In addition to creating and loading hidden volumes, the Shufflecake utility also allows you to modify the passwords of existing volumes. To do this, open a new terminal and run the following command:
sudo shufflecake changepwd /dev/sda2
Doing this will launch a wizard that will ask you for the password of the hidden volume you want to modify. Provide a password, then press Enter.
The wizard will then prompt you to enter a new password for your hidden volume. Write the new password, then press Enter to apply the new changes.
Finally, test that the new password for your drive works correctly by running the testpwd subcommand:
sudo shufflecake testpwd /dev/sda2
You should read it
- The application to transfer data via WiFi on Android professionally
- How to Use Fraps to Take a Screen Capture
- Intel released the 10th generation H series CPUs for laptops, promising outstanding performance
- How to paste data into non-hidden cells, ignoring hidden cells
- Microsoft patch prevents Windows 10 1903 and 1090 users from updating to newer versions
- Apple denies that iPhone can be brute force to open passwords easily
- 10 ways of eye muscle training and vision enhancement are not to be missed
- What is the IP address 192.168.1.5 used for?
- Microsoft officially set the death date for Wunderlis application
- What are Zip files? How do Zip files work?
- 4 Advanced PivotTable Functions for Excel Data Analysis
- How to delete an email account from Outlook