How to Create Hidden Filesystems in Linux with Shufflecake

by Isai Mills
15 minutes read

How to Create Hidden Filesystems in Linux with Shufflecake

A photograph of a padlock on optimal of a laptop computer system key-board.

Shufflecake is a humble, yet highly sound filesystem security utility for Linux. Unlike customary disk security units, Shufflecake works by not single fastening the information inside a filesystem but additionally hiding it from the product itself. This write-upwards will unquestionably depict you how to mount Shufflecake on Ubuntu to architecture and also preserve a latent and also encrypted filesystem in Linux.

Web content
  • Plunking Shufflecake
  • Gaining the Dummy Volume for Shufflecake
  • Initializing the Undetected Shufflecake Volume
  • Unmounting and also Switching Undetected Volumes
  • Amending the Password For Your Undetected Volumes

Plunking Shufflecake

The first answers in receiving Shufflecake is to mount its dependences in your product. To execute that, sprinted the functioning along with command:

sudo apt install linux-headers-$(uname -r) libdevmapper-dev libgcrypt-dev make gcc

Bring the latest exit tarball from the project’s Codeberg page.

A screenshot of the tarball download for Shufflecake on the programmer's Codeberg page.

Surf to your computer system’s Downloads magazine, then remove the exit archive manipulating Tar:

tar xzf ./Downloads/v0.4.4.tar.gz

FYI: uncover how to unzip Tar documents on Linux manipulating both graphical and also terminal-based equipments.

Amenable the folder for the Shufflecake source code, then sprinted the functioning along with command to compile its binary on your product:

cd ./Downloads/shufflecake-c make

Note: assembling Shufflecake can collar between 2 to 5 minutes counting on your computer system’s product resources.

Duplicate Shufflecake from the exit folder to your computer system’s binary training course:

cp ./shufflecake /usr/bin/

Ponder if your equipment can fully sprinted Shufflecake from your product’s training course:

shufflecake --help

Gaining the Dummy Volume for Shufflecake

For the the majority of segment, Shufflecake can job on any kind of kind of block storage void equipment. This requires physical disks also as justifiable dividings. This supplies it justifiable for amassing an outside disk with an encrypted filesystem while still being accessible as a invariant equipment.

To architecture a dummy volume, responsive the Gnome Disks utility from your prayer launcher, then pick the disk that you twinge to format.

A screenshot stressing the outside disk that will unquestionably abode the latent Shufflecake volumes.

Click the populated switch on the dwelling window’s upper relevant edge, then pick Format Disk…

A screenshot stressing the "Format Disk..." recourse on the Gnome Disks utility for the outside disk.

Click the dropdown checklist beside the Delete: tag, then pick Overwrite existing information with nos (Slow-moving).

A screenshot stressing the "Overwrite existing information with nos" recourse on the Gnome Disks utility.

Pick Format… to prelude the format strategy.

As rapidly as done, click the + icon to architecture a brand-new dividing on your disk.

A screenshot stressing the "+" icon for adding a brand-new dividings in disks.

Provision a dividing size that’s a quarter of your unshortened amount disk space. This will unquestionably offer as your disk’s unencrypted space that you can relieve of access without Shufflecake.

A screenshot of the dividing size slider for the outside disk in Gnome Disks utility.

Pick the remaining Preserve Freedom block on the Disks utility, then click the + to architecture a brand-new dividing.

A screenshot stressing the remaining conserve disk space on the outside disk.

Assign the entire conserve disk space to your dummy dividing. This will unquestionably permit you to architecture multiple latent volumes inside your Shufflecake disk.

Sweet to expired upwards being aware: uncover how to architecture your very own custom dividings in Linux.

Initializing the Undetected Shufflecake Volume

At this determinant, you presently have Shufflecake in your product’s binary folder and also a dummy disk dividing. To architecture your encrypted filesystem out of it, you need to initialize it in Shufflecake.

Surf to your exit folder, then caboodles the Shufflecake miniscule fragment module on your computer system:

cd ./Downloads/shufflecake-c sudo insmod dm-sflc.ko

Run lsblk to uncover the tag of the disk that you twinge to mount Shufflecake on. In my vessel, I will unquestionably architecture a latent volume inside my dummy dividing “/dev/sda2.”

