タグ: linux

  • MS-R1 で overlayFS が使えない

    MS-R1 で Docker を公式サイトの手順でインストールし、docker build すると、最後のステップでこのようなエラーになる。

     => ERROR exporting to image                                                                                                                                                      0.2s
     => => exporting layers                                                                                                                                                           0.2s
    ------
     > exporting to image:
    ------
    ERROR: failed to build: failed to solve: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount1483376101: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount2618877472: failed to write compressed diff: failed to create diff tar stream: failed to get xattr for /var/lib/containerd/tmpmounts/containerd-mount1483376101/bin: operation not supported

    ChatGPT くんによると

    Root cause: The custom kernel disabled ext4 security xattr support (CONFIG_EXT4_FS_SECURITY=n). Consequently, security.capability xattrs were unsupported, causing BuildKit/containerd to fail when exporting Docker image layers.

    解決策1: 必要な機能をつけて Kernel を再ビルドする (まだ試してない)

    解決策2: overlayFS を諦めて vfs に切り替える。以下を /etc/docker/daemon.json に記述し、docker.service を再起動。

    {
      "features": {
        "containerd-snapshotter": false
      },
      "storage-driver": "vfs"
    }

    vfs の正体については、以下を参照。

    https://docs.docker.com/engine/storage/drivers/vfs-driver

  • ChromeOS で Tailscale を自動起動設定すると GNU/Linux が起動できなくなる

    Chromebook で Tailscale を自動起動設定すると GNU/Linux が起動できなくなる。Terminal 起動後 Polling timeout… のようなエラーが出て起動できなくなる。

    Issue: https://github.com/tailscale/tailscale/issues/12090

    解決法

    1. Ctrl + Alt + T で crosh に入る
    2. vsh termina で termina 環境に入る
    3. lxc exec penguin bash で GNU/Linux 環境に入る
    4. systemctl disable –now tailscaled で Tailscaled を停止し、自動起動を無効化する

    Tailscale を使用したい場合は、手動で起動する必要がある。

  • Ubuntu mandb trigger が遅い

    apt install 後の mandb trigger が遅い問題。

    percona-toolkit が関係しているかもしれない。

    https://bugs.launchpad.net/ubuntu/+source/man-db/+bug/2073797

  • WSL2 で外部物理ディスクをマウントする

    WSL2 で外部ディスクをマウントする方法。

    WSL2 からは ext4 などのファイルシステムの中身も見ることができるので、デュアルブートしている Linux ディスクを読み書きしたいときに便利。

    Step 1: マウントしたいディスクの Device ID を確認する。PowerShell で

    GET-CimInstance -query "SELECT * from Win32_DiskDrive"

    DeviceID のコラムの値をコピーしておく。例:

    \\.\PHYSICALDRIVE3

    Step 2: wsl コマンドでディスクを接続する。

    PowerShellで

    wsl --mount <DiskPath> --bare

    <DiskPath> に DeviceID の値が入る。

    Step 3: WSL2 内でマウントする。

    WSL2のシェルで、マウントしたいパーティションの名前を調べて、マウントする。例:

    $ lsblk
    $ mkdir /mnt/ext
    $ mount /dev/sdd1 /mnt/ext

    Step 4: ディスクを取り外すとき

    PowerShellで

    wsl --unmount <DiskPath>

    参考: https://learn.microsoft.com/ja-jp/windows/wsl/wsl2-mount-disk