質問編集履歴
1
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,108 +10,116 @@
|
|
10
10
|
|
11
11
|
▼実施内容
|
12
12
|
○virt-install の実行内容
|
13
|
+
|
13
|
-
|
14
|
+
```
|
14
|
-
|
15
|
+
# virt-install \
|
15
|
-
|
16
|
+
--name centos7-ana \
|
16
|
-
|
17
|
+
--memory 2048 \
|
17
|
-
|
18
|
+
--vcpus 2 \
|
18
|
-
|
19
|
+
--disk size=8 \
|
19
|
-
|
20
|
+
--network=default \
|
20
|
-
|
21
|
+
--cdrom /root/iso/centos7-ks.iso \
|
21
|
-
|
22
|
+
--os-variant rhel7 \
|
22
|
-
|
23
|
+
```
|
24
|
+
|
23
25
|
○実行結果
|
24
26
|
仮想マシンコンソール(virt-manager)に表示されたエントリから、追加した以下を選択。
|
27
|
+
|
28
|
+
```
|
25
|
-
|
29
|
+
Kickstart Installation of centos7
|
26
|
-
|
30
|
+
```
|
31
|
+
|
27
32
|
しばらく起動処理が流れたあと、
|
28
33
|
以下のメッセージが複数コンソールに出力されます。
|
34
|
+
|
35
|
+
```
|
29
|
-
|
36
|
+
dracut-initqueue timeout - starting timeout scripts
|
30
|
-
|
37
|
+
```
|
31
38
|
このあと、以下のメッセージで、エマージェンシーモードに遷移し、
|
32
39
|
dracut:/# プロンプトに移行します。
|
40
|
+
|
33
|
-
|
41
|
+
```
|
34
|
-
|
42
|
+
Could not boot.
|
35
|
-
|
43
|
+
/dev/root does not exist
|
36
|
-
|
44
|
+
```
|
37
45
|
インストール処理が継続しません。
|
38
46
|
このため、カスタムISO作成の不備と思われますが、設定の問題を見つけられていません。
|
39
47
|
|
40
48
|
▼カスタムISO作成にあたっての作業
|
41
49
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
>
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
50
|
+
```
|
51
|
+
$ mount -o loop /root/iso/CentOS-7-x86_64-DVD-1804.iso /tmp
|
52
|
+
$ shopt -s dotglob
|
53
|
+
$ cp -avRf /mnt/* /root/rhel-install/
|
54
|
+
$ vi /root/rhel-install/anaconda-ks.cfg
|
55
|
+
+---------------------------
|
56
|
+
+ #version=DEVEL
|
57
|
+
+ # System authorization information
|
58
|
+
+ auth --enableshadow --passalgo=sha512
|
59
|
+
+ # Use CDROM installation media
|
60
|
+
+ cdrom
|
61
|
+
+ # Use graphical install
|
62
|
+
+ text
|
63
|
+
+ # Run the Setup Agent on first boot
|
64
|
+
+ firstboot --enable
|
65
|
+
+ ignoredisk --only-use=vda
|
66
|
+
+ # Keyboard layouts
|
67
|
+
+ keyboard --vckeymap=jp --xlayouts='jp'
|
68
|
+
+ # System language
|
69
|
+
+ lang ja_JP.UTF-8
|
70
|
+
+
|
71
|
+
+ # Network information
|
72
|
+
+ network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate
|
73
|
+
+ network --hostname=localhost.localdomain
|
74
|
+
+
|
75
|
+
+ # Root password
|
76
|
+
+ rootpw --plaintext hogehogefugafuga
|
77
|
+
+ # System services
|
78
|
+
+ services --enabled="chronyd"
|
79
|
+
+ # System timezone
|
80
|
+
+ timezone Asia/Tokyo --isUtc
|
81
|
+
+ # System bootloader configuration
|
82
|
+
+ bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
|
83
|
+
+ autopart --type=plain
|
84
|
+
+ # Partition clearing information
|
85
|
+
+ clearpart --none --initlabel
|
86
|
+
+
|
87
|
+
+ %packages
|
88
|
+
+ @^minimal
|
89
|
+
+ @core
|
90
|
+
+ chrony
|
91
|
+
+ kexec-tools
|
92
|
+
+
|
93
|
+
+ %end
|
94
|
+
+
|
95
|
+
+ %addon com_redhat_kdump --enable --reserve-mb='auto'
|
96
|
+
+
|
97
|
+
+ %end
|
98
|
+
+
|
99
|
+
+ %anaconda
|
100
|
+
+ pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
|
101
|
+
+ pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
|
102
|
+
+ pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
|
103
|
+
+ %end
|
104
|
+
+---------------------------
|
105
|
+
|
106
|
+
$ isoinfo -d -i /root/iso/CentOS-7-x86_64-DVD-1804.iso |grep "Volume id" | \
|
107
|
+
> sed -e 's/Volume id: //' -e 's/ /\x20/g'
|
108
|
+
CentOS\x207\x20x86_64
|
109
|
+
|
110
|
+
$ vi /root/rhel-install/isolinux/isolinux.cfg
|
111
|
+
+---------------------------
|
112
|
+
+ label kickstart
|
113
|
+
+ menu label ^Kickstart Installation of centos7
|
114
|
+
+ kernel vmlinuz
|
115
|
+
+ append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 inst.ks=hd:LABEL=CentOS\x207\x20x86_64:/anaconda-ks.cfg
|
116
|
+
+---------------------------
|
117
|
+
$ mkisofs -untranslated-filenames -volid "centos7.x86_64" -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o /root/rhel-ks.iso -graft-points /root/rhel-install/
|
118
|
+
|
119
|
+
$ isohybrid --uefi /root/rhel-ks.iso
|
120
|
+
|
121
|
+
```
|
122
|
+
|
115
123
|
※実行後、/root/rhel-ks.iso を /root/iso/centos7-ks.iso へ mv で配置。
|
116
124
|
|
117
125
|
▼利用環境
|