Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
オフラインインストールのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
オフラインインストール
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:ライブ Arch システム]] [[Category:Arch の入手とインストール]] [[en:Offline installation]] [[ru:Offline installation]] [[zh-hans:Offline installation]] {{Related articles start}} {{Related|パッケージのオフラインインストール}} {{Related articles end}} If you wish to install the [[Archiso]] (e.g. [https://archlinux.org/download/ the official monthly release]) as it is without an Internet connection, or, if you do not want to download the packages you want again: First, follow the [[Installation guide]], skipping the [[Installation guide#Connect to the internet]] section, until the [[Installation guide#Install essential packages]] step. There are two main methods to enable bootstrapping the new installation: preparing a local pacman repository with all the required files, and manually copying the files from the archiso. The first version is highly recommended. == Local Repository Method (Recommended) == === Prepare local repository === Follow [[Pacman/Tips and tricks#Installing packages from a CD/DVD or USB stick]] for instructions on preparing a local repository with the necessary files on a separate host installation. At the very least, for a functioning system, the following packages are recommended: # pacman -Syw --cachedir . --dbpath /tmp/blankdb base base-devel linux linux-firmware systemd mkinitcpio vim Create your custom offline repository # repo-add ./custom.db.tar.gz ./*[^sig] === Mount and configure === Once the repository is prepared, connect the external media to the new installation, and mount it on the newly created root filesystem: # mkdir /mnt/repo # mount /dev/sdX /mnt/repo Edit your archiso {{ic|/etc/pacman.conf}} and add a new section: [custom] SigLevel = Optional Server = file:///mnt/repo/ Comment out {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}} so that pacman does not fail on the default repositories. === Pacstrap === You can now continue to pacstrap your locally-available packages to the new installation: # pacstrap /mnt base base-devel linux linux-firmware mkinitcpio systemd vim === Chroot === In case the new system is expected to remain offline or airgapped, it should be configured to expect local repositories only. After chrooting into your new installation, edit the new {{ic|/etc/pacman.conf}} in the same way as previously (but without the {{ic|/mnt}} prefix): [custom] SigLevel = Optional Server = file:///repo/ Comment out all other repositories and save. Continue configuring the new system as usual. From now on any updates to the offline system can be made by bringing an up to date copy of the local repository, mounting it to {{ic|/repo}} and running pacman commands as usual. == ファイルをコピーする方法 == {{Remove|ルートファイルシステムのイメージを ISO から展開する方法は、サポートされているインストール手段ではありません。この方法のカスタマイズは、インストール済みのシステムには適していません。}} {{Accuracy|archiso からファイルをコピーするのではなく、Arch のミラーから手に入る "bootstrap" イメージを対象のディスクに直接展開することができます。archiso を変更する必要はなく、最小のシステムを手に入れることができます。}} {{Out of date|複数のファイル (カーネル、mkinitcpio フック、設定ファイル、journald 設定ファイル、choose-mirror スクリプトなど) の名前と場所が変更されています。}} === 新しい root に archiso をインストール === {{ic|pacstrap}} でパッケージをインストールする代わりに (リモートのリポジトリからパッケージをダウンロードするわけですが今はインターネット接続がありません)、ライブ環境から新しい root に''全て''をコピーしてください: # cp -ax / /mnt {{Note|オプション ({{ic|-x}}) を使って、新しい root にコピーしないようにいくつかの特殊なディレクトリを除外しています。}} 次に、新しいシステムの整合性を保つために、カーネルイメージを新しい root にコピーします: # cp -vaT /run/archiso/bootmnt/arch/boot/$(uname -m)/vmlinuz /mnt/boot/vmlinuz-linux その後、[[インストールガイド#fstab の生成]] に書かれているとおりに fstab を生成してください。 === Chroot とベースシステムの設定 === 次に、新しくインストールしたシステムに chroot します: # arch-chroot /mnt /bin/bash {{Note|[[インストールガイド#システムの設定]]における他の設定 (ロケールやキーマップなど) を行う前に、ライブ環境の跡 (つまり、非ライブ環境に適合しない archiso のカスタマイズ) を消す必要があります。}} ==== journald の設定の復旧 ==== [https://gitlab.archlinux.org/archlinux/archiso/blob/master/configs/releng/airootfs/root/customize_airootfs.sh#L19 archiso のカスタマイズ]によってシステムのジャーナルはメモリに保存されるようになっており、そのままだと再起動でジャーナルは消えてしまいます: # sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf ==== 特殊な udev ルールの削除 ==== {{Out of date|https://gitlab.archlinux.org/archlinux/archiso/commit/0d67870667ee8c2084dea2bbdf1323288e2e7457 を見ると、systemd-networkd と systemd-resolved の変更によって以下の文章を書き換える必要があります。}} [https://gitlab.archlinux.org/archlinux/archiso/-/blob/769fbecef3ea7411c6e68ff1c4838f49b7c5d648/configs/releng/airootfs/etc/udev/rules.d/81-dhcpcd.rules この udev ルール] は有線ネットワークインターフェイスが存在する場合に自動的に dhcpcd を起動します。 # rm /etc/udev/rules.d/81-dhcpcd.rules ==== archiso によって作成されたサービスの無効化と削除 ==== ライブ環境用に作成されているサービスファイルがあるので、{{ic|pacman-init.service}} と {{ic|choose-mirror.service}} を[[無効化]]してファイルを削除してください (新しい環境では不要であるため): # rm -r /etc/systemd/system/{choose-mirror.service,pacman-init.service,etc-pacman.d-gnupg.mount,getty@tty1.service.d} # rm /etc/systemd/scripts/choose-mirror ==== ライブ環境の特殊なスクリプトの削除 ==== ライブ環境には archiso スクリプトによっていくつかスクリプトがインストールされており、これらは新しい環境では必要ありません: # rm /etc/systemd/system/getty@tty1.service.d/autologin.conf # rm /root/{.automated_script.sh,.zlogin} # rm /etc/mkinitcpio-archiso.conf # rm -r /etc/initcpio {{Note|{{ic|mkinitcpio-archiso.conf}} ファイルはもはや存在しません。追加の手順については [[#Initramfs の設定]] を見てください。}} ==== archlinux 鍵のインポート ==== 公式リポジトリを使うには archlinux のマスター鍵をインポートする必要があります ([[pacman-key#キーリングの初期化]])。通常は pacstrap でインポートされますが、以下のコマンドでインポートすることもできます: # pacman-key --init # pacman-key --populate {{Note|エントロピーを生成して最初のステップを高速化するにはキーボードやマウスを動かす必要があります。}} ==== Initramfs の設定 ==== archiso からファイルシステムをコピーしたので、適切な initramfs をインストールするために {{ic|mkinitcpio.conf}} を編集する必要があります。 テキストエディタで {{ic|/etc/mkinitcpio.conf}} を開き、唯一コメントアウトされていない {{ic|HOOKS}} をコメントアウト/削除し、以下に置き換えてください: # HOOKS=(base udev autodetect modconf block filesystems keyboard fsck) ==== システムの設定 ==== スキップした[[インストールガイド#システムの設定]]セクションの設定 (ロケールやタイムゾーン、ホストネームなど) を行って[[インストールガイド#Initramfs]] に書いてあるように初期 RAM ディスクを作成してインストールを完了してください。
このページで使用されているテンプレート:
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
オフラインインストール
に戻る。
検索
検索
オフラインインストールのソースを表示
話題を追加