なかのにっき

最新版はこちら。 突っ込みは各日付の BBS エントリのほか、 メール (nakano@st.seikei.ac.jp) や フォーム からどうぞ。 なおスパム除けのため、BBS 機能には 緩い認証を入れて います。 検索エンジンから来た方は、エンジンの方のキャッシュを見るか、 下の簡易検索を試してみてください。


hns - 日記自動生成システム - Version 2.19.5

先月 2025年12月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2025年12月07日() [n年日記]

#1 TR6143 の python 制御 (Windows)

まさか TR6143 をまだ使うことになるとは思っていなかったんだが (^_^;

ポテンショスタットへの基準電圧供給をプログラム制御したいということで、 mV 単位で電圧発生できるバイポーラ電源を物色していたのだけれど、 なかなかよいものがなく、登場いただくこととなった。

python のインストール:

anaconda は環境が重いので、python.org のバイナリを入れる。いまは Windows Store から Python Install Manager を入れるのが推奨のようなのでそうする。

ダウンロードして実行。
Welcome to the Python installation manager configuration helper.

********************************************************************************

Windows is not configured to allow paths longer than 260 characters.

Python and some other apps can exceed this limit, but it requires changing a
system-wide setting, which may need an administrator to approve, and will
require a reboot. Some packages may fail to install without long path support
enabled.
Update setting now? [y/N]
に対して Y と入力。これは admin 権限がいるのね。
********************************************************************************

The global shortcuts directory is not configured.

Configuring this enables commands like python3.14.exe to run from your
terminal, but is not needed for the python or py commands (for example, py
-V:3.14).

We can add the directory (C:\Users\nakano\AppData\Local\Python\bin) to PATH
now, but you will need to restart your terminal to use it. The entry will be
removed if you run py uninstall --purge, or else you can remove it manually when
uninstalling Python.
Add commands directory to your PATH now? [y/N]
********************************************************************************

You do not have the latest Python runtime.

Install the current latest version of CPython? If not, you can use 'py install
default' later to install.

Install CPython now? [Y/n]
にもそれぞれ Y と入力。

view online help? [y/N]
に Y と答えたら、 4. Using Python on Windows が出た。

またターミナルのコマンドプロンプトを開いて
C:\Users\nakano>python3 --version
Python 3.14.2
と出たので、これでインストールは完了した模様。らくちん。
コメント [全部読む/投稿する]

2025年11月21日(金) [n年日記]

#1 Debian trixie の 13.1→13.2 で grub の EFI ブートローダが壊れたので復旧した

家の NUC PC に trixie を入れ、squid と家 PC のバックアップ先にしていたのだが、13.2 にしてから起動しなくなった。

これは SATA の SSD なので、ひとまず UGREEN の USB3-SATA アダプタ を買い、disk を生きている Linux ホストに接続。 各パーティションは無事に見えたので、
sudo mount -rt ext4 /dev/sdc2 /mnt/mnt_sdc2
でマウントし、
sudo rsync -aHAXv --numeric-ids --info=progress2 \
  --ignore-errors --partial --dry-run \
  --exclude='/proc/*' --exclude='/sys/*' --exclude='/dev/*' \
  --exclude='/run/*'  --exclude='/tmp/*' --exclude='/mnt/*' \
  --exclude='/lost+found/*' --exclude='/home/nakano/Dropbox/*' \
  /mnt/mnt_sdc2/ /opt/backup_atom/
で中身をバックアップ。

その後は ChatGPT さんに聞いて復旧。
sudo mount -rwt vfat /dev/sdc1 /mnt/mnt_sdc2/boot/efi
chroot する
sudo mount --bind /dev  /mnt/mnt_sdc2/dev
sudo mount --bind /proc /mnt/mnt_sdc2/proc
sudo mount --bind /sys  /mnt/mnt_sdc2/sys
sudo mount --bind /run  /mnt/mnt_sdc2/run

sudo chroot /mnt/mnt_sdc2 /bin/bash
その後 grub-install を実行
# grub-install --target=x86_64-efi --efi-directory=/boot/efi \
  --bootloader-id=debian --recheck
Installing for x86_64-efi platform.
grub-install: warning: EFI variables cannot be set on this system.
grub-install: warning: You will have to complete the GRUB setup manually.
Installation finished. No error reported.
この段階で chroot を抜け、下流から /mnt/mnt_sdc2 まで umount し、 SSD を取り外して NUC に再接続。

付いで(このステップが必要だったかどうかはわからないが)、 trixie の installer usb で NUC wo起動し、rescue モードのコンソールに抜け、 /target に chroot して /boot/efi/EFI/debian に grubx64.efi が、 /boot/efi/EFI/BOOT に BOOTX64.EFI があるのを確認。 一応
update-grub
しておき、usb を抜いて NUC を起動したら、grub コンソールが立ち上がった。
grub> ls
(hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3)
という具合で、
grub> ls (hd0,gpt2)/
でちゃんと /etc や /boot が見えて、 /boot に vmlinuz-*-amd64 と initrd.img-*-amd64 が入っていることも確認できた。
grub> set root=(hd0,gpt2)
grub> linux /boot/vmlinux-6.12.57+deb13-amd64 root=/dev/sda2 ro
grub> initrd  /boot/initrd.img-6.12.57+deb13-amd64
grub> boot
すると、ちゃんと trixie のシステムが起動した。

そんで
sudo grub-install --target=x86_64-efi \
  --efi-directory=/boot/efi --bootloader-id=debian --recheck
sudo update-grub
sudo efibootmgr -c -d /dev/sda -p 1 -L "debian" -l '\EFI\debian\grubx64.efi'
して installer usb も抜いて再起動したら、 普通に debian のログインプロンプトが出た。やれやれ。

upgrade 前後のチェック用のスクリプトも作ってもらったのでこちらに。 grub-efi-check.sh

アップグレードの前後に
sudo grub-efi-check.sh pre
(upgrade)
sudo grub-efi-check.sh post
という感じで使うとよいそうです。

以上の全会話はこちらに貼る。
rsync オプション提案
コメント [全部読む/投稿する]

2025年10月08日(水) [n年日記]

#1 Zoom/Teams のマシンインストール

今日学外の方(というかシュルズ先生)と Zoom ミーティングをしたのだけど、 研究室のデスクトップに一般ユーザでログオンしたら Zoom がなかった、ということであった。ごめん。

ZoomInstaller.exe は、実行ユーザの Appdata\Roaming\ 以下にバイナリを入れるので、PC 全体に入れるためには ZoomInstallerFull.msi を使わねばならない、ということであった。 それらは Zoom Support:Zoom installers にあった。

ついでに Teams もなぜか 1.4 の古いのが入っちゃうのはなぜかしら…と思っていたら、これは(たぶん Office が)Teams Machine-Wide Installer をシステムに入れ、こいつがユーザのログインごとに 1.4 を入れているせいなのだった。これはコントロールパネルの「プログラムと機能」に入るので、速攻でアンインストールせねばならない。

PC 全体に Teams を入れる方法は lern.microsoft.com: Teas クライアントを一括インストールする にあった。うーんなるほど。

管理者で開いたコマンドプロンプトから
C:\Users\nakano>teamsbootstrapper.exe -p
{
  "success": true
}
という感じで。にゃーん。

個々に入ってしまった各ユーザの Teams を消すには、 Remove-LegacyTeams.ps1 を管理者 PowerShell で実行すれば、というのが ChatGPT 氏のご案内。

ということでいつもの: ChatGPT: Zoom システムワイドインストール
コメント [全部読む/投稿する]

2025年10月02日(木) [n年日記]

#1 bookworm→trixie 副作用

trixie にした surf だけど、passwd コマンドを発行すると、sudo でやった場合でも
surf(nakano) ~ [71] sudo passwd nakano
passwd: Permission denied
passwd: password unchanged
となるのであった。

延々 ChatGPT 氏に相談したのだが、結局原因は /etc/pam.d/common-password が
[snip]
# here are the per-package modules (the "Primary" block)
password        [success=2 default=ignore]      pam_unix.so obscure yescrypt
# password      [success=1 default=ignore]      pam_ldap.so minimum_uid=1000 try_first_pass
# here's the fallback if no module succeeds
password        requisite                       pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password        required                        pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config
になっていて、pam_unix.so が「成功したら 2 行 skip」になっていて、pam_permit.so を通過しなかったからである、ということらしい。たぶんだけど、bookworm→trixie で、pam_unix.so の挙動が変わったんですかねえ。

ということで ChatGPT に相談したログをこちらに。 Permission denied 原因
コメント [全部読む/投稿する]

2025年09月27日() [n年日記]

#1 surf を trixie に

dovecot の設定ファイルの書式が 2.3.9→2.4.0 でだいぶ変わったようで、ChatGPT さんに全面的に依存して起動するところまで持っていった。こういう ad hoc な対応は、いかにも思考停止している感じで良くない気がするけどなー。

Dovecot 設定エラー修正
コメント [全部読む/投稿する]

以上、5 日分です。
タイトル一覧
カテゴリ分類
book
dept
issp
labo
paper
snap
stock
vsj
Powered by hns-2.19.5, HyperNikkiSystem Project

中野武雄 (NAKANO, Takeo) <nakano@st.seikei.ac.jp> Since 1999-10-07
RSS feed, 更新時刻, LIRS エントリ, アクセス制御 (解説)

中野のホームページへ