{"id":1918,"date":"2019-09-01T01:53:45","date_gmt":"2019-09-01T09:53:45","guid":{"rendered":"http:\/\/wonghoi.humgar.com\/blog\/?p=1918"},"modified":"2025-11-30T23:51:08","modified_gmt":"2025-12-01T07:51:08","slug":"bitlocker-for-linux-dislocker","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2019\/09\/01\/bitlocker-for-linux-dislocker\/","title":{"rendered":"Bitlocker for Linux (Dislocker -> Ubuntu Cinnamon Remix)"},"content":{"rendered":"<p>I regularly consolidate my disk drives to higher capacities as they are available to reduce the complexity managing many controllers, so I&#8217;ll often have to wipe the drives before I sell them (trade up). Often they are sold at very little moment&#8217;s notice, sanitizing the data might take too long. I learned that if I encrypt my data drives, I don&#8217;t really have to do much other than just clearing out the partition before I sell them, and there&#8217;s little performance penalty for Bitlocker in modern hardware.<\/p>\n<p>Right now dislocker (Linux version of bitlocker) does not have a GUI to automatically unlock and mount the encrypted drives. Here&#8217;s the script that has the form &#8220;BL_{drive name}.sh&#8221; that will unencrypt the device and mount it and at the same time creating the script in the same folder to unwind (unmount &amp; lock) the drive.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">#!\/bin\/bash\n\n# Extracting partition name from file name (BL_*.sh)\nFN_base=\"$(basename -- $0)\"\nFN_bare=\"${FN_base%.*}\"\npartition=${FN_bare\/BL_\/}\n\n# TODO: Check with \/dev to make sure it's legit\necho $partition\ndev_partition=\"\/dev\/$partition\"\n\n# Unlock the device into a raw image 'file'\npath_raw=\"\/media\/dislocker\/raw_$partition\"\nsudo mkdir -p $path_raw\n\nfile_raw=\"$path_raw\/dislocker-file\"\nsudo dislocker $dev_partition -u -- $path_raw\n\n# Mount the image file as a disk\npath_mount=\"\/media\/dislocker\/mount_$partition\"\nsudo mkdir -p $path_mount\n\nsudo mount -o loop $file_raw $path_mount\n\n# Build wind down file\nscript_unwind=\"unwind_$partition.sh\"\n# Leave \/media\/dislocker there for isolation\necho \"#!\/bin\/bash\"             &gt; $script_unwind\necho \"sudo umount $path_mount\"&gt;&gt; $script_unwind\necho \"sudo rmdir $path_mount\" &gt;&gt; $script_unwind\n# Note that the website is wrong. umount the path, not the dislocker-file\necho \"sudo umount $path_raw\"  &gt;&gt; $script_unwind\necho \"sudo rmdir $path_raw\"   &gt;&gt; $script_unwind\n# Make sure the \"$0\" is literal including the $ sign or it will\n# delete this file instead of the unwind_sd*.sh file\necho \"sudo rm -- \\\"\\$0\\\"\"     &gt;&gt; $script_unwind\nchmod +x $script_unwind\n\n\n<\/pre>\n<p><del>There are reports that newer zuluCrypt can now do bitlocker volumes. Will get back to that later.<\/del><\/p>\n\n\n<p>I tried to get zuluCrypt on Linux Mint and ran into a few quirks<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>They claim zuluCrypt after 5.7.1 and above supports Bitlocker<\/li>\n\n\n\n<li>Linux Mint 20.1 (Ulyssa)&#8217;s package repositories are conservative. It only supports up to zuluCrypt 5.7 when 6.0 is out<\/li>\n\n\n\n<li>Zulucrypt&#8217;s website says you still need dislocker backend for zuluCrypt use Bitlocker<\/li>\n\n\n\n<li>Nonetheless after these requirements are done, I cannot unlock a Bitlocker drive. The error message says it&#8217;s &#8216;missing a parameter&#8217;. What parameter?<\/li>\n\n\n\n<li>I figured that the Bitlocker malfunction might be solved with 6.0 so I tried to download the .deb files from zulucrypt&#8217;s website for 6.0. It&#8217;s missing a bunch of dependencies that are NOT SATISFIABLE, including a libqt5 dependency that&#8217;s nowhere to be found. I found the .deb file yet there&#8217;s a chain of dependencies that also cannot be found<\/li>\n\n\n\n<li>I tried to get the cryptsetup (LUKS) referred by Zulycrypt&#8217;s website but it has its down dependencies problem<\/li>\n\n\n\n<li>So to install zulycrypt 6.0, I have no easy option other than moving to Ubuntu.<\/li>\n\n\n\n<li>I chose Mint because Ubuntu&#8217;s UI defaults are annoying to Windows users from my previous experiences, the glitches and a lot of missing options in their default GUI programs frustrates me.<\/li>\n\n\n\n<li>So I wondered if I can install Cinnamon (Mint&#8217;s core interface) on Ubuntu so I can get the latest and the greatest packages without waiting for the authority of Linux Mint to implement them.<\/li>\n<\/ul>\n\n\n\n<p>Turns out there&#8217;s already a linux distro that&#8217;s uses Cinnamon on Ubuntu by default! It&#8217;s called &#8220;<a href=\"https:\/\/www.google.com\/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwiR6va1h7nwAhVF6Z4KHV-xDbIQFjAOegQIChAD&amp;url=https%3A%2F%2Fubuntucinnamon.org%2F&amp;usg=AOvVaw1gM6zXFfW3A3QtO8oUgeWR\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu Cinnamon Remix<\/a>&#8220;! Even better, after I&#8217;ve installed it, I realized I don&#8217;t have to muck with dislocker\/zulucrypt\/cryptsetup\/LUKS at all! Bitlocker just work right out of the box! When you click on the Bitlocker encrypted volume, it will prompt you for the password and that&#8217;s it!<\/p>\n\n\n\n<p>FULL DISK ENCRYPTION IS BUILT IN Ubuntu Cinnamon Remix 20.04!<\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_1918\" class=\"pvc_stats all  \" data-element-id=\"1918\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>I regularly consolidate my disk drives to higher capacities as they are available to reduce the complexity managing many controllers, so I&#8217;ll often have to wipe the drives before I sell them (trade up). Often they are sold at very &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2019\/09\/01\/bitlocker-for-linux-dislocker\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1918\" class=\"pvc_stats all  \" data-element-id=\"1918\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[39,6],"tags":[],"class_list":["post-1918","post","type-post","status-publish","format-standard","hentry","category-linux","category-note-to-self"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":5,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"predecessor-version":[{"id":6660,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1918\/revisions\/6660"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}