Bo's Oracle Station

查看: 1379|回复: 0

课程第14次:2020-03-07星期六

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-3-7 19:51:57 | 显示全部楼层 |阅读模式
1. 关于TAR的一些注意事项
1.1
  1. [root@desktop4 ~]# tar -cvf /labs.tar   /root/labs
复制代码
  1. [root@desktop4 tmp]# tar -C / -zxvf labs.tar
复制代码
  1. [root@desktop4 labs3]# rsync -avH --delete -n /root/labs/  ./
  2. sending incremental file list
  3. ./
  4. 2.txt
  5. 1.txt => 2.txt
  6. early_cpio
  7. initramfs-4.18.0-80.el8.x86_64.img
  8. kernel/
  9. kernel/x86/
  10. kernel/x86/microcode/
  11. kernel/x86/microcode/GenuineIntel.bin

  12. sent 275 bytes  received 56 bytes  662.00 bytes/sec
  13. total size is 26,767,592  speedup is 80,868.86 (DRY RUN)
  14. [root@desktop4 labs3]# rsync -avH --delete  /root/labs/  ./
  15. sending incremental file list
  16. ./
  17. 2.txt
  18. early_cpio
  19. initramfs-4.18.0-80.el8.x86_64.img
  20. kernel/
  21. kernel/x86/
  22. kernel/x86/microcode/
  23. kernel/x86/microcode/GenuineIntel.bin
  24. 1.txt => 2.txt

  25. sent 26,771,224 bytes  received 132 bytes  53,542,712.00 bytes/sec
  26. total size is 26,767,592  speedup is 1.00
  27. [root@desktop4 labs3]# diff -r /root/labs /root/labs2
  28. [root@desktop4 labs3]# diff -r /root/labs /root/labs3
  29. [root@desktop4 labs3]#
复制代码
1.2
  1. [root@desktop4 tmp]# tar tvf labs.tar
  2. drwxr-xr-x root/root         0 2020-03-07 20:32 root/labs/
  3. -rw------- root/root  26737392 2020-02-29 21:07 root/labs/initramfs-4.18.0-80.el8.x86_64.img
  4. -rw-r--r-- root/root         2 2019-01-16 00:49 root/labs/early_cpio
  5. drwxr-xr-x root/root         0 2020-02-29 21:08 root/labs/kernel/
  6. drwxr-xr-x root/root         0 2020-02-29 21:08 root/labs/kernel/x86/
  7. drwxr-xr-x root/root         0 2020-02-29 21:08 root/labs/kernel/x86/microcode/
  8. -rw-r--r-- root/root     23552 2019-01-16 00:49 root/labs/kernel/x86/microcode/GenuineIntel.bin
  9. -rw-r--r-- root/root      3323 2020-03-07 20:32 root/labs/1.txt
  10. [root@desktop4 tmp]# tar -C / -xvf labs.tar  -k root/labs/kernel/
  11. root/labs/kernel/
  12. root/labs/kernel/x86/
  13. root/labs/kernel/x86/microcode/
  14. root/labs/kernel/x86/microcode/GenuineIntel.bin
  15. [root@desktop4 tmp]# cd
  16. [root@desktop4 ~]# ls
  17. anaconda-ks.cfg  Documents  labs   labs3  original-ks.cfg  Public     Videos
  18. Desktop          Downloads  labs2  Music  Pictures         Templates
  19. [root@desktop4 ~]# cd labs
  20. [root@desktop4 labs]# ls
  21. kernel
复制代码

2. 关于KICKSTART
2.1 %package/mnt/AppStream/repodata:
  1.     <groupid>office-suite</groupid>
  2.     </grouplist>
  3.   </category>
  4.   <environment>
  5.     <id>graphical-server-environment</id>
  6.     <name>Server with GUI</name>
  7.     <name xml:lang="as">GUI &#2544; &#2488;&#2504;&#2468;&#2503; &#2458;&#2494;&#2544;&#2509;&#2477;&#2494;&#2544;</name>
  8.     <name xml:lang="cs">Server s grafickym u&#382;ivatelskym rozhraním</name>
  9.     <name xml:lang="cs_CZ">Server s grafickym u&#382;ivatelskym rozhraním</name>
  10.     <name xml:lang="de">Server mit GUI</name>
  11.     <name xml:lang="de_CH">Server mit GUI</name>
  12.     <name xml:lang="es">Servidor con GUI</name>
  13.     <name xml:lang="es_ES">Servidor con GUI</name>
  14.     <name xml:lang="fr">Serveur avec GUI</name>
  15.     <name xml:lang="gu">GUI &#2741;&#2750;&#2739;&#2753;&#2690; &#2744;&#2736;&#2765;&#2741;&#2736;</name>
  16.     <name xml:lang="hi">GUI &#2360;&#2361;&#2367;&#2340; &#2360;&#2352;&#2381;&#2357;&#2352;</name>
  17.     <name xml:lang="it">Server con GUI</name>
  18.     <name xml:lang="it_IT">Server con GUI</name>
  19.     <name xml:lang="ja">サーバー (GUI 使用)</name>
  20.     <name xml:lang="ja_JP">サーバー (GUI 使用)</name>
  21.     <name xml:lang="kn">GUI &#3205;&#3240;&#3277;&#3240;&#3265; &#3257;&#3274;&#3202;&#3238;&#3263;&#3248;&#3265;&#3253; &#3242;&#3266;&#3248;&#3272;&#3221;&#3270;&#3223;&#3235;&#3221;</name>
  22.     <name xml:lang="ko">&#49436;&#48260; - GUI &#49324;&#50857;</name>
  23.     <name xml:lang="ml">&#3356;&#3391;&#3375;&#3393;&#3344;&#3375;&#3393;&#3379;&#3405;&#3379; &#3384;&#3376;&#3405;<200d>&#3381;&#3376;&#3405;<200d></name>
  24.                                                             
复制代码


2.2 %post是在真根环境下运行,因此shell编程的所有手段几乎都可以用,实在不能用的(比如说还要在这台还没推完的机器里,用virsh...装虚拟机,怎么办??)
2.3 %pre是在真根环境下运行,识别硬盘类型

%post  %pre 不能传递变量, 所以才需要临时文件%include


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-20 13:16 , Processed in 0.035029 second(s), 24 queries .

快速回复 返回顶部 返回列表