|
1. 关于TAR的一些注意事项
1.1- [root@desktop4 ~]# tar -cvf /labs.tar /root/labs
复制代码- [root@desktop4 tmp]# tar -C / -zxvf labs.tar
复制代码- [root@desktop4 labs3]# rsync -avH --delete -n /root/labs/ ./
- sending incremental file list
- ./
- 2.txt
- 1.txt => 2.txt
- early_cpio
- initramfs-4.18.0-80.el8.x86_64.img
- kernel/
- kernel/x86/
- kernel/x86/microcode/
- kernel/x86/microcode/GenuineIntel.bin
- sent 275 bytes received 56 bytes 662.00 bytes/sec
- total size is 26,767,592 speedup is 80,868.86 (DRY RUN)
- [root@desktop4 labs3]# rsync -avH --delete /root/labs/ ./
- sending incremental file list
- ./
- 2.txt
- early_cpio
- initramfs-4.18.0-80.el8.x86_64.img
- kernel/
- kernel/x86/
- kernel/x86/microcode/
- kernel/x86/microcode/GenuineIntel.bin
- 1.txt => 2.txt
- sent 26,771,224 bytes received 132 bytes 53,542,712.00 bytes/sec
- total size is 26,767,592 speedup is 1.00
- [root@desktop4 labs3]# diff -r /root/labs /root/labs2
- [root@desktop4 labs3]# diff -r /root/labs /root/labs3
- [root@desktop4 labs3]#
复制代码 1.2- [root@desktop4 tmp]# tar tvf labs.tar
- drwxr-xr-x root/root 0 2020-03-07 20:32 root/labs/
- -rw------- root/root 26737392 2020-02-29 21:07 root/labs/initramfs-4.18.0-80.el8.x86_64.img
- -rw-r--r-- root/root 2 2019-01-16 00:49 root/labs/early_cpio
- drwxr-xr-x root/root 0 2020-02-29 21:08 root/labs/kernel/
- drwxr-xr-x root/root 0 2020-02-29 21:08 root/labs/kernel/x86/
- drwxr-xr-x root/root 0 2020-02-29 21:08 root/labs/kernel/x86/microcode/
- -rw-r--r-- root/root 23552 2019-01-16 00:49 root/labs/kernel/x86/microcode/GenuineIntel.bin
- -rw-r--r-- root/root 3323 2020-03-07 20:32 root/labs/1.txt
- [root@desktop4 tmp]# tar -C / -xvf labs.tar -k root/labs/kernel/
- root/labs/kernel/
- root/labs/kernel/x86/
- root/labs/kernel/x86/microcode/
- root/labs/kernel/x86/microcode/GenuineIntel.bin
- [root@desktop4 tmp]# cd
- [root@desktop4 ~]# ls
- anaconda-ks.cfg Documents labs labs3 original-ks.cfg Public Videos
- Desktop Downloads labs2 Music Pictures Templates
- [root@desktop4 ~]# cd labs
- [root@desktop4 labs]# ls
- kernel
复制代码
2. 关于KICKSTART
2.1 %package/mnt/AppStream/repodata:
- <groupid>office-suite</groupid>
- </grouplist>
- </category>
- <environment>
- <id>graphical-server-environment</id>
- <name>Server with GUI</name>
- <name xml:lang="as">GUI ৰ সৈতে চাৰ্ভাৰ</name>
- <name xml:lang="cs">Server s grafickym uživatelskym rozhraním</name>
- <name xml:lang="cs_CZ">Server s grafickym uživatelskym rozhraním</name>
- <name xml:lang="de">Server mit GUI</name>
- <name xml:lang="de_CH">Server mit GUI</name>
- <name xml:lang="es">Servidor con GUI</name>
- <name xml:lang="es_ES">Servidor con GUI</name>
- <name xml:lang="fr">Serveur avec GUI</name>
- <name xml:lang="gu">GUI વાળું સર્વર</name>
- <name xml:lang="hi">GUI सहित सर्वर</name>
- <name xml:lang="it">Server con GUI</name>
- <name xml:lang="it_IT">Server con GUI</name>
- <name xml:lang="ja">サーバー (GUI 使用)</name>
- <name xml:lang="ja_JP">サーバー (GUI 使用)</name>
- <name xml:lang="kn">GUI ಅನ್ನು ಹೊಂದಿರುವ ಪೂರೈಕೆಗಣಕ</name>
- <name xml:lang="ko">서버 - GUI 사용</name>
- <name xml:lang="ml">ജിയുഐയുള്ള സര്<200d>വര്<200d></name>
-
复制代码
2.2 %post是在真根环境下运行,因此shell编程的所有手段几乎都可以用,实在不能用的(比如说还要在这台还没推完的机器里,用virsh...装虚拟机,怎么办??)
2.3 %pre是在真根环境下运行,识别硬盘类型
%post %pre 不能传递变量, 所以才需要临时文件%include
|
|