Armadilloフォーラム

USBメモリの暗号化

takuya.murasugi

2017年6月8日 11時47分

お世話になります。村杉と申します。

Armadillo-IoT G3にUSBメモリを挿して、データをUSBメモリに蓄えています。
USBメモリを他のPCから見れなくするために暗号化を掛けたいと考え、
cryptsetupをArmadillo-IoT G3上でインストールしたところ、
インストール途中でエラーになってしまいます。

【ログ①】下部に記載します。

initramfs-tools_0.120+deb8u2_all.debを探したのですが、
initramfs-tools_0.120+deb8u3_all.debしか見当たらなくdpkg -iコマンドで
initramfs-tools_0.120+deb8u3_all.debパッケージをインストールしたところ
エラーになってしまいます。

【ログ②】下部に記載します。

どなたかArmadillo-IoT G3上にcryptsetupをインストールされた方、
もしくはUSBメモリを他の方法で暗号化を行っている方がいらっしゃいましたら
アドバイスを頂けないでしょうか?

よろしくお願いいたします。

-----------------------------------------------------------------------------------------------
【ログ①】
root@armadillo:~# apt-get install cryptsetup
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
busybox console-setup console-setup-linux cpio cryptsetup-bin
initramfs-tools kbd keyboard-configuration klibc-utils libklibc xkb-data
Suggested packages:
libarchive1 keyutils
The following NEW packages will be installed:
busybox console-setup console-setup-linux cpio cryptsetup cryptsetup-bin
initramfs-tools kbd keyboard-configuration klibc-utils libklibc xkb-data
0 upgraded, 12 newly installed, 0 to remove and 3 not upgraded.
Need to get 3886 kB of archives.
After this operation, 14.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.jp.debian.org/debian/ jessie/main kbd armhf 1.15.5-2 [302 kB]
Get:2 http://ftp.jp.debian.org/debian/ jessie/main keyboard-configuration all 1.123 [766 kB]
Get:3 http://ftp.jp.debian.org/debian/ jessie/main console-setup-linux all 1.123 [984 kB]
Get:4 http://ftp.jp.debian.org/debian/ jessie/main xkb-data all 2.12-1 [597 kB]
Get:5 http://ftp.jp.debian.org/debian/ jessie/main console-setup all 1.123 [128 kB]
Get:6 http://ftp.jp.debian.org/debian/ jessie/main cpio armhf 2.11+dfsg-4.1+deb8u1 [166 kB]
Get:7 http://ftp.jp.debian.org/debian/ jessie/main busybox armhf 1:1.22.0-9+deb8u1 [367 kB]
Get:8 http://ftp.jp.debian.org/debian/ jessie/main cryptsetup-bin armhf 2:1.6.6-5 [174 kB]
Get:9 http://ftp.jp.debian.org/debian/ jessie/main cryptsetup armhf 2:1.6.6-5 [158 kB]
Get:10 http://ftp.jp.debian.org/debian/ jessie/main libklibc armhf 2.0.4-2 [49.5 kB]
Get:11 http://ftp.jp.debian.org/debian/ jessie/main klibc-utils armhf 2.0.4-2 [97.5 kB]
Err http://ftp.jp.debian.org/debian/ jessie/main initramfs-tools all 0.120+deb8u2
404 Not Found
Fetched 3790 kB in 10s (362 kB/s)
E: Failed to fetch http://ftp.jp.debian.org/debian/pool/main/i/initramfs-tools/initramfs-t… 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

-----------------------------------------------------------------------------------------------
【ログ②】
root@armadillo:~/rpm# wget http://ftp.jp.debian.org/debian/pool/main/i/initramfs-tools/initramfs-t…
converted 'http://ftp.jp.debian.org/debian/pool/main/i/initramfs-tools/initramfs-t…' (ANSI_X3.4-1968) -> 'http://ftp.jp.debian.org/debian/pool/main/i/initramfs-tools/initramfs-t…' (UTF-8)
--2017-06-08 10:38:55-- http://ftp.jp.debian.org/debian/pool/main/i/initramfs-tools/initramfs-t…
Resolving ftp.jp.debian.org (ftp.jp.debian.org)... 133.87.45.30
Connecting to ftp.jp.debian.org (ftp.jp.debian.org)|133.87.45.30|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 96728 (94K) [application/x-debian-package]
Saving to: 'initramfs-tools_0.120+deb8u3_all.deb'

initramfs-tools_0.120+ 100%[============================>] 94.46K --.-KB/s in 0.04s

2017-06-08 10:38:55 (2.11 MB/s) - 'initramfs-tools_0.120+deb8u3_all.deb' saved [96728/96728]

