$ gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify archlinux-2019.01.01-x86_64.iso.sig
gpg: assuming signed data in 'archlinux-2019.01.01-x86_64.iso'
gpg: Signature made Wed 02 Jan 2019 12:23:53 AM JST
gpg: using RSA key 4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
gpg: requesting key 7F2D434B9741E8AC from hkp server pgp.mit.edu
\gpg: key 7F2D434B9741E8AC: 31 signatures not checked due to missing keys
gpg: key 7F2D434B9741E8AC: public key "Pierre Schmitz <pierre@archlinux.de>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
gpg: Good signature from "Pierre Schmitz <pierre@archlinux.de>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4AA4 767B BC9C 4B1D 18AE 28B7 7F2D 434B 9741 E8AC
# vim /etc/pacman.d/mirrorlist # 日本を最上位に移動する
# head /etc/pacman.d/mirrorlist
...
# Japan
# pacman -Syu # Wifiの設定後でもOK
2.3.1.WiFiの設定
まずインターフェイスの確認
wから始まっているのが往々にして無線のネットワークインターフェイス
1
2
3
4
5
6
7
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether e8:6a:64:86:78:38 brd ff:ff:ff:ff:ff:ff
3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 20:79:18:d2:ca:1c brd ff:ff:ff:ff:ff:ff
wlp2s0が対象のI/F
ore_oreという名前(任意)のプロファイルを作る
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# cp /etc/netctl/examples/wireless-wpa /etc/netctl/ore_ore
# cat /etc/netctl/ore_ore
Description='A simple WPA encrypted wireless connection'
Interface=wlan0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='MyNetwork'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='WirelessKey'
# Uncomment this if your ssid is hidden
#Hidden=yes
# Set a priority for automatic profile selection
#Priority=10
ore_ore プロファイルを修正する
変更するのは次の3点
Interface: WifiのI/F(この場合はwlp2s0)
ESSID: wifiのSSID
Key: WifiのPW
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# vi /etc/netctl/ore_ore # ゴニョゴニョ
# cat /etc/netctl/ore_ore
Description='A simple WPA encrypted wireless connection'
Interface=wlp2s0
Connection=wireless
Security=wpa
IP=dhcp
ESSID='XXX'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='XXX'
# Uncomment this if your ssid is hidden
#Hidden=yes
# Set a priority for automatic profile selection
#Priority=10
Wifiに接続する
pingが通れば成功
1
2
3
4
5
6
7
# netctl start ore_ore # 数秒かかる
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=8.90 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=10.1 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=121 time=10.4 ms
...
$ gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-1000215182, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-1000215182, default = 1000215182) or {+-}size{KMGTP}: +512MB
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): EF00
Changed type of partition to 'EFI System'
Command (? for help): n
Partition number (2-128, default 2):
First sector (34-1000215182, default = 1050624) or {+-}size{KMGTP}:
Last sector (1050624-1000215182, default = 1000215182) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8E00
Changed type of partition to 'Linux LVM'
Command (? for help): w
# 最後のコマンドはy、全部書き換える
パーテーションの確認
1
2
3
4
5
6
7
8
9
10
11
12
$ fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: LENSE30512GMSP34MEAT3TA
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 07E88104-29C7-41AE-91AD-379E474EA1C7
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 1000215182 999164559 476.4G Linux LVM
2.3.3.LVMパーテーションの暗号化
LVMパーテーションの暗号化する
暗号はデフォのLUKSを使用する
パスフレーズは覚えておく
1
# cryptsetup luksFormat /dev/nvme0n1p2 # ※p1ではない
2.3.4.LVMの中に論理ボリュームを作成する
まずは、LVMを復号化して開く
main_partは任意のデバイスマッパーネームをつける
1
# cryptsetup open --type luks /dev/nmve0n1p2 main_part
LVMの中に物理ボリューム(PV)を作成
1
# pvcreate /dev/mapper/main_part
PVの確認
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# pvscan
PV /dev/mapper/cryptlvm VG main_group lvm2 [476.43 GiB / 0 free]
Total: 1 [476.43 GiB] / in use: 1 [476.43 GiB] / in no VG: 0 [0 ]
# pvdisplay
--- Physical volume ---
PV Name /dev/mapper/cryptlvm
VG Name main_group
PV Size <476.44 GiB / not usable <3.32 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 121967
Free PE 0
Allocated PE 121967
PV UUID D9rfJy-SqUn-I6Ca-PzzO-eb79-E61t-fHkwmu
# vgscan
Reading volume groups from cache.
Found volume group "main_group" using metadata type lvm2
# vgdisplay
--- Volume group ---
VG Name main_group
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 476.43 GiB
PE Size 4.00 MiB
Total PE 121967
Alloc PE / Size 121967 / 476.43 GiB
Free PE / Size 0 / 0
VG UUID LiXnT1-xe6V-dmpZ-r7fs-HZF4-14wT-VrFTy5
# lvscan
ACTIVE '/dev/main_group/swap' [8.00 GiB] inherit
ACTIVE '/dev/main_group/root' [64.00 GiB] inherit
ACTIVE '/dev/main_group/home' [404.43 GiB] inherit
# lvdisplay
--- Logical volume ---
LV Path /dev/main_group/swap
LV Name swap
VG Name main_group
LV UUID 79nm1Z-BCbW-Rhra-tryB-7lR9-XsCv-1jHiQD
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:14:18 +0000
LV Status available
# open 2
LV Size 8.00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Path /dev/main_group/root
LV Name root
VG Name main_group
LV UUID FqcEYQ-0cUp-BMul-VxND-42Es-BHsE-Yj4zdB
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:14:50 +0000
LV Status available
# open 1
LV Size 64.00 GiB
Current LE 16384
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
--- Logical volume ---
LV Path /dev/main_group/home
LV Name home
VG Name main_group
LV UUID VlSY7x-8Q0O-UFQL-rnQT-05xp-inTH-QLCieR
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:15:09 +0000
LV Status available
# open 1
LV Size 404.43 GiB
Current LE 103535
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:3
--- Logical volume ---
LV Path /dev/main_group/swap
LV Name swap
VG Name main_group
LV UUID 79nm1Z-BCbW-Rhra-tryB-7lR9-XsCv-1jHiQD
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:14:18 +0000
LV Status available
# open 2
LV Size 8.00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Path /dev/main_group/root
LV Name root
VG Name main_group
LV UUID FqcEYQ-0cUp-BMul-VxND-42Es-BHsE-Yj4zdB
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:14:50 +0000
LV Status available
# open 1
LV Size 64.00 GiB
Current LE 16384
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
--- Logical volume ---
LV Path /dev/main_group/home
LV Name home
VG Name main_group
LV UUID VlSY7x-8Q0O-UFQL-rnQT-05xp-inTH-QLCieR
LV Write Access read/write
LV Creation host, time archiso, 2019-01-22 13:15:09 +0000
LV Status available
# open 1
LV Size 404.43 GiB
Current LE 103535
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:3
tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa 7) Europe
2) Americas 8) Indian Ocean
3) Antarctica 9) Pacific Ocean
4) Asia 10) coord - I want to use geographical coordinates.
5) Atlantic Ocean 11) TZ - I want to specify the timezone using the Posix TZ format.
6) Australia
#? 4
Please select a country whose clocks agree with yours.
1) Afghanistan 9) China 17) Iraq 25) Kyrgyzstan 33) Oman 41) Sri Lanka 49) Vietnam
2) Armenia 10) Cyprus 18) Israel 26) Laos 34) Pakistan 42) Syria 50) Yemen
3) Azerbaijan 11) East Timor 19) Japan 27) Lebanon 35) Palestine 43) Taiwan
4) Bahrain 12) Georgia 20) Jordan 28) Macau 36) Philippines 44) Tajikistan
5) Bangladesh 13) Hong Kong 21) Kazakhstan 29) Malaysia 37) Qatar 45) Thailand
6) Bhutan 14) India 22) Korea (North) 30) Mongolia 38) Russia 46) Turkmenistan
7) Brunei 15) Indonesia 23) Korea (South) 31) Myanmar (Burma) 39) Saudi Arabia 47) United Arab Emirates
8) Cambodia 16) Iran 24) Kuwait 32) Nepal 40) Singapore 48) Uzbekistan
#? 19
The following information has been given:
Japan
Therefore TZ='Asia/Tokyo' will be used.
Selected time is now: Sat Feb 9 16:34:35 JST 2019.
Universal Time is now: Sat Feb 9 07:34:35 UTC 2019.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Tokyo'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Tokyo
add mozc and prioritize it more over Keyboard English
change default keyboard layout to to English(US)
Global config > show advance options
active input method = lart
inactive input method = ralt
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=XXX:cryptlvm root=/dev/mapper/main_group-root resume=/dev/mapper/main_group-swap quiet rw