Armadilloフォーラム

タイムゾーンをtimedatectlだけ変更できなくなった

kumikoohashi

2022年12月8日 20時07分

いつもお世話になっております。
Armadillo-IoT G3 M1で、x1-debian-builderやカーネルなどのバージョンをあげたら、
タイムゾーンをtimedatectlだけ変更できなくなってしまいました。

$ timedatectl set-timezone Asia/Tokyo
こうすると以下のエラーに。aotなどは最新にupdate、upgrageしています。
Failed to set time zone: Access denied

/etc/localtimeを削除して、
/usr/share/zoneinfo/Asia/Tokyoにリンクをはることで、
エラーが出なくなり、タイムゾーンをかえることはできました。

$ rm /etc/localtime
$ ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
$ timedatectl set-timezone Asia/Tokyo

インストールディスクの作成に使用したソフトウェアのバージョンは以下になります。
組み合わせが悪いのでしょうか。それとも何か別の原因が考えられますか。

ATDE7
x1-debian-builder-v2.3.0
debian-stretch-armhf

u-boot-x1-at23.bin
uImage-x1-v4.9-at25
armadillo_iotg_g3_m1-v4.9-at25.dtb

宜しくお願い致します。

コメント

at_dominique.m…

2022年12月9日 12時21分

kumikoohashiさん

お世話になっています、
マルティネです。

> $ timedatectl set-timezone Asia/Tokyo
> こうすると以下のエラーに。aotなどは最新にupdate、upgrageしています。
> Failed to set time zone: Access denied

大変失礼ですが、timedatectl コマンドをどのユーザーから実行していたんでしょうか?
このコマンドに root 権限が必要ですので、atmark ユーザーから timedatectl を使用する場合にこのエラーが出力されます。

timedatectl は systemd によって systemd-timedated を起動させてそのプロセスにリンクを変更させるだけですので、手動でリンクを削除できた場合でしたら systemd-timedated もできたと思いますので、他のエラーはあまり思いつきません。
コマンドを実行したユーザーの確認をいただきましたらもう少し調べてみようと思います。

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

kumikoohashi

2022年12月9日 20時07分

マルティネ様

ご回答ありがとうございます。
情報が足らず、申し訳ありません。

>大変失礼ですが、timedatectl コマンドをどのユーザーから実行していたんでしょうか?
>このコマンドに root 権限が必要ですので、atmark ユーザーから timedatectl を使用する場合にこのエラーが出力されます。

rootで実行しています。

それまでに利用していたインストールディスクでは問題なく実行できていました。
x1-debian-builder-v2.2.0、iotg3_m1 u-boot-x1-at21.bin、uImage-x1-v4.9-at19、armadillo_iotg_g3_m1-v4.9-at19.dtbで作成したものです。

宜しくお願い致します。

at_dominique.m…

2022年12月14日 13時30分

kumikoohashiさん

お待たせしました。

> rootで実行しています。

ご確認ありがとうございました。

> それまでに利用していたインストールディスクでは問題なく実行できていました。
> x1-debian-builder-v2.2.0、iotg3_m1 u-boot-x1-at21.bin、uImage-x1-v4.9-at19、armadillo_iotg_g3_m1-v4.9-at19.dtbで作成したものです。

x1-debian-builder-v2.2.0 では pgp.nic.ad.jp のサービス停止のためビルドが失敗しますので、再現しようと思っていましたがこのビルドでは確認できなかった。
そのバージョンではインストールが失敗しちえも、スクリプト全体のエラーはありませんのでもしかしたら不完全なイメージを使用していますか?
build.sh のログが残っていたら、以下の様にいくつかのエラーが出力されます:

Executing: /tmp/apt-key-gpghome.LZ3ant8YZr/gpg.1.sh --keyserver pgp.nic.ad.jp --recv-keys 3874DA771B351757
gpg: keyserver receive failed: No route to host
...
W: GPG error: http://download.atmark-techno.com/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3874DA771B351757
W: The repository 'http://download.atmark-techno.com/debian stretch Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
...
WARNING: The following packages cannot be authenticated!
  libmm-glib0 modemmanager pds6j-utils atmark-x1-base ec25-utils
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
/resources/fixup: 15: /resources/fixup: locale-gen: not found
sed: can't read /etc/locale.gen: No such file or directory
/resources/fixup: 17: /resources/fixup: locale-gen: not found
 
Current default time zone: 'Etc/UTC'
Local time is now:      Mon Dec 12 06:45:07 UTC 2022.
Universal Time is now:  Mon Dec 12 06:45:07 UTC 2022.
 
cp: cannot create regular file '/etc/udev/rules.d/': No such file or directory
cp: cannot create regular file '/etc/NetworkManager/NetworkManager.conf': No such file or directory
ln: failed to create symbolic link '/etc/systemd/network/99-default.link': No such file or directory
passwd: password expiry information changed.
passwd: password expiry information changed.

(このイメージで起動できないと思います)

2.3.0でビルドしてみましたが、ビルドした後に apt update && apt upgrade でアップデートしてみても timedatectl で timezone を変更できました。

お手数ですが、バージョンを確認して 2.3.0 でまた再現できましたらそのビルドログを添付していただけたら助かります。

よろしくお願いします

at_dominique.m…

2022年12月19日 10時44分

kumikoohashiさん

お世話になっています。
x1-debian-builder のバージョンの他、 https://armadillo.atmark-techno.com/forum/armadillo/13842 で /etc が間違って atmark ユーザーの物になっていることが分かりました。

新しい x1-debian-builder をリリースしたらまたご連絡致しますが、それまでに /etc を root: に chown していただけたら問題が解決されると思います。
( /etc の他、 /etc/apt と /etc/apt/trusted.gpg.d、etc/apt/trusted.gpg.d/atmark-key.gpg も root に変更することを推奨します。)

お手数をおかかしました、
よろしくお願いします。

kumikoohashi

2022年12月21日 21時30分

お世話になっております。

調査していただいてありがとうございました。
再度x1 debian builderでビルドしてログを書き出したところでして、返信が遅れて申し訳ありません。

判明した原因と、当面の解決方法のご案内、ありがとうございます。
しばらくはそのように運用させていただきます。

宜しくお願い致します。