teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

書式の改善

2021/09/04 06:57

投稿

malloc
malloc

スコア24

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