リムーバブルメディアに Arch Linux をインストール

提供: ArchWiki
2015年2月23日 (月) 22:57時点におけるKusakata (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

テンプレート:Related articles start (日本語)

  • ビギナーズガイド
  • インストールガイド
  • 一般的な推奨事項
  • 一般的なトラブルシューティング
  • このページでは標準的な Arch のインストールを USB キー (または"フラッシュドライブ") で行う方法を説明しています。USB インストールメディアで説明している LiveUSB の作り方と違って、HDD に通常インストールするのと同じように USB フラッシュドライブにインストールを行います。

    準備

    ノート: 最低でも 2 GiB のストレージ容量が必要です。パッケージの数は控えめにして、ストレージ用に空き容量を残します。

    USB スティックに Arch をインストールする方法は様々ありますが、一番シンプルなのは Arch からインストールする方法です:

    • 既に Arch を実行している場合、arch-install-scriptsインストールして iso からインストールするのと同じようにインストールガイドに従って下さい。ただし /dev/sda を使用する代わりに、インストールする前に $ lsblk を使って USB キーの /dev/sd* の名前を確認します。
    警告: 誤って /dev/sda をフォーマットすると、ハードドライブにあるものを全て削除してしまうことになります。
    • Arch Linux CD/USB を使って USB キーに Arch をインストールすることもできます。CD/USB を起動してインストールガイドに従って下さい。ライブ USB から起動する場合、インストールは別の USB スティックに行う必要があります。
    • もしくは、別の Linux コンピュータが使える場合 (Arch である必要はありません)、既存の Linux からインストールにしたがって、設定セクションまで進んでください。
    • Windows や Mac で VirtualBox をダウンロードしている場合、VirtualBox Extension をインストールして、USB ドライブを arch が動いている仮想マシンに追加して、USB ドライブにインストールを行なって下さい。

    インストール

    基本的にはインストールガイドのとおりに行いますが、以下の部分が異なります:

    • cfdisk が "Partition ends in the final partial cylinder" fatal error で終了してしまう場合、残された方法はドライブ上の全てのパーティションを消去することだけです。別のターミナルを開いて (Alt+F2)、fdisk /dev/sdX と入力し (sdX はあなたの使用している usb ドライブに置き換えてください)、パーティションテーブルを表示 (p) して、問題ないか確認をし、パーティションテーブルを削除 (d) してから変更を書き込んでください (w)。そして cfdisk に戻ります。
    • ファイルシステムを選択する前に SSD の wiki 記事の読み書きを最小化するヒントを読むことを強く推奨します。結論としては、ジャーナルを無効にした ext4 が良いでしょう。# mkfs.ext4 -O "^has_journal" /dev/sdXX で作成できます。フラッシュが書き込みを行える回数には限りがあり、ジャーナリングファイルシステムは、ジャーナルを更新するたびに回数を減らしてしまうということを覚えてください。同じ理由から、スワップパーティションは作成しないのがベストです。USB ハードドライブへのインストールには影響がありません。
    • Before creating the initial RAM disk # mkinitcpio -p linux, in /etc/mkinitcpio.conf add the block hook to the hooks array right after udev. This is necessary for appropriate module loading in early userspace.
    • If you want to be able to continue to use the UFD device as a cross-platform removable drive, this can be accomplished by creating a partition housing an appropriate file system (most likely NTFS or exFAT). Note that the data partition may need to be the first partition on the device, as Windows assumes that there can only be one partition on a removable device, and will happily automount an EFI system partition otherwise. Remember to install dosfstools and ntfs-3g. Some tools are available online that may allow you to flip the removable media bit on your UFD device. This would trick operating systems into treating your UFD device as an external hard disk and allow you to use whichever partitioning scheme you choose.
    警告: It is not possible to flip the removable media bit on every UFD device and attempting to use software that is incompatible with your device may damage it. Attempting to flip the removable media bit is not recommended.
    • NetworkManager をインストールして、ネットワークをコントロールします。NetworkManager はインターフェイス名の変更に対応しています。

    設定

    • Make sure that /etc/fstab includes the correct partition information for /, and for any other partitions on the USB key. If the usb key is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use UUID or label:

    パーティションの正しい UUID を取得するには blkid を実行します。

    ノート:
    • When GRUB is installed on the USB key, the key will always be hd0,0.
    • It seems that current versions of GRUB will automatically default to using uuid. The following directions are for GRUB legacy.

    GRUB legacy

    menu.lst, the GRUB legacy configuration file, should be edited to (loosely) match the following: With the static /dev/sdaX:

    root (hd0,0)
    kernel /boot/vmlinuz-linux root=/dev/sda1 ro
    initrd /boot/initramfs-linux.img
    

    When using label your menu.lst should look like this:

    root (hd0,0)
    kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch ro
    initrd /boot/initramfs-linux.img
    

    And for UUID, it should be like this:

    root (hd0,0)
    kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/3a9f8929-627b-4667-9db4-388c4eaaf9fa ro
    initrd /boot/initramfs-linux.img
    

    Syslinux

    With the static /dev/sdaX:

    LABEL Arch
            MENU LABEL Arch Linux
            LINUX ../vmlinuz-linux
            APPEND root=/dev/sdax ro
            INITRD ../initramfs-linux.img
    

    Using your UUID:

    LABEL Arch
            MENU LABEL Arch Linux
            LINUX ../vmlinuz-linux
            APPEND root=UUID=3a9f8929-627b-4667-9db4-388c4eaaf9fa ro
            INITRD ../initramfs-linux.img
    

    Tips

    複数のマシンで USB インストールを使う

    アーキテクチャ

    For the most versatile compatibility it is recommended that you install the i686 architecture because it will run on both 32 (IA-32) and 64 (amd64) bit architectures.

    Additionally, due to the reduzed size of 32 bit binaries and the absence of (possible) multilib packages, an i686 installation typically consumes less space than an equivalent x86_64 one.

    ノート: Chrooting into a 64 bit linux installation (eg. when using the USB key as install/rescue media) is only possible from x86_64 Arch.

    インプットドライバー

    ノートパソコンを使う (またはタッチスクリーンを使用する) 場合、タッチパッドやタッチスクリーンを使用するには xf86-input-synaptics パッケージが必要になります。

    タッチパッドの設定方法や問題のトラブルシューティングについては、Touchpad Synaptics の記事を見てください。

    ビデオドライバー

    ノート: The use of proprietary video drivers is not recommended for this type of installation.

    The recommended video drivers are: xf86-video-vesa mesa xf86-video-ati xf86-video-intel xf86-video-nouveau xf86-video-nv.

    For the most versatile compatibility install all of the open source video drivers include their multilib counterparts lib32-mesa.

    永続的なブロックデバイス命名

    It is recommended to use UUID in both fstab and bootloader configuration. See Persistent block device naming for details.

    Alternatively, you may create udev rule to create custom symlink for your usb key. Then use this symlink in fstab and bootloader configuration. See udev#Setting static device names for details.

    カーネルパラメータ

    You may want to disable KMS for various reasons, such as getting a blank screen or a "no signal" error from the display, when using some Intel video cards, etc. To disable KMS, add nomodeset as a kernel parameter. See Kernel parameters for more info.

    警告: Some Xorg drivers will not work with KMS disabled. See the wiki page on your specific driver for details. Nouveau in particular needs KMS to determine the correct display resolution. If you add nomodeset as a kernel parameter as a preemptive measure you may have to adjust the display resolution manually when using machines with Nvidia video cards. See Xrandr for more info.

    USB-3 メディアから起動

    [1] を見て下さい。

    互換性

    The fallback image should be used for maximum compatibility.

    参照