質問編集履歴

1

書式の改善

2021/09/04 06:57

投稿

malloc
malloc

スコア24

test CHANGED
File without changes
test CHANGED
@@ -22,53 +22,69 @@
22
22
 
23
23
  ○virt-install の実行内容
24
24
 
25
+
26
+
25
-
27
+ ```
26
-
28
+
27
- > # virt-install \
29
+ # virt-install \
28
-
30
+
29
- > --name centos7-ana \
31
+ --name centos7-ana \
30
-
32
+
31
- > --memory 2048 \
33
+ --memory 2048 \
32
-
34
+
33
- > --vcpus 2 \
35
+ --vcpus 2 \
34
-
36
+
35
- > --disk size=8 \
37
+ --disk size=8 \
36
-
38
+
37
- > --network=default \
39
+ --network=default \
38
-
40
+
39
- > --cdrom /root/iso/centos7-ks.iso \
41
+ --cdrom /root/iso/centos7-ks.iso \
40
-
42
+
41
- > --os-variant rhel7 \
43
+ --os-variant rhel7 \
44
+
42
-
45
+ ```
43
-
46
+
47
+
44
48
 
45
49
  ○実行結果
46
50
 
47
51
  仮想マシンコンソール(virt-manager)に表示されたエントリから、追加した以下を選択。
48
52
 
53
+
54
+
55
+ ```
56
+
49
- > Kickstart Installation of centos7
57
+ Kickstart Installation of centos7
58
+
50
-
59
+ ```
51
-
60
+
61
+
52
62
 
53
63
  しばらく起動処理が流れたあと、
54
64
 
55
65
  以下のメッセージが複数コンソールに出力されます。
56
66
 
67
+
68
+
69
+ ```
70
+
57
- > dracut-initqueue timeout - starting timeout scripts
71
+ dracut-initqueue timeout - starting timeout scripts
72
+
58
-
73
+ ```
59
-
60
74
 
61
75
  このあと、以下のメッセージで、エマージェンシーモードに遷移し、
62
76
 
63
77
  dracut:/# プロンプトに移行します。
64
78
 
79
+
80
+
65
-
81
+ ```
66
-
82
+
67
- > Could not boot.
83
+ Could not boot.
68
-
84
+
69
- > /dev/root does not exist
85
+ /dev/root does not exist
86
+
70
-
87
+ ```
71
-
72
88
 
73
89
  インストール処理が継続しません。
74
90
 
@@ -80,151 +96,151 @@
80
96
 
81
97
 
82
98
 