root@armadillo:~/rpm# dpkg -i initramfs-tools_0.120+deb8u3_all.deb
Selecting previously unselected package initramfs-tools.
(Reading database ... 23897 files and directories currently installed.)
Preparing to unpack initramfs-tools_0.120+deb8u3_all.deb ...
Unpacking initramfs-tools (0.120+deb8u3) ...
dpkg: dependency problems prevent configuration of initramfs-tools:
initramfs-tools depends on klibc-utils (>= 2.0-1~); however:
Package klibc-utils is not installed.
initramfs-tools depends on cpio; however:
Package cpio is not installed.
initramfs-tools depends on klibc-utils (>= 2.0.4-1.2~) | busybox (>= 1:1.01-3) | busybox-initramfs | busybox-static; however:
Package klibc-utils is not installed.
Package busybox is not installed.
Package busybox-initramfs is not installed.
Package busybox-static is not installed.

dpkg: error processing package initramfs-tools (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.0.2-5) ...

Errors were encountered while processing:
initramfs-tools
-----------------------------------------------------------------------------------------------

コメント

at_koseki

2017年6月8日 12時41分

古関です。

# apt-get update
を実行した後、

# apt-get install cryptsetup
でインストールできないでしょうか。

よろしくおねがいします。

takuya.murasugi

2017年6月8日 13時59分

村杉です。

ご回答ありがとうございます。
apt-get install cryptsetupを実行しましたがエラーが発生します。

root@armadillo:~# apt-get install cryptsetup
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
cryptsetup : Depends: cryptsetup-bin (>= 2:1.6.0) but it is not going to be installed
Recommends: kbd but it is not going to be installed
Recommends: console-setup but it is not going to be installed
Recommends: busybox or
busybox-static but it is not going to be installed
initramfs-tools : Depends: klibc-utils (>= 2.0-1~) but it is not going to be installed
Depends: cpio but it is not going to be installed
Depends: klibc-utils (>= 2.0.4-1.2~) but it is not going to be installed or
busybox (>= 1:1.01-3) or
busybox-initramfs but it is not installable or
busybox-static but it is not going to be installed
Recommends: busybox (>= 1:1.01-3) or
busybox-initramfs but it is not installable or
busybox-static but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

よろしくお願いいたします。

以上

takuya.murasugi

2017年6月8日 14時39分

村杉です。

すみません。
dpkgコマンドでインストールを試みたinitramfs-tools(deb8u3)がインストールされていたようで、
以下のコマンドで削除し、
# dpkg -r initramfs-tools

# apt-get update
# apt-get install cryptsetup

で無事にインストールできました。

ご教授いただきありがとうございました。

以上

at_koseki

2017年6月8日 14時41分

古関です。

> apt-get install cryptsetupを実行しましたがエラーが発生します。
> ...
> You might want to run 'apt-get -f install' to correct these:

# apt-get -f install
# apt-get install cryptsetup

でインストールできないでしょうか。

こちらでも試してみましたが、問題なくインストール・cryptsetupの動作ができました。

ただ、パッケージを入れるだけではダメで、
いくつかカーネルコンフィギュレーションを変更する必要があるようです。

下記のカーネルコンフィギュレーションを変更して、ビルドしたuImageをG3Lに書き込んでください。
-----------------------------------------------------------------------
Device Drivers --->
[*] Multiple devices driver support (RAID and LVM) --->
<*> Device mapper support
<*> Crypt target support

[*] Cryptographic API --->
<*> XTS support
<*> SHA224 and SHA256 digest algorithm
<*> AES cipher algorithms
<*> AES cipher algorithms (ARM-asm)
<*> User-space interface for symmetric key cipher algorithms
--------------------------------------------------------------------------

後はwebで検索して出てきたベージを参考に動かせました。
http://www.usupi.org/sysad/186.html

takuya.murasugi

2017年6月8日 14時47分

村杉です。

> でインストールできないでしょうか。
> こちらでも試してみましたが、問題なくインストール・cryptsetupの動作ができました。

すみません。入れ違いになってしまいましたが、インストールできました。

> ただ、パッケージを入れるだけではダメで、
> いくつかカーネルコンフィギュレーションを変更する必要があるようです。
>
> 下記のカーネルコンフィギュレーションを変更して、ビルドしたuImageをG3Lに書き込んでください。
> -----------------------------------------------------------------------
> Device Drivers --->
> [*] Multiple devices driver support (RAID and LVM) --->
> <*> Device mapper support
> <*> Crypt target support
>
> [*] Cryptographic API --->
> <*> XTS support
> <*> SHA224 and SHA256 digest algorithm
> <*> AES cipher algorithms
> <*> AES cipher algorithms (ARM-asm)
> <*> User-space interface for symmetric key cipher algorithms
> --------------------------------------------------------------------------
>
> 後はwebで検索して出てきたベージを参考に動かせました。
> http://www.usupi.org/sysad/186.html

ありがとうございます。
上記手順で試してみたいと思います。

以上