CentOSとかUbuntuとか比較的インストールサイズが大きい、全部入りに飽きたので、Arch Linux
を使ってみることにしました。コンソールからすべて作業する手順が多いですが、コンソールではコピペができないのでSSHでインストールするようにします。
例によって参照先は下記の通りです。
https://wiki.archlinux.org/index.php/Install_from_SSH_(%E6%97%A5%E6%9C%AC%E8%AA%9E)
http://opamp.hatenablog.jp/entry/20110704/1309798049
http://blog.volment.com/?p=47
https://wiki.archlinux.org/index.php/Network_Configuration_(%E6%97%A5%E6%9C%AC%E8%AA%9E)
# 2014/05/25 パーティション作成とGRUBの設定を修正。USBメモリにインストールしている場合の手順追加。
NIC読み込みの確認
root@archiso ~ # lspci -v | grep -A 2 Ethernet
レスポンス貼り付け
NIC名の確認
root@archiso ~ # ls -l /sys/class/net
レスポンス貼り付け
root@archiso ~ # dhcpd eno16777736
SSHの有効化
root@archiso ~ # systemctl start sshd
インストールCDのRootユーザのパスワードを設定する。
とりあえず、root等で良い。
root@archiso ~ # passwd
Install
ここからは、SSHでremote接続して作業します。
gdisk /dev/sda
パーティションを切る
※他のOSをインストールしてあるディスクを使い回すときは、パーティション情報等をすべて削除した方がイイかも。
パーティションのフォーマット
インストール先のディバイスをマウント
root@archiso ~ # mount /dev/sda3 /mnt
root@archiso ~ # mkdir /mnt/boot
32 root@archiso ~ # mount /dev/sda1 /mnt/boot
root@archiso ~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/arch_root-image 1438256 681656 740216 48% /
dev 1012560 0 1012560 0% /dev
run 1023452 30736 992716 4% /run
/dev/sr0 546816 546816 0 100% /run/archiso/bootmnt
cowspace 1535180 1132 1534048 1% /run/archiso/cowspace
/dev/loop0 234880 234880 0 100% /run/archiso/sfs/root-image
tmpfs 1023452 0 1023452 0% /dev/shm
tmpfs 1023452 0 1023452 0% /sys/fs/cgroup
tmpfs 1023452 0 1023452 0% /tmp
tmpfs 1023452 912 1022540 1% /etc/pacman.d/gnupg
tmpfs 204692 0 204692 0% /run/user/0
/dev/sda3 12180228 30548 11507916 1% /mnt
/dev/sda1 271811 2062 251197 1% /mnt/boot
root@archiso ~ #
ミラーリポジトリの優先度を上げる
$ vim /etc/pacman.d/mirrorlist
# jpか何かでgrepして日本にミラーを一番上の行にもってくる
# Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
システムのインストール
1 root@archiso ~ # pacstrap /mnt base base-devel zsh vim openssl
インストール先にGRUBをインストール
1 root@archiso ~ # pacstrap /mnt grub-bios
fstabの生成
1 root@archiso ~ # genfstab -p /mnt >> /mnt/etc/fstab
1 root@archiso ~ # vim /mnt/etc/fstab
以下を追加する。
/dev/sda2 swap swap defaults 0 0
インストール先の設定
chrootでルートディレクトリを変更して、設定先に移行します。
1 root@archiso ~ # arch-chroot /mnt
rootユーザのパスワード設定
sh-4.3# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
sh-4.3#
タイムゾーンの設定
sh-4.3# ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
ロケールの設定
sh-4.3# vim /etc/locale.gen
sh-4.3# grep -ve "#" /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
sh-4.3# locale-gen
Generating locales...
en_US.UTF-8... done
ja_JP.EUC-JP... done
ja_JP.UTF-8... done
Generation complete.
sh-4.3#
GRUBの設定
sh-4.3# grub-install --target=i386-pc --recheck /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
sh-4.3#
sh-4.3# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initramfs image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
done
sh-4.3#
インストール先から抜ける
sh-4.3# exit
exit
root@archiso ~ #
インストール先のディバイスをアンマウント
root@archiso ~ # umount /mnt/{boot,}
root@archiso ~ #
再起動して、インストール先ディバイスから起動
root@archiso ~ # reboot
NICの設定
# ls -l /sys/class/net
# systemctl enable dhcpcd@ens33
SSHの有効化
# pacman -S openssh
# systemctl start sshd
# systemctl enable sshd
SWAPの設定
[root@localhost ~]# mkswap /dev/sda2
Setting up swapspace version 1, size = 2931856 KiB
no label, UUID=48a2821e-87d6-40ee-abda-506fc785515d
[root@localhost ~]# swapon /dev/sda2
ifconfigとWgetを使うために入れる
sudo pacman -S net-tools wget
user追加
[root@localhost ~]# useradd testUser
[root@localhost ~]# mkdir /home/testUser
[root@localhost ~]# chown -R testUser:testUser /home/testUser
Initial ramdisk 環境の作成
USBメモリやLVM、RAIDでインストールした場合は必ず実施する。
[root@localhost ~]# mkinitcpio -p linux
詳細はInitial ramdisk 環境の作成
を使ってみることにしました。コンソールからすべて作業する手順が多いですが、コンソールではコピペができないのでSSHでインストールするようにします。
例によって参照先は下記の通りです。
https://wiki.archlinux.org/index.php/Install_from_SSH_(%E6%97%A5%E6%9C%AC%E8%AA%9E)
http://opamp.hatenablog.jp/entry/20110704/1309798049
http://blog.volment.com/?p=47
https://wiki.archlinux.org/index.php/Network_Configuration_(%E6%97%A5%E6%9C%AC%E8%AA%9E)
# 2014/05/25 パーティション作成とGRUBの設定を修正。USBメモリにインストールしている場合の手順追加。
NIC読み込みの確認
root@archiso ~ # lspci -v | grep -A 2 Ethernet
レスポンス貼り付け
NIC名の確認
root@archiso ~ # ls -l /sys/class/net
レスポンス貼り付け
NICの有効化
root@archiso ~ # ip link set eno16777736 up
root@archiso ~ # ip addr
動的 IP アドレス
IPアドレスが取得できない場合は、下記のコマンドでDHCPを有効にしてIPアドレスを取得する。root@archiso ~ # dhcpd eno16777736
SSHの有効化
root@archiso ~ # systemctl start sshd
インストールCDのRootユーザのパスワードを設定する。
とりあえず、root等で良い。
root@archiso ~ # passwd
Install
ここからは、SSHでremote接続して作業します。
gdisk /dev/sda
パーティションを切る
- /dev/sda1 /boot 400MB
- /dev/sda2 swap 5GB
- /dev/sda3 / 残り
※MBRの場合は、一番先頭に「ef02(BIOS boot partition)」を作成する必要があります。
※他のOSをインストールしてあるディスクを使い回すときは、パーティション情報等をすべて削除した方がイイかも。
root@archiso ~ # csgdisk --zap-all /dev/sda
パーティションのフォーマット
root@archiso ~ # mkfs.ext4
/dev/sda1
root@archiso ~ # mkfs.ext4
/dev/sda3
インストール先のディバイスをマウント
root@archiso ~ # mount /dev/sda3 /mnt
root@archiso ~ # mkdir /mnt/boot
32 root@archiso ~ # mount /dev/sda1 /mnt/boot
root@archiso ~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/arch_root-image 1438256 681656 740216 48% /
dev 1012560 0 1012560 0% /dev
run 1023452 30736 992716 4% /run
/dev/sr0 546816 546816 0 100% /run/archiso/bootmnt
cowspace 1535180 1132 1534048 1% /run/archiso/cowspace
/dev/loop0 234880 234880 0 100% /run/archiso/sfs/root-image
tmpfs 1023452 0 1023452 0% /dev/shm
tmpfs 1023452 0 1023452 0% /sys/fs/cgroup
tmpfs 1023452 0 1023452 0% /tmp
tmpfs 1023452 912 1022540 1% /etc/pacman.d/gnupg
tmpfs 204692 0 204692 0% /run/user/0
/dev/sda3 12180228 30548 11507916 1% /mnt
/dev/sda1 271811 2062 251197 1% /mnt/boot
root@archiso ~ #
ミラーリポジトリの優先度を上げる
$ vim /etc/pacman.d/mirrorlist
# jpか何かでgrepして日本にミラーを一番上の行にもってくる
# Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
システムのインストール
1 root@archiso ~ # pacstrap /mnt base base-devel zsh vim openssl
インストール先にGRUBをインストール
1 root@archiso ~ # pacstrap /mnt grub-bios
fstabの生成
1 root@archiso ~ # genfstab -p /mnt >> /mnt/etc/fstab
1 root@archiso ~ # vim /mnt/etc/fstab
以下を追加する。
/dev/sda2 swap swap defaults 0 0
インストール先の設定
chrootでルートディレクトリを変更して、設定先に移行します。
1 root@archiso ~ # arch-chroot /mnt
rootユーザのパスワード設定
sh-4.3# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
sh-4.3#
タイムゾーンの設定
sh-4.3# ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
ロケールの設定
sh-4.3# vim /etc/locale.gen
sh-4.3# grep -ve "#" /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
sh-4.3# locale-gen
Generating locales...
en_US.UTF-8... done
ja_JP.EUC-JP... done
ja_JP.UTF-8... done
Generation complete.
sh-4.3#
GRUBの設定
sh-4.3# grub-install --target=i386-pc --recheck /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
sh-4.3#
sh-4.3# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initramfs image: /boot/initramfs-linux.img
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
done
sh-4.3#
インストール先から抜ける
sh-4.3# exit
exit
root@archiso ~ #
インストール先のディバイスをアンマウント
root@archiso ~ # umount /mnt/{boot,}
root@archiso ~ #
再起動して、インストール先ディバイスから起動
root@archiso ~ # reboot
NICの設定
# ls -l /sys/class/net
# ip link set ens33 up
# ip addr
・一時的にDHCPを有効にする場合
・一時的にDHCPを有効にする場合
# dhcpd ens33
・恒久的にDHCPを有効にする場合
# systemctl start dhcpcd@ens33・恒久的にDHCPを有効にする場合
# systemctl enable dhcpcd@ens33
SSHの有効化
# pacman -S openssh
# systemctl start sshd
# systemctl enable sshd
SWAPの設定
[root@localhost ~]# mkswap /dev/sda2
Setting up swapspace version 1, size = 2931856 KiB
no label, UUID=48a2821e-87d6-40ee-abda-506fc785515d
[root@localhost ~]# swapon /dev/sda2
ifconfigとWgetを使うために入れる
sudo pacman -S net-tools wget
user追加
[root@localhost ~]# useradd testUser
[root@localhost ~]# mkdir /home/testUser
[root@localhost ~]# chown -R testUser:testUser /home/testUser
Initial ramdisk 環境の作成
USBメモリやLVM、RAIDでインストールした場合は必ず実施する。
[root@localhost ~]# mkinitcpio -p linux
詳細はInitial ramdisk 環境の作成
Micro Touch Hair Trimmer in a Shave Brush - Titsanium Art
返信削除A beautiful and unique shave brush designed for those titanium price who love makeup and hair styling. The Micro titanium nipple barbells Touch hair trimmer is a titanium white octane blueprint high quality titanium trim reviews brush titanium bracelet that