83
- > # mount -o loop /root/iso/CentOS-7-x86_64-DVD-1804.iso /tmp
84
-
85
- > # shopt -s dotglob
86
-
87
- > # cp -avRf /mnt/* /root/rhel-install/
88
-
89
- >
90
-
91
- > # vi /root/rhel-install/anaconda-ks.cfg
92
-
93
- > ====
94
-
95
- > #version=DEVEL
96
-
97
- > # System authorization information
98
-
99
- > auth --enableshadow --passalgo=sha512
100
-
101
- > # Use CDROM installation media
102
-
103
- > cdrom
104
-
105
- > # Use graphical install
106
-
107
- > text
108
-
109
- > # Run the Setup Agent on first boot
110
-
111
- > firstboot --enable
112
-
113
- > ignoredisk --only-use=vda
114
-
115
- > # Keyboard layouts
116
-
117
- > keyboard --vckeymap=jp --xlayouts='jp'
118
-
119
- > # System language
120
-
121
- > lang ja_JP.UTF-8
122
-
123
- >
124
-
125
- > # Network information
126
-
127
- > network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate
128
-
129
- > network --hostname=localhost.localdomain
130
-
131
- >
132
-
133
- > # Root password
134
-
135
- > rootpw --plaintext hogehogefugafuga
136
-
137
- > # System services
138
-
139
- > services --enabled="chronyd"
140
-
141
- > # System timezone
142
-
143
- > timezone Asia/Tokyo --isUtc
144
-
145
- > # System bootloader configuration
146
-
147
- > bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
148
-
149
- > autopart --type=plain
150
-
151
- > # Partition clearing information
152
-
153
- > clearpart --none --initlabel
154
-
155
- >
156
-
157
- > %packages
158
-
159
- > @^minimal
160
-
161
- > @core
162
-
163
- > chrony
164
-
165
- > kexec-tools
166
-
167
- >
168
-
169
- > %end
170
-
171
- >
172
-
173
- > %addon com_redhat_kdump --enable --reserve-mb='auto'
174
-
175
- >
176
-
177
- > %end
178
-
179
- >
180
-
181
- > %anaconda
182
-
183
- > pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
184
-
185
- > pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
186
-
187
- > pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
188
-
189
- > %end
190
-
191
- > ====
192
-
193
- >
194
-
195
- > # isoinfo -d -i /root/iso/CentOS-7-x86_64-DVD-1804.iso |grep "Volume id" | \
196
-
197
- > > sed -e 's/Volume id: //' -e 's/ /\x20/g'
198
-
199
- > CentOS\x207\x20x86_64
200
-
201
- >
202
-
203
- >
204
-
205
- > # vi /root/rhel-install/isolinux/isolinux.cfg
206
-
207
- > ===
208
-
209
- > label kickstart
210
-
211
- > menu label ^Kickstart Installation of centos7
212
-
213
- > kernel vmlinuz
214
-
215
- > append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 inst.ks=hd:LABEL=CentOS\x207\x20x86_64:/anaconda-ks.cfg
216
-
217
- > ==
218
-
219
- >
220
-
221
- > # 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/
222
-
223
- >
224
-
225
- > # isohybrid --uefi /root/rhel-ks.iso
226
-
227
- >
99
+ ```
100
+
101
+ $ mount -o loop /root/iso/CentOS-7-x86_64-DVD-1804.iso /tmp
102
+
103
+ $ shopt -s dotglob
104
+
105
+ $ cp -avRf /mnt/* /root/rhel-install/
106
+
107
+ $ vi /root/rhel-install/anaconda-ks.cfg
108
+
109
+ +---------------------------
110
+
111
+ + #version=DEVEL
112
+
113
+ + # System authorization information
114
+
115
+ + auth --enableshadow --passalgo=sha512
116
+
117
+ + # Use CDROM installation media
118
+
119
+ + cdrom
120
+
121
+ + # Use graphical install
122
+
123
+ + text
124
+
125
+ + # Run the Setup Agent on first boot
126
+
127
+ + firstboot --enable
128
+
129
+ + ignoredisk --only-use=vda
130
+
131
+ + # Keyboard layouts
132
+
133
+ + keyboard --vckeymap=jp --xlayouts='jp'
134
+
135
+ + # System language
136
+
137
+ + lang ja_JP.UTF-8
138
+
139
+ +
140
+
141
+ + # Network information
142
+
143
+ + network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate
144
+
145
+ + network --hostname=localhost.localdomain
146
+
147
+ +
148
+
149
+ + # Root password
150
+
151
+ + rootpw --plaintext hogehogefugafuga
152
+
153
+ + # System services
154
+
155
+ + services --enabled="chronyd"
156
+
157
+ + # System timezone
158
+
159
+ + timezone Asia/Tokyo --isUtc
160
+
161
+ + # System bootloader configuration
162
+
163
+ + bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
164
+
165
+ + autopart --type=plain
166
+
167
+ + # Partition clearing information
168
+
169
+ + clearpart --none --initlabel
170
+
171
+ +
172
+
173
+ + %packages
174
+
175
+ + @^minimal
176
+
177
+ + @core
178
+
179
+ + chrony
180
+
181
+ + kexec-tools
182
+
183
+ +
184
+
185
+ + %end
186
+
187
+ +
188
+
189
+ + %addon com_redhat_kdump --enable --reserve-mb='auto'
190
+
191
+ +
192
+
193
+ + %end
194
+
195
+ +
196
+
197
+ + %anaconda
198
+
199
+ + pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
200
+
201
+ + pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
202
+
203
+ + pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
204
+
205
+ + %end
206
+
207
+ +---------------------------
208
+
209
+
210
+
211
+ $ isoinfo -d -i /root/iso/CentOS-7-x86_64-DVD-1804.iso |grep "Volume id" | \
212
+
213
+ > sed -e 's/Volume id: //' -e 's/ /\x20/g'
214
+
215
+ CentOS\x207\x20x86_64
216
+
217
+
218
+
219
+ $ vi /root/rhel-install/isolinux/isolinux.cfg
220
+
221
+ +---------------------------
222
+
223
+ + label kickstart
224
+
225
+ + menu label ^Kickstart Installation of centos7
226
+
227
+ + kernel vmlinuz
228
+
229
+ + append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 inst.ks=hd:LABEL=CentOS\x207\x20x86_64:/anaconda-ks.cfg
230
+
231
+ +---------------------------
232
+
233
+ $ 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/
234
+
235
+
236
+
237
+ $ isohybrid --uefi /root/rhel-ks.iso
238
+
239
+
240
+
241
+ ```
242
+
243
+
228
244
 
229
245
  ※実行後、/root/rhel-ks.iso を /root/iso/centos7-ks.iso へ mv で配置。
230
246