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
- 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?
May be interested
- How to create USB Boot Live Kali Linuxthe most popular and fastest way to apply kali linux is to run it from a usb drive. this method has many advantages. to do this, we first need to create a bootable usb drive from an iso image of kali linux.
- How to create dual boot Linux and Windows 10 on Linuxmany people think that creating dual boot is easy for operating systems like linux mint or ubuntu, where everything is handled in the installation tool. the fact that this setup can easily be implemented on most versions of the linux operating system on the market using a simple tool. you can create dual boot linux and windows 10 regardless of which linux operating system you are running.
- How to Show Hidden Files in Linuxjust starting out in linux and can't see your secret/configuration files in the file manager? having the same problem while using the terminal emulator? here's the answer. open the file manager.
- How to hide files and folders on Windows / Linux / Mac OS X operating systemshiding a file / folder simply means that a normal file / folder is set to 'hidden'. a few tricks to help you keep data confidential.
- How to create system information file in Windows 10this tutorial will show you how to create an msinfo.nfo file to upload to forums, allowing other members to view system information in the same user interface as you see on your own pc.
- How to modify and manage Hosts files on Linuxif you need to block web pages or create personalized web shortcuts on linux, solve these tasks by adding or adjusting a few lines in the hosts file.
- How to hide files, show hidden files, view hidden folders and file extensions on Windows 7/8/10?to view hidden files, display file extensions or hide system files on windows is quite simple. readers can see the instructions for displaying hidden files, see the file extension in this article.
- How to create new files in Linuxthere are a number of different linux applications and commands that will create new files for you, even without launching the application. the method you use will depend on your purpose for the file. let's take a look at the options so you can see which one is most useful for you!
- Which file system should be used for removable storage devicesin the tutorial article below, we will learn about some concepts related to file system - file system for use with portable storage devices. in essence, file systems are extremely important components in an operating system, assigned by the user account ...
- Your Linux system can be hacked just by opening a file in Vim or Neovim Editorif you haven't updated your linux operating system recently, especially the command line text editor, don't even try to access the contents of the file via vim or neovim, pay attention, your system is complete all can be hacked.