Repository navigation
v1.1.87
変更内容
1.1.87: USB メモリの中身(ext4・NTFS)をシェルから読み書きできるようになり、z2-disk に分割・ドライラン・SHA-256 の照合などが加わりました。仮想マシンは複製・ひな形・状態の保存と再開・共有フォルダ・cloud-init・仮想の TPM に対応しました(1.1.75〜1.1.87 の変更をまとめています)。
USB メモリ(z2-disk)
z2-disk mount/unmount: USB メモリやディスクイメージの ext2/3/4・NTFS を/run/z2disk-mounts/<名前>で開いて、ふつうのファイルとして読み書きできます。区画が複数あるときはp2のように選びます。Linux 側にfuse2fs(ext)やntfs-3g(NTFS)を入れて使います。format --part:--part ext4:4G:データ --part fat32:restのように、大きさを決めて複数の区画に分けられます。最後の区画に残りを全部割り当てたり、swap を作ったりできます。--dry-run: 書き込み・初期化・バックアップ・複製・消去で、元と先と何をするかを表示するだけで終わります。USB メモリには触りません。- ISO の SHA-256:
writeとmakeで、書く前に ISO を照合します。--sha256 <値>か、ISO と同じ場所のSHA256SUMSを使います。合わなければ書かずに止まります。 - 残り時間と工程: コピーの残り時間の目安と、初期化・起動用 USB 作成の工程を表示します。
- Android が使っている USB メモリ: Android がマウント中なら、確認してから取り上げます(
--yesで省けます)。終わったら Android がマウントし直すのを待ち、結果を表示します。 - ロックはディスクごと: 別の USB メモリ(やイメージ)の操作は並んで動けます。同じディスクをマウント中は、初期化などを断ります。
仮想マシン(z2-vm)
z2-vm delete: 止めた仮想マシンを、フォルダを表示し名前を打って確かめてから消します。- 複製とひな形:
z2-vm cloneで丸ごと複製、z2-vm template createでディスクをひな形にし、z2-vm new <名前> --from <ひな形>で差分だけの小さなディスクの仮想マシンを作れます。 - 保存と再開:
z2-vm suspendでメモリの中身ごと保存して止め、次のz2-vm startで続きから動きます(--freshで最初から)。 - 温度・電池・空きメモリの見張り:
z2-vm set <名前> --watch temp:45:pauseのように、値と動作(通知・一時停止・保存して停止・停止)を選べます。一時停止の通知には「再開」ボタンが付きます。z2-vm pause/resumeで手でも止められます。 - 共有フォルダ:
z2-vm set <名前> --share <フォルダ>[:<共有名>][:ro]で、スマホのフォルダを中の Linux と共有します。起動のときにマウントのコマンドを表示します。 - cloud-init:
z2-vm new <名前> --cloud <イメージ>でクラウド用のイメージから作ります。最初の起動でユーザーと SSH の鍵が入り、SSH のポート転送も自動で付きます。 - 仮想の TPM 2.0:
--tpmで付けられます(Windows 11 のインストールに要ります)。Linux 側にswtpmを入れて使います。
z2k エンジン
- FUSE のファイルシステム(
fuse2fs・ntfs-3gなど)で新しいファイルを作れなかったのを直しました。
既知の不具合:
z2-disk・z2-vm --target-usbは z2k エンジンだけで使えます(z2root では案内を出して止まります)。z2-disk mountは ext2/3/4・NTFS だけです(XFS・F2FS・Btrfs は開けません)。- 仮想マシンのシリアルで Alpine を入れると、起動の設定に
console=ttyS0が入り、PC の画面に何も出ません。また Alpine は、準備に 5 秒以上かかる遅い USB メモリだと起動の途中で止まります。 --privilegedでは、Android が /dev の一覧を読ませないので起動しません。
Changes
1.1.87: You can now read and write the files on USB drives (ext4 and NTFS) from the shell, and z2-disk gained partitioning, dry runs and SHA-256 checks. Virtual machines can now be cloned, made from templates, saved and resumed, share folders with the phone, be set up with cloud-init, and have a virtual TPM (changes from 1.1.75 to 1.1.87).
USB drives (z2-disk)
z2-disk mount/unmount: open the ext2/3/4 or NTFS file system of a USB drive or disk image at/run/z2disk-mounts/<name>and read and write it as ordinary files. When there are several partitions, pick one such asp2. Installfuse2fs(ext) orntfs-3g(NTFS) in Linux to use it.format --part: split a disk into partitions of set sizes, such as--part ext4:4G:data --part fat32:rest. The last partition can take all the remaining space, and swap partitions are supported.--dry-run: for write, make, format, backup, clone and erase, shows the source, the target and what would be done, then stops. The USB drive is not touched.- ISO SHA-256:
writeandmakecheck the ISO before writing, using--sha256 <value>or aSHA256SUMSfile next to the ISO. If it does not match, nothing is written. - Time left and stages: shows an estimate of the copy time left, and the stages of formatting and making bootable drives.
- USB drives Android is using: if Android has the drive mounted, z2-disk asks before taking it (
--yesskips the question). Afterwards it waits for Android to mount it again and reports the result. - One lock per disk: operations on different USB drives (or images) run side by side. While a disk is mounted, formatting it and similar operations are refused.
Virtual machines (z2-vm)
z2-vm delete: removes a stopped virtual machine after showing its folder and asking you to type its name.- Clones and templates:
z2-vm clonecopies a whole machine;z2-vm template createturns its disk into a template, andz2-vm new <name> --from <template>makes a machine whose small disk holds only the changes. - Save and resume:
z2-vm suspendsaves a machine, memory included, and stops it; the nextz2-vm startcontinues from there (--freshstarts over). - Watching temperature, battery and free memory: for example
z2-vm set <name> --watch temp:45:pause, with a choice of action (notify, pause, save and stop, or shut down). The pause notification has a Resume button.z2-vm pause/resumework by hand too. - Shared folders:
z2-vm set <name> --share <folder>[:<share>][:ro]shares a phone folder with a Linux guest.z2-vm startprints the mount commands. - cloud-init:
z2-vm new <name> --cloud <image>makes a machine from a cloud image. On the first boot a user and your SSH keys are set up, and an SSH port forward is added automatically. - Virtual TPM 2.0: add one with
--tpm(Windows 11 needs it to install). Installswtpmin Linux to use it.
z2k engine
- New files could not be created on FUSE file systems (such as
fuse2fsandntfs-3g); this is fixed.
Known issues:
z2-diskandz2-vm --target-usbwork only with the z2k engine (with z2root they stop with a message).z2-disk mountsupports only ext2/3/4 and NTFS (XFS, F2FS and Btrfs cannot be opened).- Installing Alpine over a virtual machine's serial console puts
console=ttyS0in its boot settings, so nothing appears on a PC's screen. Alpine also stops partway through booting from slow USB drives that take more than 5 seconds to get ready. - Containers do not start with
--privileged, because Android does not allow listing /dev.
Full Changelog: v1.1.74...v1.1.87