RHCSA 第一次作业

93 cd /opt
94 pwd
95 ls


image.png

96 mkdir tmp
97 ls
98 cd tmp/
99 touch t1.txt
100 ls
101 tree /opt


image.png

114 vim t1.txt
115 vi t1.txt
116 vim t1.txt
117 vim newfile
118 cd /boot/grub2/
119 ls
120 cat /boot/grub2/grub.cfg
122 cat /boot/grub2/grub.cfg > /opt/tmp/newfile
123 cat /opt/tmp/newfile
[root@server grub2]# cd /opt/tmp/
[root@server tmp]# ls
newfile newgile t1.txt ti.txt
[root@server tmp]# vim newfile

、、、
1 set pager=1
2
3 if [ -f {config_directory}/grubenv ]; then 4 load_env -f{config_directory}/grubenv
5 elif [ -s prefix/grubenv ]; then 6 load_env 7 fi 8 if [ "{next_entry}" ] ; then
9 set default="{next_entry}" 10 set next_entry= 11 save_env next_entry 12 set boot_once=true 13 else 14 set default="{saved_entry}"
15 fi
16
17 if [ x"{feature_menuentry_id}" = xy ]; then 18 menuentry_id_option="--id" 19 else 20 menuentry_id_option="" 21 fi 22 23 export menuentry_id_option 24 25 if [ "{prev_saved_entry}" ]; then
26 set saved_entry="{prev_saved_entry}" 27 save_env saved_entry 28 set prev_saved_entry= 29 save_env prev_saved_entry 30 set boot_once=true 31 fi 32 33 function savedefault { 34 if [ -z "{boot_once}" ]; then
35 saved_entry="{chosen}" 36 save_env saved_entry 37 fi } 39 40 function load_video { 41 if [ xfeature_all_video_module = xy ]; then
42 insmod all_video
43 else
44 insmod efi_gop
45 insmod efi_uga
46 insmod ieee1275_fb
47 insmod vbe
48 insmod vga
49 insmod video_bochs
50 insmod video_cirrus
51 fi
52 }
53
54 terminal_output console
55 if [ xfeature_timeout_style = xy ] ; then 56 set timeout_style=menu 57 set timeout=5 58 else 59 set timeout=5 60 fi 61 set tuned_params="" 62 set tuned_initrd="" 63 64 if [ -f{prefix}/user.cfg ]; then
65 source {prefix}/user.cfg 66 if [ -n "{GRUB2_PASSWORD}" ]; then
67 set superusers="root"
68 export superusers
69 password_pbkdf2 root {GRUB2_PASSWORD} 70 fi 71 fi 72 insmod increment 73 if [ -n "{boot_counter}" -a "{boot_success}" = "0" ]; then 74 if [ "{boot_counter}" = "0" -o "{boot_counter}" = "-1" ]; then 75 set default=1 76 set boot_counter=-1 77 else 78 decrement boot_counter 79 fi 80 save_env boot_counter 81 fi 82 insmod part_gpt 83 insmod xfs 84 set root='hd0,gpt2' 85 if [ xfeature_platform_search_hint = xy ]; then
86 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-bar emetal=ahci0,gpt2 38ebf4ea-25a0-4bb4-8ec7-211893e7d748
87 else
88 search --no-floppy --fs-uuid --set=root 38ebf4ea-25a0-4bb4-8ec7-211893e7d748
89 fi
90 insmod part_gpt
91 insmod fat
92 set boot='hd0,gpt1'
93 if [ xfeature_platform_search_hint = xy ]; then 94 search --no-floppy --fs-uuid --set=boot --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-bar emetal=ahci0,gpt1 7D6D-FDD1 95 else 96 search --no-floppy --fs-uuid --set=boot 7D6D-FDD1 97 fi 98 99 if [ -z "{kernelopts}" ]; then
100 set kernelopts="root=/dev/mapper/rhel-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet "
101 fi
102
103 insmod blscfg
104 blscfg
105 if [ "{boot_success}" = "1" -o "{boot_indeterminate}" = "1" ]; then
106 set menu_hide_ok=1
107 else
108 set menu_hide_ok=0
109 fi
110 if [ "{boot_success}" = "1" ] ; then 111 set boot_indeterminate=0 112 elif [ "{boot_indeterminate}" = "1" ]; then
113 set boot_indeterminate=2
114 fi
115 set boot_success=0
116 save_env boot_success boot_indeterminate
117
118 if [ xfeature_timeout_style = xy ] ; then 119 if [ "{menu_show_once}" ]; then
120 unset menu_show_once
121 save_env menu_show_once
122 set timeout_style=menu
123 set timeout=60
124 elif [ "{menu_auto_hide}" -a "{menu_hide_ok}" = "1" ]; then
125 set orig_timeout_style={timeout_style} 126 set orig_timeout={timeout}
127 if [ "{fastboot}" = "1" ]; then 128 set timeout_style=menu 129 set timeout=0 130 else 131 set timeout_style=hidden 132 set timeout=1 133 fi 134 fi 135 fi 136 if [ xfeature_timeout_style = xy ]; then
137 if [ "{menu_show_once_timeout}" ]; then 138 set timeout_style=menu 139 set timeout="{menu_show_once_timeout}"
140 unset menu_show_once_timeout
141 save_env menu_show_once_timeout
142 fi
143 fi
144 if [ "grub_platform" = "efi" ]; then 145 menuentry 'UEFI Firmware Settings'menuentry_id_option 'uefi-firmware' {
146 fwsetup
147 }
148 fi
149 if [ -f {config_directory}/custom.cfg ]; then 150 source{config_directory}/custom.cfg
151 elif [ -z "{config_directory}" -a -fprefix/custom.cfg ]; then
152 source $prefix/custom.cfg
153 fi

、、、

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容