usbarmory / interlock

INTERLOCK - file encryption and HSM front-end
Other
295 stars 46 forks source link

Failed mounting interlockfs: invalid argument #38

Closed Joonho365Han closed 6 years ago

Joonho365Han commented 6 years ago

I get the following error when I try to log into INTERLOCK: "[Interlock.Session.loginCallback] mount: mounting /dev/mapper/interlockfs on /home/interlock/.interlock-mnt failed: Invalid argument"

I compiled my own INTERLOCK img for the USB Armory. I followed the steps on the https://github.com/inversepath/usbarmory/blob/master/software/buildroot/README-INTERLOCK.md with a few changes.

First, after checking the dependencies and cloning the usbarmory and buildroot git repos:

  1. I checked out the '2017.11' branch for the buildroot repo
  2. I did not install Signal dependency for INTERLOCK because I do not intend on using it.

Now that usbarmory and buildroot git repos were downloaded, I applied the following changes:

  1. I removed mxcscc2 and interlock signal option in the extra features from buildroot menuconfig.
  2. I removed the .ssh symlink in the home/interlock from the buildroot overlay.
  3. I mkdir'ed .interlock-mnt in the home/interlock from the buildroot overlay.
  4. I removed Signal encryption option in the interlock.conf from the buildroot overlay.
  5. I added ( "hsm": "off" ) and ( "volume_group": "lvmvolume" ) in the interlock.conf from the buildroot overlay.
  6. I commented out the mscscc2 kernel module operations in the init.d/S98interlock from the buildroot overlay
  7. On the buildroot 2017.11 branch, when I opened menuconfig, the host mke2img utility became a legacy feature, so I turned it off.

After this step, I partitioned my SD card and made an ext2 file system as directed in the original installation guide. Following these steps, I am able to compile and flash the image and bring up the interlock login website. Unfortunately, when I enter the default "armory:usbarmory" credentials, I get the error I mentioned on the top.

abarisani commented 6 years ago

The mkdir of .interlock-mnt should not be necessary as the interlock process creates that directory at startup.

The default settings for "hsm" is already "off" and the default setting for "volume_group" is already "lvmvolume", no need to specify them if unchanged.

I am unsure why you are getting this error, I will try to reproduce your steps and get back to you.

abarisani commented 6 years ago

I couldn't reproduce the issue, I suggest you wipe the microSD with dd to ensure that no leftover LUKS partitions are present and repeat your attempt.

You might also want to try the latest revision of our repository (which I tested with 2017.11 both vanilla + with your modifications).

I suggest you merely disable the Signal option and leave everything else as it is.

I hope this helps, please re-open if necessary.

abarisani commented 6 years ago

We have identified the issue and we are working on it.

abarisani commented 6 years ago

The error you encountered is caused by the application of the 2017.11 branch, without accounting for changes in its binary path for mkfs.ext4.

While this issue was specific to your procedure, we updated our repository to 2017.11 (and also bumped the kernel and other dependencies) and adjusted the overlay to make it compatible:

https://github.com/inversepath/usbarmory/commit/005c6136153bd55c8a1134d9801d7b1c9361a27f

We also made a new INTERLOCK binary release with the updated buildroot environment and kernel:

https://github.com/inversepath/interlock/releases/tag/v2018.01.09