windows:wsl:lxrunoffline

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
windows:wsl:lxrunoffline [2021/03/25 04:36] – [ディストリビューション指定実行] ともやんwindows:wsl:lxrunoffline [2021/11/16 17:22] (現在) ともやん
行 1: 行 1:
 +~~CLOSETOC~~
 ====== LxRunOffline - システムドライブ外に WSL 環境を構築する方法 ====== ====== LxRunOffline - システムドライブ外に WSL 環境を構築する方法 ======
-ドキュメント: [[https://github.com/DDoSolitary/LxRunOffline/wiki|Home · DDoSolitary/LxRunOffline Wiki]]\\ +ドキュメント: [[git>DDoSolitary/LxRunOffline/wiki|Home · DDoSolitary/LxRunOffline Wiki]]\\ 
-ソースコード: [[https://github.com/DDoSolitary/LxRunOffline|DDoSolitary/LxRunOffline: A full-featured utility for managing Windows Subsystem for Linux (WSL)]]\\+ソースコード: [[git>DDoSolitary/LxRunOffline|DDoSolitary/LxRunOffline: A full-featured utility for managing Windows Subsystem for Linux (WSL)]]\\
  
-下記の手順は genie さんの機能強化に伴い 2012/03/15 に再検証しました。(以下の [[tw>|Twitter]] の内容は付録なので見なくても大丈夫です😅💦)\\+下記の手順は genie さんの機能強化に伴い 2021/03/15 に再検証しました。(以下の [[tw>|Twitter]] の内容は付録なので見なくても大丈夫です😅💦)\\
 [[tw>tomoyan596/status/1370861091157209088|「WSL2に最新のFedoraを入れておきましょう😊」 / Twitter]]\\ [[tw>tomoyan596/status/1370861091157209088|「WSL2に最新のFedoraを入れておきましょう😊」 / Twitter]]\\
 [[tw>tomoyan596/status/1370999012954759176|「genieさん何やらかしたのかなぁ❓😅💦」 / Twitter]]\\ [[tw>tomoyan596/status/1370999012954759176|「genieさん何やらかしたのかなぁ❓😅💦」 / Twitter]]\\
 [[tw>tomoyan596/status/1371115020331851783|「さて、2年ぶりにWSL2の精霊🧚‍♂️さんのお世話をしましょうかねぇ🥰」 / Twitter]]\\ [[tw>tomoyan596/status/1371115020331851783|「さて、2年ぶりにWSL2の精霊🧚‍♂️さんのお世話をしましょうかねぇ🥰」 / Twitter]]\\
 +
 +{{INLINETOC wide 1-2}}
  
 ===== インストール ===== ===== インストール =====
行 354: 行 357:
 </WRAP> </WRAP>
  
-==== インストール済み初期パッケージ ====+==== インストール済み初期パッケージ ====
 LxRunOffline でインストールできる Fedora 33 の初期パッケージ。\\ LxRunOffline でインストールできる Fedora 33 の初期パッケージ。\\
 <WRAP prewrap 100%> <WRAP prewrap 100%>
行 510: 行 513:
 </code> </code>
 </WRAP> </WRAP>
 +
 +==== 重要: パッケージインストールの前に [nodocs] ====
 +<WRAP center round tip 100%>
 +**ワンポイントアドバイス**\\
 +
 +WSL 2 (厳密には軽量ユーティリティ VM) や [[https://www.docker.io/|Docker]] などのコンテナ仮想化技術を利用する場合、コンテナの肥大化を防止するためにパッケージをインストールする際にパッケージマネージャがドキュメント類を除外するように指示することができる。\\
 +しかし、このことを知らないとコンテナの中で **man コマンド**などで説明が見られないなどように悩むことになるかもしれません🤔\\
 +
 +ドキュメント類はネットで調べることも可能ですが、そのようなネット環境がない場合も考えられますので、ドキュメント類も通常どおりインストールする方法を記載しておきます😊\\
 +</WRAP>
 +
 +=== 通常の Linux ディストリビューションと同様にドキュメント類を常時インストールする方法 ===
 +Fedora では **dnf コマンド**の設定で [[https://dnf.readthedocs.io/en/latest/conf_ref.html?highlight=tsflags#main-options|tsflags]] で RPM トランザクションに **nodocs (RPMTRANS_FLAG_NODOCS)** を指示しないようにコメントアウトする。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo vi /etc/dnf/dnf.conf
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #mincode>
 +<code autoconf /etc/dnf/dnf.conf>
 +[main]
 +gpgcheck=1
 +installonly_limit=3
 +clean_requirements_on_remove=True
 +best=False
 +skip_if_unavailable=True
 +#tsflags=nodocs
 +</code>
 +</WRAP>
 +
 +=== パッケージインストール時に個別にドキュメント類もインストールするように指示する方法 ===
 +基本は **dnf.conf** で **tsflags=nodocs** のままで、パッケージ毎に必要に応じてドキュメント類のインストールを指示するには、<html><code>--setopt</code></html> オプションに空の <html><code>tsflags</code></html> を指定して <html><code>nodocs</code></html> RPM トランザクション フラグの指定を一時的に解除する。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo dnf install --setopt=tsflags='' man-db man-pages man-pages-ja -y
 +</code>
 +</WRAP>
 +
 +既にインストール済みのパッケージで、後からドキュメント類が必要になった場合は、以下の方法で再インストールする必要があります。(既に <html><code>tsflags=nodocs</code></html> でインストールしたパッケージはドキュメント類自体が欠落して配置されているためです)\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo dnf reinstall --setopt=tsflags='' man-db man-pages man-pages-ja -y
 +</code>
 +</WRAP>
 +
 +=== 付録 ===
 +[[tw>tomoyan596/status/1374428399616151564|「WSL 2のFedoraでmanこマンドが見られない...」 / Twitter]]\\
 +Fedora 以外のディストリビューションでは❓\\
 +[[qita>hiromitsu7/items/0788f2e2212224ac6825|コンテナ内でmanを読みたい - Qiita]]\\
  
 ==== デフォルトユーザーの作成 ==== ==== デフォルトユーザーの作成 ====
行 2038: 行 2090:
  
 ===== トラブルシューティング ===== ===== トラブルシューティング =====
 +
 +==== man コマンドが bash: man: command not found と言われる ====
 +<WRAP prewrap 100%>
 +<code>
 +$ man
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code>
 +bash: man: command not found
 +</code>
 +</WRAP>
 +
 +man コマンドの関連パッケージをインストールする。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo dnf install --setopt=tsflags='' man-db -y
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +Last metadata expiration check: 0:49:08 ago on 2021年03月25日 04時51分25秒.
 +Dependencies resolved.
 +====================================================================================================
 + Package                  Architecture        Version                     Repository           Size
 +====================================================================================================
 +Installing:
 + man-db                   x86_64              2.9.2-6.fc33                fedora              1.1 M
 +Installing dependencies:
 + libpipeline              x86_64              1.5.2-5.fc33                fedora               48 k
 +
 +Transaction Summary
 +====================================================================================================
 +Install  2 Packages
 +
 +Total download size: 1.2 M
 +Installed size: 2.6 M
 +Downloading Packages:
 +(1/2): libpipeline-1.5.2-5.fc33.x86_64.rpm                          132 kB/s |  48 kB     00:00
 +(2/2): man-db-2.9.2-6.fc33.x86_64.rpm                               423 kB/s | 1.1 MB     00:02
 +----------------------------------------------------------------------------------------------------
 +Total                                                               292 kB/s | 1.2 MB     00:04
 +Running transaction check
 +Transaction check succeeded.
 +Running transaction test
 +Transaction test succeeded.
 +Running transaction
 +  Preparing        :                                                                            1/1
 +  Installing       : libpipeline-1.5.2-5.fc33.x86_64                                            1/2
 +  Running scriptlet: man-db-2.9.2-6.fc33.x86_64                                                 2/2
 +  Installing       : man-db-2.9.2-6.fc33.x86_64                                                 2/2
 +  Running scriptlet: man-db-2.9.2-6.fc33.x86_64                                                 2/2
 +  Verifying        : libpipeline-1.5.2-5.fc33.x86_64                                            1/2
 +  Verifying        : man-db-2.9.2-6.fc33.x86_64                                                 2/2
 +
 +Installed:
 +  libpipeline-1.5.2-5.fc33.x86_64                     man-db-2.9.2-6.fc33.x86_64
 +
 +Complete!
 +</code>
 +</WRAP>
 +
 +==== man コマンドで No manual entry for ... と言われる ====
 +<WRAP prewrap 100%>
 +<code>
 +$ man ls
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code>
 +No manual entry for ls
 +</code>
 +</WRAP>
 +
 +man コマンド用のドキュメント関連パッケージをインストールする。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo dnf install --setopt=tsflags='' man-db -y
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +Last metadata expiration check: 0:53:47 ago on 2021年03月25日 04時51分25秒.
 +Dependencies resolved.
 +====================================================================================================
 + Package                  Architecture       Version                      Repository           Size
 +====================================================================================================
 +Installing:
 + man-pages                noarch             5.07-3.fc33                  updates             6.0 M
 + man-pages-ja             noarch             20200315-2.fc33              fedora              5.5 M
 +
 +Transaction Summary
 +====================================================================================================
 +Install  2 Packages
 +
 +Total download size: 11 M
 +Installed size: 11 M
 +Downloading Packages:
 +(1/2): man-pages-ja-20200315-2.fc33.noarch.rpm                      1.0 MB/s | 5.5 MB     00:05
 +(2/2): man-pages-5.07-3.fc33.noarch.rpm                             962 kB/s | 6.0 MB     00:06
 +----------------------------------------------------------------------------------------------------
 +Total                                                               1.3 MB/s |  11 MB     00:08
 +Running transaction check
 +Transaction check succeeded.
 +Running transaction test
 +Transaction test succeeded.
 +Running transaction
 +  Preparing        :                                                                            1/1
 +  Installing       : man-pages-ja-20200315-2.fc33.noarch                                        1/2
 +  Running scriptlet: man-pages-5.07-3.fc33.noarch                                               2/2
 +  Installing       : man-pages-5.07-3.fc33.noarch                                               2/2
 +  Running scriptlet: man-pages-5.07-3.fc33.noarch                                               2/2
 +  Verifying        : man-pages-5.07-3.fc33.noarch                                               1/2
 +  Verifying        : man-pages-ja-20200315-2.fc33.noarch                                        2/2
 +
 +Installed:
 +  man-pages-5.07-3.fc33.noarch                  man-pages-ja-20200315-2.fc33.noarch
 +
 +Complete!
 +</code>
 +</WRAP>
 +
 +<WRAP prewrap 100%>
 +<code>
 +$ man ls
 +</code>
 +</WRAP>
 +
 +==== dnf コマンドの tsflags=nodocs RPM トランザクション フラグでインストール済みのパッケージのドキュメント類を再インストールする方法 ====
 +既にインストール済みのパッケージで欠落しているドキュメント類のファイルは以下のように調べることが出来る🤤\\
 +<WRAP prewrap 100%>
 +<code>
 +$ man rsync
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result>
 +<code>
 +No manual entry for rsync
 +</code>
 +</WRAP>
 +<WRAP prewrap 100%>
 +<code>
 +$ ls -lha $(rpm -q -d rsync)
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +ls: cannot access '/usr/share/doc/rsync/support/Makefile': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/atomic-rsync': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/cvs2includes': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/deny-rsync': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/file-attr-restore': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/files-to-excludes': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/git-set-file-times': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/instant-rsyncd': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/logfilter': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/lsh': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/lsh.sh': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/mapfrom': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/mapto': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/mnt-excl': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/munge-symlinks': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/nameconvert': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/rrsync': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/rsync-no-vanished': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/rsync-slash-strip': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/rsyncstats': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/support/savetransfer.c': No such file or directory
 +ls: cannot access '/usr/share/doc/rsync/tech_report.tex': No such file or directory
 +ls: cannot access '/usr/share/man/man1/rsync-ssl.1.gz': No such file or directory
 +ls: cannot access '/usr/share/man/man1/rsync.1.gz': No such file or directory
 +ls: cannot access '/usr/share/man/man5/rsyncd.conf.5.gz': No such file or directory
 +</code>
 +</WRAP>
 +
 +欠落したドキュメント類のファイルを再インストールする。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ sudo dnf reinstall --setopt=tsflags='' rsync -y
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +Last metadata expiration check: 1:06:07 ago on 2021年03月25日 04時51分25秒.
 +Dependencies resolved.
 +====================================================================================================
 + Package             Architecture         Version                       Repository             Size
 +====================================================================================================
 +Reinstalling:
 + rsync               x86_64               3.2.3-3.fc33                  updates               393 k
 +
 +Transaction Summary
 +====================================================================================================
 +
 +Total download size: 393 k
 +Installed size: 731 k
 +Downloading Packages:
 +rsync-3.2.3-3.fc33.x86_64.rpm                                       740 kB/s | 393 kB     00:00
 +----------------------------------------------------------------------------------------------------
 +Total                                                               168 kB/s | 393 kB     00:02
 +Running transaction check
 +Transaction check succeeded.
 +Running transaction test
 +Transaction test succeeded.
 +Running transaction
 +  Preparing        :                                                                            1/1
 +  Reinstalling     : rsync-3.2.3-3.fc33.x86_64                                                  1/2
 +  Cleanup          : rsync-3.2.3-3.fc33.x86_64                                                  2/2
 +  Running scriptlet: rsync-3.2.3-3.fc33.x86_64                                                  2/2
 +  Verifying        : rsync-3.2.3-3.fc33.x86_64                                                  1/2
 +  Verifying        : rsync-3.2.3-3.fc33.x86_64                                                  2/2
 +
 +Reinstalled:
 +  rsync-3.2.3-3.fc33.x86_64
 +
 +Complete!
 +</code>
 +</WRAP>
 +
 +ドキュメント類が配置されていることを確認する。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ ls -lha $(rpm -q -d rsync)
 +</code>
 +</WRAP>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +-rw-r--r-- 1 root root   80  1月 12  2005 /usr/share/doc/rsync/support/Makefile
 +-rw-r--r-- 1 root root 4.0K  6月 17  2020 /usr/share/doc/rsync/support/atomic-rsync
 +-rw-r--r-- 1 root root 1.2K  6月 17  2020 /usr/share/doc/rsync/support/cvs2includes
 +-rw-r--r-- 1 root root 1005  6月 17  2020 /usr/share/doc/rsync/support/deny-rsync
 +-rw-r--r-- 1 root root 4.9K  6月 17  2020 /usr/share/doc/rsync/support/file-attr-restore
 +-rw-r--r-- 1 root root  538  6月 17  2020 /usr/share/doc/rsync/support/files-to-excludes
 +-rw-r--r-- 1 root root 3.8K  7月 18  2020 /usr/share/doc/rsync/support/git-set-file-times
 +-rw-r--r-- 1 root root 2.8K  6月 17  2020 /usr/share/doc/rsync/support/instant-rsyncd
 +-rw-r--r-- 1 root root 1.1K  6月 17  2020 /usr/share/doc/rsync/support/logfilter
 +-rw-r--r-- 1 root root 2.6K  7月 14  2020 /usr/share/doc/rsync/support/lsh
 +-rw-r--r-- 1 root root 1010  6月  5  2020 /usr/share/doc/rsync/support/lsh.sh
 +-rw-r--r-- 1 root root  633  6月 17  2020 /usr/share/doc/rsync/support/mapfrom
 +-rw-r--r-- 1 root root  625  6月 17  2020 /usr/share/doc/rsync/support/mapto
 +-rw-r--r-- 1 root root 1.9K  6月 17  2020 /usr/share/doc/rsync/support/mnt-excl
 +-rw-r--r-- 1 root root 1.5K  6月 17  2020 /usr/share/doc/rsync/support/munge-symlinks
 +-rw-r--r-- 1 root root 1.5K  8月  6  2020 /usr/share/doc/rsync/support/nameconvert
 +-rw-r--r-- 1 root root 7.3K  6月 28  2020 /usr/share/doc/rsync/support/rrsync
 +-rw-r--r-- 1 root root  275  6月 17  2020 /usr/share/doc/rsync/support/rsync-no-vanished
 +-rw-r--r-- 1 root root  651  6月 17  2020 /usr/share/doc/rsync/support/rsync-slash-strip
 +-rw-r--r-- 1 root root 8.5K  6月 17  2020 /usr/share/doc/rsync/support/rsyncstats
 +-rw-r--r-- 1 root root 4.5K 12月 18  2006 /usr/share/doc/rsync/support/savetransfer.c
 +-rw-r--r-- 1 root root  15K 11月 23  1998 /usr/share/doc/rsync/tech_report.tex
 +-rw-r--r-- 1 root root 1.8K  8月  7  2020 /usr/share/man/man1/rsync-ssl.1.gz
 +-rw-r--r-- 1 root root  63K 12月  8 20:57 /usr/share/man/man1/rsync.1.gz
 +-rw-r--r-- 1 root root  20K 12月  8 20:57 /usr/share/man/man5/rsyncd.conf.5.gz
 +</code>
 +</WRAP>
  
 ==== genie で dumpwslenv.sh が No such file or directory になる ==== ==== genie で dumpwslenv.sh が No such file or directory になる ====
行 2115: 行 2421:
  
 ===== 参考文献 ===== ===== 参考文献 =====
-[[https://github.com/DDoSolitary/LxRunOffline/wiki|Home · DDoSolitary/LxRunOffline Wiki]]\\ +[[git>DDoSolitary/LxRunOffline/wiki|Home · DDoSolitary/LxRunOffline Wiki]]\\ 
-[[https://qiita.com/mark-n2/items/c9d500815810136f43bf|WSL+LxRunOfflineでシステムドライブ外に環境構築 - Qiita]]\\+[[qita>mark-n2/items/c9d500815810136f43bf|WSL+LxRunOfflineでシステムドライブ外に環境構築 - Qiita]]\\
 [[https://www.server-world.info/query?os=Fedora_30&p=japanese|Fedora 30 : 日本語環境にする : Server World]]\\ [[https://www.server-world.info/query?os=Fedora_30&p=japanese|Fedora 30 : 日本語環境にする : Server World]]\\
  
  • windows/wsl/lxrunoffline.1616614603.txt.gz
  • 最終更新: 2021/03/25 04:36
  • by ともやん