A screenshot confirming the sda2 dummy dividing in lsblk.

Run the functioning along with command to initialize Shufflecake for your dummy dividing:

sudo shufflecake init /dev/sda2

Note: Shufflecake will unquestionably single job on non-product disks. Rushing Shufflecake on your major disk will unquestionably administer your OS unbootable.

This will unquestionably sprinted a wizard expeditious where Shufflecake will unquestionably ask you for the niceties of your latent volume. Kind “5”, then press Enter to architecture five latent volumes.

Provision the password for each of your latent volumes, then press Enter. Render sure that you’re in a unique space previously keying it offered that the Shufflecake wizard will unquestionably not hide your input.

A screenshot confirming the unlike idiosyncrasy passwords for each of the initialized latent volumes in Shufflecake.

Note: the initialization strategy can collar between 5 to 10 minutes counting on the size of your dividing.

Gaining a Filesystem for Your Undetected Volume

As rapidly as done, architecture the filesystem for your latent volumes. To execute this, responsive the latent volume that you twinge to format manipulating the functioning along with command:

sudo shufflecake open /dev/sda2

Doing this will unquestionably expeditious you for the password of the volume that you twinge to responsive.

A screenshot stressing the idiosyncrasy password for the latent

Attest that Shufflecake fully packed your latent volume by sprinting lsblk.

A screenshot stressing the equipment training course for the latent "Volume 2" in the product.

Generate the filesystem that you twinge to mount on your latent volume. For instance, sprinting mkfs.fat will unquestionably architecture a FAT filesystem inside “Volume 2”:

sudo mkfs.fat -F 32 /dev/mapper/sflc_0_2

Note: Shufflecake volumes act as virtual machines inside your computer system. As such, you will unquestionably habitually uncover its latent volumes under “/dev/mapmaker/sflc_0_n” instead of the invariant “/dev.”

After that, Ubuntu need to relevant away mount your brand-new latent volume to your existing session. To relieve of access it, click the Drive icon on the desktop computer’s vacated sidebar.

A screenshot stressing the freshly formatted latent "Volume 2."

Test whether your filesystem is kneading fully by amassing either a record or folder inside it.

Unmounting and also Switching Undetected Volumes

Unlike invariant disks, ejecting a Shufflecake volume needs you to both unmount the virtual drive and also comfy its Shufflecake relation. To execute this, press Right Click on the drive’s icon on the Ubuntu taskbar then pick Unmount.

A screenshot stressing the "Unmount" recourse on the freshly formatted latent "Volume 2."

Amenable a brand-new terminal session, then sprinted the functioning along with command for your disk:

sudo shufflecake close /dev/sda2

You can additionally switch to a unlike segment of your Shufflecake disk by re-sprinting sudo shufflecake open /dev/sda2, then administering the useful password for your latent volume.

Amending the Password For Your Undetected Volumes

Withdrawn from amassing and also loading latent volumes, the Shufflecake utility additionally allows you to readjust the passwords of existing volumes. To execute this, responsive a brand-new terminal session then sprinted the functioning along with command:

sudo shufflecake changepwd /dev/sda2

Doing this will unquestionably prelude a wizard that will unquestionably ask you for the password of the latent volume that you twinge to readjust. Provision the password, then press Enter.

The wizard will unquestionably then expeditious you for a brand-new password for your latent volume. Build the brand-new password, then press Enter to use the brand-new readjusts.

A screenshot confirming the brand-new idiosyncrasy password for the latent "Volume 2."

Last but not the poorly least, analyze whether your brand-new password for your volume works fully by sprinting the testpwd subcommand:

sudo shufflecake testpwd /dev/sda2
A screenshot confirming the testpwd subcommand efficiently sprinting on the brand-new "Volume 2" password.

Gaining and also growing latent filesystems in outside drives is simply the first answers in remarking the planet of information coverage and also seclusion. Figure out out how to architecture encrypted documents in your filesystem with Tomb.

Image credit rating: FlyD via Unsplash, Shufflecake Makers, and also Wikimedia Commons. Unanimously renovations and also screenshots by Ramces Red.

Related Posts