[[OS関連]]~
~
目次~
#contents

*概要 [#w4106f14]
Raspbery Pi 2BへのFedora 21 Remixの導入と設定手順。~

*インストール [#g3cc4078]
**インストール元ファイルの入手 [#wae16d87]
配布元サイトよりイメージをダウンロードする。~

-配布元
[[www.digitaldreamtime.co.uk:http://www.digitaldreamtime.co.uk/Fedora/]]

-ファイル名
 Pi2B-Fedora-Xfce-armhfp-21-5-20150217-1-sda.raw.xz

**メディアへの書き込み [#rc98f224]
Linuxの導入された端末を使用して、インストールイメージをメディアに書き込む。~
~

1. メディアを端末に接続~
~
2. fdiskコマンドにて接続したメディアの名称を確認~
 fdisk -l
 
 ディスク /dev/sdb: 31.9 GB, 31914983424 バイト
 ヘッド 255, セクタ 63, シリンダ 3880
 Units = シリンダ数 of 16065 * 512 = 8225280 バイト
 セクタサイズ (論理 / 物理): 512 バイト / 512 バイト
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 ディスク識別子: 0x00000000
 
 デバイス ブート      始点        終点     ブロック   Id  システム
 /dev/sdb1               1        3880    31162004    c  W95 FAT32  (LBA)
~
3. メディアにイメージを書き込む
 xzcat Pi2B-Fedora-Xfce-armhfp-21-5-20150217-1-sda.raw.xz > /dev/sdb


*ロケール関連 [#s4a30618]
**タイムゾーン設定 [#ke0d8f10]

-Tokyoに設定
 timedatectl set-timezone Asia/Tokyo

**キーボード設定 [#be0b4819]

-日本語配列(JP106)に設定
 localectl set-keymap jp106

*起動設定 [#w9d4eaf8]
**ランレベルの変更 [#v0004704]
/etc/inittabは存在するが、設定は以下のコマンドにて行う。

-runlevel 3
 systemctl set-default multi-user.target

-runlevel 5
 systemctl set-default graphical.target

*ネットワーク [#q12f049d]
**ホスト名の設定 [#c81fb6ec]
systemctlコマンドにてホスト名を設定する。~

-ホスト名設定
  hostnamectl set-hostname [HOSTNAME]


*ストレージ [#rd1ecebb]
**ディスク容量の拡張 [#ta326038]
上記の手順にてメディアにイメージを書き込むと、システム領域は2GBととなり実用に堪えることができない。~
以下の手順にて領域の拡張を行う。~

***パーティションの拡張 [#k1913ef3]
-partedを起動~
 # parted
 
-パーティションテーブルを確認
 (parted) print
 
 モデル: SD TEAM (sd/mmc)
 ディスク /dev/mmcblk0: 31.7GB
 セクタサイズ (論理/物理): 512B/512B
 パーティションテーブル: msdos
 ディスクフラグ:  
 
  番号  開始    終了    サイズ  タイプ   ファイルシステム  フラグ
  1    1049kB  513MB   512MB   primary  fat16             lba
  2    513MB   1025MB  512MB   primary  linux-swap(v1)
  3    1025MB  2048MB  2048MB  primary  ext4

-システムドライブのパーティションを削除
  (parted) rm 3
 
  Error: Partition(s) 3 on /dev/mmcblk0 have been written, but we have been unable to inform the kernel of
  the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.
  You should reboot now before making further changes.
 
  Ignore/Cancel? Ignore

-パーティションテーブルを確認
 (parted) print
 
 〜中略〜
   番号  開始    終了    サイズ  タイプ   ファイルシステム  フラグ
  1    1049kB  513MB   512MB   primary  fat16             lba
  2    513MB   1025MB  512MB   primary  linux-swap(v1)
 
-全容量のパーティションを作成
 (parted) mkpart primary 1025MB 31GB
 
 Error: Partition(s) 3 on /dev/mmcblk0 have been written, but we have been unable to inform the kernel of
 the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.
 You should reboot now before making further changes.
 
 Ignore/Cancel? Ignore

-パーティションテーブルを確認
 (parted) print
 〜中略〜
 番号  開始    終了    サイズ  タイプ   ファイルシステム  フラグ
  1    1049kB  513MB   512MB   primary  fat16             lba
  2    513MB   1025MB  512MB   primary  linux-swap(v1)
  3    1025MB  31.0GB  30.0GB  primary  ext4

-partedを終了
 (parted) quit

-OS再起動
 # reboot
 
***ファイルシステムの拡張 [#v710fd91]
容量を増やしたパーティションに対してファイルシステムの拡張を行い、全容量を使用できるようにする。

-ファイルシステムの拡張
 # resize2fs /dev/mmcblk0p3


*サービス [#b492d4b1]
**全般 [#nf1dc2f6]
systemctlコマンドにて制御を行う。~

-起動
 systemctl start [SERVICE NAME]

-再起動
 systemctl restart [SERVICE NAME]

-停止
 systemctl stop [SERVICE NAME]


**Firewallを停止する [#mc7309b7]
-停止
 systemctl stop firewalld.service

-自動起動の抑止
 systemctl disable firewalld.service

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS