-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Article on mounting veracrypt partiton in OpenBSD (#43)
Article on mounting veracrypt partiton in OpenBSD
- Loading branch information
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<!doctype html> | ||
<!-- Author email: [email protected]> | ||
<html lang=ru> | ||
<meta charset=utf-8> | ||
|
||
<title>Как примонтировать раздел зашифрованный veracrypt в OpenBSD</title> | ||
|
||
<meta name="viewport" content="width=device-nwidth, initial-scale=1" /> | ||
<link rel="stylesheet" type="text/css" href="../../openbsd.css"> | ||
|
||
<style> | ||
.scsi { | ||
color: var(--green); | ||
} | ||
</style> | ||
|
||
<h2 id=OpenBSD> | ||
<a href="../../index.html"> | ||
<i>Open</i><b>BSD</b></a> | ||
Как примонтировать раздел зашифрованный veracrypt в OpenBSD | ||
</h2> | ||
|
||
|
||
<hr> | ||
<ul> | ||
<li><a href="#Abstract"> Предисловие</a></li> | ||
<li><a href="#FirstStage">Первый этап</a></li> | ||
<li><a href="#SecondStage">Второй этап</a></li> | ||
</ul> | ||
<hr> | ||
|
||
<h3 id="Abstract">Предисловие</h3> | ||
|
||
<p> | ||
Кратко: В два этапа. Сначала примонтировать раздел как виртуальный | ||
диск на файле. То есть pseudo-device | ||
vnd(<a href="https://man.openbsd.org/vnd.4">4</a>). | ||
</p> | ||
|
||
<p> | ||
Затем, примонтировать файловую систему с этого виртуального диска на | ||
файле. В данном случае это может быть FAT32, exfat, ntfs-3g | ||
</p> | ||
|
||
<h3 id="FirstStage">Первый этап</h3> | ||
|
||
<p> | ||
Монтируем зашифрованный диск, без указания файловой системы. | ||
</p> | ||
|
||
<pre class="cmdbox"> | ||
doas veracrypt --text \ | ||
--mount /dev/sd2i \ | ||
--password=my_simple_pass \ | ||
--filesystem=none \ | ||
--verbose | ||
</pre> | ||
|
||
<p> | ||
Если veracrypt сам не распознает данных вначале раздела, | ||
то вам об этом сообщит, и статус завершения команды будет не равен нулю. | ||
Однако это актуально для случая без стеганографии. | ||
Про работу veracrypt с разделом защищенным стеганографией что-то добавить пока не могу. | ||
</p> | ||
|
||
<p> | ||
Если команда выполнилась успешно, то смотрим список примонтированных | ||
veracrypt разделов. | ||
</p> | ||
|
||
<pre class="cmdbox"> | ||
doas veracrypt --text --list --verbose | ||
</pre> | ||
|
||
<p> | ||
Будет выведено перечисление примонтированных разделов. В моём | ||
упрощенном случае тут только один раздел и он примонтирован как файл | ||
виртуального диска. | ||
Местоположение файла смотрим в строке, начинающейся со словосочетания Virtual Device. | ||
|
||
<pre class="cmdbox"> | ||
doas veracrypt --text --list --verbose | grep "Virtual Device" | ||
</pre> | ||
|
||
<h3 id="SecondStage">Второй этап</h3> | ||
|
||
<p> | ||
В моём случае, внутри зашифрованного раздела veracrypt находился | ||
раздел с файловой системой ntfs. | ||
</p> | ||
|
||
<p> | ||
Монтирую её с помощью ntfs-3g из портов. Указываю uid своего | ||
пользователя, чтобы дальше не приходилось повышать права с помощью doas. | ||
Если вам файловой системы хватит и в режиме read-only, то можно | ||
использовать | ||
mount_ntfs(<a href="https://man.openbsd.org/mount_ntfs">8</a>) | ||
из базовой системы. | ||
</p> | ||
|
||
<pre class="cmdbox"> | ||
ntfs-3g -o uid=1000 /dev/vnd0c /mnt/disk | ||
</pre> | ||
|
||
И это все. Работать с зашифрованными дисками не так уж сложно. |