<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SkyWang Weekly</title><description>SkyWang life</description><link>https://blog.skywangdev.com/en/</link><atom:icon>https://gw.alicdn.com/imgextra/i2/O1CN01m9YYjS1QBeW5DOm3I_!!6000000001938-2-tps-400-400.png</atom:icon><atom:logo>https://gw.alicdn.com/imgextra/i2/O1CN01m9YYjS1QBeW5DOm3I_!!6000000001938-2-tps-400-400.png</atom:logo><image><url>https://gw.alicdn.com/imgextra/i2/O1CN01m9YYjS1QBeW5DOm3I_!!6000000001938-2-tps-400-400.png</url><title>Tw93 Weekly</title><link>https://blog.skywangdev.com/en/</link></image><follow_challenge><feedId>41147805276726276</feedId><userId>42909600318350336</userId></follow_challenge><item><title>8. iperf3测速</title><link>https://blog.skywangdev.com/en/posts/8/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/8/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-10.jpeg&quot; width=&quot;800&quot;&gt;
&lt;p&gt;Using iperf3 to test connection speed between different hosts.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install iperf3&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# CentOS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum -y install iperf3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dnf install iperf3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get -y install iperf3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Alpine&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apk add iperf3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Arch Linux&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pacman -S iperf3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# Windows iperf3 download links&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# https://files.budman.pw/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# https://github.com/ar51an/iperf3-win-builds&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;iperf3 Speed Test Usage&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;iperf3 -s -p 5201&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-s&lt;/code&gt; indicates server mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-p&lt;/code&gt; specifies the port to use (default port 5201. Don’t forget to allow the port in the firewall)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-D&lt;/code&gt; runs as a daemon in the background, add the -D parameter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then initiate the speed test from the local machine.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;iperf3 -c 1.1.1.31 -p 5201 -t 30 -P 5 -R&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-c&lt;/code&gt; indicates client mode and specifies the speed test server address&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-p&lt;/code&gt; specifies the server port&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-t&lt;/code&gt; specifies the test duration (in seconds)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-P&lt;/code&gt; specifies the number of concurrent connections (higher values help test speed limits)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-R&lt;/code&gt; is for reverse testing, indicating download speed test (without this parameter, upload speed is tested)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-u&lt;/code&gt; to test UDP connections, add the -u parameter&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-i&lt;/code&gt; specifies the test interval in seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The [SUM] line contains the test data (based on the receiver), with an average bandwidth speed of 74.9 Mbits per second.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;root@cloudcone-42:~# iperf3 -c 1.1.1.31 -p 5201 -i 1 -t 10 -P 5 -R&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Connecting to host 1.1.1.31, port 5201&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Reverse mode, remote host 1.1.1.31 is sending&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  5] local 64.69.40.42 port 55344 connected to 1.1.1.31 port 5201    # 5 threads started. The number in brackets at the beginning is the thread ID, mainly to distinguish each thread in the following data.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  7] local 64.69.40.42 port 55356 connected to 1.1.1.31 port 5201    # All five threads successfully connected to the server, default port 5001&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  9] local 64.69.40.42 port 55366 connected to 1.1.1.31 port 5201&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 11] local 64.69.40.42 port 55370 connected to 1.1.1.31 port 5201&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13] local 64.69.40.42 port 55378 connected to 1.1.1.31 port 5201&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ ID] Interval           Transfer     Bitrate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  5]   0.00-1.00   sec  15.8 MBytes   133 Mbits/sec   # First column, interval, indicates the time range&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  7]   0.00-1.00   sec  15.2 MBytes   128 Mbits/sec   # Second column, transfer, indicates the amount of data transferred&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  9]   0.00-1.00   sec  25.8 MBytes   216 Mbits/sec   # Third column, bandwidth, indicates the transmission bandwidth&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 11]   0.00-1.00   sec  22.7 MBytes   190 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13]   0.00-1.00   sec  23.3 MBytes   196 Mbits/sec   # Since multiple threads are running simultaneously, the bandwidth of each thread is not the actual bandwidth&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[SUM]   0.00-1.00   sec   103 MBytes   863 Mbits/sec   # The actual bandwidth is indicated by the SUM row. Our client command summarizes bandwidth reports every 1s, so adding the bandwidth of threads in the same time interval roughly equals the actual SUM bandwidth.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- - - - - - - - - - - - - - - - - - - - - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  5]  29.00-30.00  sec  12.0 MBytes   101 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  7]  29.00-30.00  sec  17.6 MBytes   147 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  9]  29.00-30.00  sec  26.9 MBytes   226 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 11]  29.00-30.00  sec  25.7 MBytes   215 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13]  29.00-30.00  sec  24.7 MBytes   207 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[SUM]  29.00-30.00  sec   107 MBytes   896 Mbits/sec&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- - - - - - - - - - - - - - - - - - - - - - - - -&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ ID] Interval           Transfer     Bitrate         Retr&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  5]   0.00-10.00  sec   191 MBytes   160 Mbits/sec  968             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  5]   0.00-10.00  sec   189 MBytes   158 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  7]   0.00-10.00  sec   196 MBytes   165 Mbits/sec  873             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  7]   0.00-10.00  sec   193 MBytes   162 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  9]   0.00-10.00  sec   290 MBytes   244 Mbits/sec  1284             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[  9]   0.00-10.00  sec   287 MBytes   241 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 11]   0.00-10.00  sec   161 MBytes   135 Mbits/sec  744             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 11]   0.00-10.00  sec   160 MBytes   134 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13]   0.00-10.00  sec   156 MBytes   131 Mbits/sec  724             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13]   0.00-10.00  sec   155 MBytes   130 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[SUM]   0.00-10.00  sec   995 MBytes   835 Mbits/sec  4593             sender&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[SUM]   0.00-10.00  sec   984 MBytes   826 Mbits/sec                  receiver&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;iperf Done.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Test Result Interpretation:&lt;/p&gt;
&lt;p&gt;Concurrent Streams:&lt;/p&gt;
&lt;p&gt;The test shows 5 concurrent streams (stream IDs 5, 7, 9, 11, 13), with the transmission details for each stream as follows:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 5]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Transfer: 18.7 MB (approx. 157 Mbps)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Send Rate: 160 Mbps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Receive Rate: 158 Mbps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Retransmissions: 968&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;[ 13]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Transfer: 17.0 MB (approx. 142 Mbps)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Send Rate: 131 Mbps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Receive Rate: 130 Mbps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Retransmissions: 724&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Total Statistics:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total Sent: 995 MB (approx. 835 Mbps)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total Received: 984 MB (approx. 826 Mbps)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Total Retransmissions: 4593&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Analysis:&lt;/p&gt;
&lt;p&gt;Throughput: Through testing with 5 concurrent streams, the receiver received approximately 984 MB of data in total, and the sender sent approximately 995 MB. The overall throughput is roughly between 826 - 835 Mbps, indicating relatively stable network connection performance.&lt;/p&gt;
&lt;p&gt;Retransmissions: The number of retransmissions (4593) indicates some packet loss occurred during transmission. While the packet loss is not extremely severe, the presence of retransmissions suggests the network is not completely error-free.&lt;/p&gt;
&lt;p&gt;Speed Differences Between Streams: Stream 9’s transfer volume is significantly higher than other streams (252 Mbps), while streams 11 and 13 have lower rates (139 Mbps and 142 Mbps). This may indicate that network load balancing between different streams is not entirely uniform, or some streams are limited by network bottlenecks or other factors.&lt;/p&gt;
&lt;p&gt;Summary:&lt;/p&gt;
&lt;p&gt;The test results show that the average network connection speed over 10 seconds is approximately 835 Mbps (sent) and 826 Mbps (received), which is relatively ideal.&lt;/p&gt;
&lt;p&gt;Although there are some retransmissions, there is no significant packet loss, and the variation in stream transmission rates suggests possible uneven network load or other factors affecting stream performance.&lt;/p&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Wed, 12 Mar 2025 00:00:00 GMT</pubDate></item><item><title>7. ffmpeg 笔记</title><link>https://blog.skywangdev.com/en/posts/7/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/7/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-9.jpeg&quot; width=&quot;800&quot;&gt;
&lt;h5 id=&quot;merge-all-videos-in-a-folder&quot;&gt;&lt;a href=&quot;#merge-all-videos-in-a-folder&quot; title=&quot;Merge All Videos in a Folder&quot;&gt;&lt;/a&gt;Merge All Videos in a Folder&lt;/h5&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;2&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;3&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;5&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;find *.mp4 | sed &apos;s:\ :\\\ :g&apos;| sed &apos;s/^/file /&apos; &gt; fl.txt&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -f concat -i fl.txt -c copy output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;// Ignore error messages&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -safe 0 -f concat -i fl.txt -c copy output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;rm fl.txt&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/28922352/how-can-i-merge-all-the-videos-in-a-folder-to-make-a-single-video-file-using-ffm&quot;&gt;Reference&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;video-compression&quot;&gt;&lt;a href=&quot;#video-compression&quot; title=&quot;Video Compression&quot;&gt;&lt;/a&gt;Video Compression&lt;/h5&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;2&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;3&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;5&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;6&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;// Video encoded with h.264, audio encoded with aac&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -vcodec h264 -acodec aac output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;// Video encoded with h.265, compressed to a smaller file&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;// Video encoded with h.264, preserving better quality&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The smaller the crf, the higher the video quality; the larger the crf, the smaller the video file.&lt;/p&gt;
&lt;p&gt;Encoding parameters can also be abbreviated, changing from &lt;code&gt;-vcodec&lt;/code&gt; and &lt;code&gt;-acodec&lt;/code&gt; to &lt;code&gt;-c:v&lt;/code&gt; and &lt;code&gt;-c:a&lt;/code&gt;:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;2&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;3&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -c:v libx264 -crf 23 output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -c:v libx265 -crf 28 output.mp4&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 31 -b:v 0 output.mkv&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;https://slhck.info/video/2017/02/24/crf-guide.html&quot;&gt;Reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Both &lt;code&gt;AVC/H264&lt;/code&gt; and &lt;code&gt;HEVC/H265&lt;/code&gt; are software encoders and are very slow. You can choose NVIDIA’s hardware encoders: hevc_nvenc and h264_nvenc, which use hardware acceleration and are very fast.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.bilibili.com/opus/376578377423593855&quot;&gt;Reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using NVIDIA graphics card for encoding:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i video.mp4 -c:v hevc_nvenc -crf 28 output.mp4&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Transcoding a video from H.264 to H.265 took 55 minutes, reducing the video size from 3.8GB to 430MB, with immediate results. Transcoding command: &lt;code&gt;ffmpeg -i 1.mp4 -c:v libx265 -vtag hvc1 -c:a copy 1_hevc.mp4&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;On Windows 10, you can install ffmpeg using scoop and update all programs installed via scoop on Windows with:&lt;br&gt;
&lt;code&gt;scoop list | foreach { scoop update $_.Name }&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Trim a video with the same encoding according to a specified time:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -ss 00:05 -to 08:53.500 -i ./input.mp4 -c copy video.mp4&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Quickly edit a video using ffmpeg:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -ss 07:18 -to 13:45 -i ./aaa.mkv -c copy bbb.mkv&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;-ss indicates the start time&lt;/li&gt;
&lt;li&gt;-to indicates the end time&lt;/li&gt;
&lt;li&gt;-i is the input file&lt;/li&gt;
&lt;li&gt;-c means using the same encoding as the original video&lt;/li&gt;
&lt;li&gt;bbb is the name of the output file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Merge video and audio, keeping the video encoding unchanged and changing the audio encoding to aac:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i 1.mp4 -i 1.opus -c:v copy -c:a aac output.mp4&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Convert PNG format images to JPG format:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i image.png -preset ultrafast image.jpg&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Resize an image:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;2&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i image.jpeg -vf scale=413:626 2-inch.jpeg&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -i image.jpeg -vf scale=390:567 1-inch.jpeg&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Repeat an audio file 10 times:&lt;/p&gt;
&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;1&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;line&quot;&gt;ffmpeg -stream_loop 10 -i input.m4a -c copy output.m4a&lt;/span&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Tue, 17 Sep 2024 00:00:00 GMT</pubDate></item><item><title>6. DELL服务器配置RAID</title><link>https://blog.skywangdev.com/en/posts/6/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/6/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-8.jpeg&quot; width=&quot;800&quot;&gt;
&lt;p&gt;&lt;strong&gt;I. Requirement Description&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The server has two 480GB SSD drives at the front and four 4TB HDDs at the back. The first two SSDs will be configured as RAID 1 for the operating system, while the four mechanical drives will be set up as RAID 5 for data storage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;II. Creating RAID 1 and RAID 5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;2.1. After the server boots up, press F2 at the following screen to enter System Setup.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/1.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/1.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.2. Inside System Setup, locate Device Settings.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/2.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/2.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.3. Find Integrated RAID Controller1\:Dell\Configuration Utility. Select it and click to enter.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/3.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/3.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: The image above shows the server’s RAID controller card.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What does the H740P Mini RAID controller actually look like? See below:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/4.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/4.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The H740P Mini RAID controller primarily features an 8GB fast cache. This cache allows the RAID card to act as a buffer for read/write operations between server drives.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/5.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/5.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.4. Then select Main Menu.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/6.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/6.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.5. First, check if all drives are online and functioning properly. Select Physical Disk Management.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/7.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/7.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.6. You can see that the two 480GB SSDs are in Ready status, and the four 4TB HDDs are also Ready. Return to the previous level.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/8.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/8.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.7. Select Configuration Management.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/9.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/9.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.8. Select Create Virtual Disk.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/10.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/10.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.9. Under Select RAID Level, choose RAID 1.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/11.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/11.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.10. RAID level is now set to RAID 1.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/12.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/12.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.11. Next, select the first two SSD drives. Click Select Physical Disks.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/13.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/13.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.12. Choose the two 480GB SSDs. Use the up/down arrow keys to highlight a drive and press the spacebar to check the box in front of it. After selecting both drives, click Apply Changes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/14.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/14.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.13. Click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/15.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/15.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.14. Configure RAID 1 parameters.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/16.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/16.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virtual Disk Name:&lt;/strong&gt; Name the RAID 1 virtual disk as needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virtual Disk Size:&lt;/strong&gt; Space size, select the default full capacity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virtual Disk Size Unit:&lt;/strong&gt; Choose the unit for disk size.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Strip Element Size:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Stripe size, select the default 256KB. How to set the stripe size? For database server applications, typically choose 4-16KB. For large files, CAD, or rendering large images, it’s recommended to set it to 128KB or higher. For web servers or print servers, 16-64KB is sufficient.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read Policy:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Choose Read Ahead mode: Pre-read mode. The advantage of this mode is that when a user reads data, the drive loads the data into the RAID card’s 8GB cache for delivery, rather than the user reading directly from the drive.&lt;/p&gt;
&lt;p&gt;If you choose No Read Ahead mode: The user reads data directly from the drive, which is slower compared to Read Ahead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Write Policy:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Choose Write Back mode: Write-back mode. When a user writes data to the drive, it is not written directly to the drive. Instead, the data is first written to the RAID card’s 8GB cache, and then the cache writes the data to the drive. This method is faster.&lt;/p&gt;
&lt;p&gt;Write Through mode: The user writes data directly to the drive without using the RAID card’s cache. This mode is slower than Write Back.&lt;/p&gt;
&lt;p&gt;Force Write Back mode: What does forced write-back mean? This relates to the RAID card’s battery. RAID cards are powered by batteries, which typically last about three years. Regardless of whether the RAID card has power, data is first written to the RAID card’s cache before being transferred to the drive. However, if the RAID battery dies after three years and data is being written to the server at that moment, the data in the cache could be lost in the event of a sudden power outage. It is not recommended to choose Force Write Back.&lt;/p&gt;
&lt;p&gt;If Write Back mode is selected and the RAID card battery dies, the policy will automatically switch to Write Through mode.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disk Cache:&lt;/strong&gt; Select Default.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default Initialization:&lt;/strong&gt; Initialization, choose Fast for quick drive initialization. This allows you to install the operating system on RAID 1 immediately after creation without waiting. If you choose Full, you must wait for RAID 1 to complete initialization before installing the operating system. To check the initialization progress of RAID 1, refer to the end of this article.&lt;/p&gt;
&lt;p&gt;2.15. Check Confirm, then click Yes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/17.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/17.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.16. Click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/18.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/18.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.17. After clicking OK, you will return to the previous screen. Continue creating RAID 5.&lt;/p&gt;
&lt;p&gt;Under Select RAID Level, choose RAID 5.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/19.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/19.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.18. After selecting RAID 5, choose Select Physical Disks.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/20.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/20.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.19. Select the remaining four 4TB HDDs. Then click Apply Changes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/21.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/21.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.20. Click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/22.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/22.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.21. The parameters for RAID 5 are the same as for RAID 1. Then select Create Virtual Disk.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/23.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/23.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.22. Check Confirm, then click Yes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/24.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/24.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.23. Click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/25.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/25.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.24. The drives have been created. Click Back. At this point, RAID 1 and RAID 5 have been successfully created.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/26.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/26.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;III. Verification and Inspection&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3.1. Check RAID Creation&lt;/p&gt;
&lt;p&gt;Return to the Main Menu and find Configuration Management.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/27.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/27.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select View Disk Group Properties.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/28.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/28.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now, you can see two Disk Groups: one for RAID 1 and another for RAID 5. Both RAIDs have been created.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/29.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/29.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3.2. Check RAID Initialization Progress&lt;/p&gt;
&lt;p&gt;Return to the Main Menu and find Virtual Disk Management.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/30.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/30.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here, you can see that RAID 1 is initializing, currently at 12%.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/31.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/31.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Initialization at 16%. If you selected Full initialization for the RAID drives during parameter configuration, you must wait for RAID 1 to reach 100% initialization before installing the operating system.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://yan-jian.com/file/20231208/32.png&quot;&gt;&lt;img src=&quot;https://yan-jian.com/file/20231208/32.png&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Tue, 23 May 2023 00:00:00 GMT</pubDate></item><item><title>5. Linux命令总结</title><link>https://blog.skywangdev.com/en/posts/5/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/5/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-7.jpeg&quot; width=&quot;800&quot;&gt;
&lt;h2 id=&quot;1-basic-commands&quot;&gt;&lt;a href=&quot;#1-basic-commands&quot;&gt;&lt;/a&gt;1. Basic Commands&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;uname -m Show machine processor architecture&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;uname -r Show kernel version in use&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dmidecode -q Show hardware system components&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(SMBIOS / DMI) hdparm -i /dev/hda List a disk&apos;s architecture characteristics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hdparm -tT /dev/sda Perform a test read operation on a disk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;arch Show machine processor architecture&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;uname -m Show machine processor architecture&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;uname -r Show kernel version in use&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dmidecode -q Show hardware system components - (SMBIOS / DMI)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hdparm -i /dev/hda List a disk&apos;s architecture characteristics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;hdparm -tT /dev/sda Perform a test read operation on a disk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/cpuinfo Display CPU info&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/interrupts Display interrupts&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/meminfo Verify memory usage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/swaps Show which swap is being used&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/version Display kernel version&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/net/dev Display network adapters and statistics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat /proc/mounts Display mounted filesystems&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;lspci -tv List PCI devices&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;lsusb -tv Display USB devices&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;date Display system date&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cal 2007 Display 2007 calendar&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;date 041217002007.00 Set date and time - month day hour minute year.second&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;clock -w Save time modification to BIOS&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;2-shutdown&quot;&gt;&lt;a href=&quot;#2-shutdown&quot;&gt;&lt;/a&gt;2. Shutdown&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;shutdown -h now Shutdown system (1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;init 0 Shutdown system (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;telinit 0 Shutdown system (3)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;shutdown -h hours:minutes &amp;#x26; Schedule system shutdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;shutdown -c Cancel scheduled system shutdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;shutdown -r now Reboot (1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reboot Reboot (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;logout Logout&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;3-files-and-directories&quot;&gt;&lt;a href=&quot;#3-files-and-directories&quot;&gt;&lt;/a&gt;3. Files and Directories&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd /home Enter &apos;/home&apos; directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd .. Go back one directory level&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ../.. Go back two directory levels&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd Go to home directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd ~user1 Go to user1&apos;s home directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cd - Go back to previous directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pwd Show working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls View files in directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -F View files in directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -l Show detailed list of files and directories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -a Show hidden files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls *[0-9]* Show filenames and directory names containing numbers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tree Show tree structure of files and directories starting from root (1)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;lstree Show tree structure of files and directories starting from root (2)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir dir1 Create a directory named &apos;dir1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir dir1 dir2 Create two directories simultaneously&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mkdir -p /tmp/dir1/dir2 Create a directory tree&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -f file1 Delete a file named &apos;file1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rmdir dir1 Delete a directory named &apos;dir1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -rf dir1 Delete a directory named &apos;dir1&apos; and its contents&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rm -rf dir1 dir2 Delete two directories and their contents simultaneously&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mv dir1 new_dir Rename/move a directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp file1 file2 Copy a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp dir/* . Copy all files in a directory to current working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp -a /tmp/dir1 . Copy a directory to current working directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cp -a dir1 dir2 Copy a directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ln -s file1 lnk1 Create a symbolic link to a file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ln file1 lnk1 Create a hard link to a file or directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;touch -t 0712250000 file1 Modify a file or directory&apos;s timestamp - (YYMMDDhhmm)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;file file1 outputs the mime type of the file as text&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;iconv -l List known encodings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;iconv -f fromEncoding -t toEncoding inputFile &gt; outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find . -maxdepth 1 -name *.jpg -print -exec convert &quot;{}&quot; -resize 80x60 &quot;thumbs/{}&quot; \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;4-file-search&quot;&gt;&lt;a href=&quot;#4-file-search&quot;&gt;&lt;/a&gt;4. File Search&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find / -name file1 Search for files and directories starting from &apos;/&apos; into root filesystem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find / -user user1 Search for files and directories belonging to user &apos;user1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find /home/user1 -name \*.bin Search for files ending with &apos;.bin&apos; in directory &apos;/home/user1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find /usr/bin -type f -atime +100 Search for executable files not used in the last 100 days&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find /usr/bin -type f -mtime -10 Search for files created or modified within the last 10 days&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find / -name \*.rpm -exec chmod 755 &apos;{}&apos; \; Search for files ending with &apos;.rpm&apos; and define their permissions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find / -xdev -name \*.rpm Search for files ending with &apos;.rpm&apos;, ignoring removable devices like CD-ROMs, flash drives&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;locate \*.ps Find files ending with &apos;.ps&apos; - run &apos;updatedb&apos; command first&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;whereis halt Show location of a binary, source, or man page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;which halt Show full path of a binary or executable file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;5-mount-a-filesystem&quot;&gt;&lt;a href=&quot;#5-mount-a-filesystem&quot;&gt;&lt;/a&gt;5. Mount a Filesystem&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/hda2 /mnt/hda2 Mount a disk called hda2 - ensure directory &apos;/mnt/hda2&apos; exists&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;umount /dev/hda2 Unmount a disk called hda2 - exit from mount point &apos;/mnt/hda2&apos; first&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;fuser -km /mnt/hda2 Force unmount when device is busy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;umount -n /mnt/hda2 Perform unmount operation without writing to /etc/mtab file - useful when filesystem is read-only or disk is full&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/fd0 /mnt/floppy Mount a floppy disk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/cdrom /mnt/cdrom Mount a cdrom or dvdrom&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/hdc /mnt/cdrecorder Mount a cdrw or dvdrom&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/hdb /mnt/cdrecorder Mount a cdrw or dvdrom&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount -o loop file.iso /mnt/cdrom Mount a file or ISO image file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount -t vfat /dev/hda5 /mnt/hda5 Mount a Windows FAT32 filesystem&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount /dev/sda1 /mnt/usbdisk Mount a usb flash drive or storage device&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share Mount a windows network share&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;6-disk-space&quot;&gt;&lt;a href=&quot;#6-disk-space&quot;&gt;&lt;/a&gt;6. Disk Space&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;df -h Show list of mounted partitions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -lSr |more List files and directories sorted by size&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;du -sh dir1 Estimate disk space used by directory &apos;dir1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;du -sk * | sort -rn Show size of files and directories sorted by capacity&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -q -a --qf &apos;%10{SIZE}t%{NAME}n&apos; | sort -k1,1n Show space used by installed rpm packages sorted by size (fedora, redhat systems)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg-query -W -f=&apos;${Installed-Size;10}t${Package}n&apos; | sort -k1,1n Show space used by installed deb packages sorted by size (ubuntu, debian systems)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;7-users-and-groups&quot;&gt;&lt;a href=&quot;#7-users-and-groups&quot;&gt;&lt;/a&gt;7. Users and Groups&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;groupadd group_name Create a new user group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;groupdel group_name Delete a user group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;groupmod -n new_group_name old_group_name Rename a user group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;useradd -c &quot;Name Surname &quot; -g admin -d /home/user1 -s /bin/bash user1 Create a user belonging to &quot;admin&quot; group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;useradd user1 Create a new user&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;userdel -r user1 Delete a user ( &apos;-r&apos; removes home directory)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;usermod -c &quot;User FTP&quot; -g system -d /ftp/user1 -s /bin/nologin user1 Modify user attributes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;passwd Change password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;passwd user1 Change a user&apos;s password (root only)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chage -E 2005-12-31 user1 Set user password expiration date&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;pwck Check &apos;/etc/passwd&apos; file format, syntax, and existing users&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grpck Check &apos;/etc/passwd&apos; file format, syntax, and existing groups&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;newgrp group_name Log into a new group to change default group for newly created files&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;8-file-permissions-use--to-set-permissions-use---to-remove&quot;&gt;&lt;a href=&quot;#8-file-permissions-use--to-set-permissions-use--to-remove&quot;&gt;&lt;/a&gt;8. File Permissions Use “+” to set permissions, use “-” to remove&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls -lh Show permissions&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;ls /tmp | pr -T5 -W$COLUMNS Divide terminal into 5 columns for display&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod ugo+rwx directory1 Set read (r), write (w), and execute (x) permissions for owner (u), group (g), and others (o) on directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod go-rwx directory1 Remove read, write, execute permissions for group (g) and others (o) on directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chown user1 file1 Change ownership of a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chown -R user1 directory1 Change ownership of a directory and all its contents&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chgrp group1 file1 Change group of a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chown user1:group1 file1 Change owner and group of a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find / -perm -u+s List all files with SUID set in the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod u+s /bin/file1 Set SUID bit on a binary file - user executing the file gets same permissions as owner&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod u-s /bin/file1 Disable SUID bit on a binary file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod g+s /home/public Set SGID bit on a directory - similar to SUID, but for directories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod g-s /home/public Disable SGID bit on a directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod o+t /home/public Set sticky bit on a file - only legitimate owner can delete the file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod o-t /home/public Disable sticky bit on a directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod +x file_path Add execute permission for owner, group, and others&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod -x file_path Remove execute permission for owner, group, and others&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod u+x file_path Add execute permission for owner&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod g+x file_path Add execute permission for group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod o+x file_path Add execute permission for others&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod ug+x file_path Add execute permission for owner and group&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod =wx file_path Add write and execute permissions for owner, group, and others; remove read permission&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chmod ug=wx file_path Add write and execute permissions for owner and group; remove read permission&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;9-special-file-attributes-use--to-set-permissions-use---to-remove&quot;&gt;&lt;a href=&quot;#9-special-file-attributes-use--to-set-permissions-use--to-remove&quot;&gt;&lt;/a&gt;9. Special File Attributes Use “+” to set permissions, use “-” to remove&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +a file1 Allow file to be opened in append mode only for reading and writing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +c file1 Allow kernel to automatically compress/decompress this file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +d file1 dump program will ignore this file during filesystem backup&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +i file1 Make file immutable, cannot be deleted, modified, renamed, or linked&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +s file1 Allow file to be securely deleted&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +S file1 Make system immediately write modifications to disk after application writes to this file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chattr +u file1 If file is deleted, system allows you to recover it later&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;lsattr Show special attributes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;10-packing-and-compressing-files&quot;&gt;&lt;a href=&quot;#10-packing-and-compressing-files&quot;&gt;&lt;/a&gt;10. Packing and Compressing Files&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bunzip2 file1.bz2 Decompress a file called &apos;file1.bz2&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bzip2 file1 Compress a file called &apos;file1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gunzip file1.gz Decompress a file called &apos;file1.gz&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gzip file1 Compress a file called &apos;file1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;gzip -9 file1 Maximum compression&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rar a file1.rar test_file Create an archive called &apos;file1.rar&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rar a file1.rar file1 file2 dir1 Compress &apos;file1&apos;, &apos;file2&apos; and directory &apos;dir1&apos; simultaneously&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rar x file1.rar Extract rar archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;unrar x file1.rar Extract rar archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -cvf archive.tar file1 Create a non-compressed tarball&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -cvf archive.tar file1 file2 dir1 Create an archive containing &apos;file1&apos;, &apos;file2&apos;, and &apos;dir1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -tf archive.tar Show contents of an archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -xvf archive.tar Extract an archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -xvf archive.tar -C /tmp Extract archive to /tmp directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -cvfj archive.tar.bz2 dir1 Create a bzip2 compressed archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -xvfj archive.tar.bz2 Extract a bzip2 compressed archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -cvfz archive.tar.gz dir1 Create a gzip compressed archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tar -xvfz archive.tar.gz Extract a gzip compressed archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;zip file1.zip file1 Create a zip compressed archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;zip -r file1.zip file1 file2 dir1 Compress several files and directories into a zip archive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;unzip file1.zip Extract a zip compressed archive&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;11-rpm-packages&quot;&gt;&lt;a href=&quot;#11-rpm-packages&quot;&gt;&lt;/a&gt;11. RPM Packages&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -ivh package.rpm Install an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -ivh --nodeeps package.rpm Install an rpm package ignoring dependency warnings&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -U package.rpm Update an rpm package without changing its configuration files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -F package.rpm Update an rpm package that is definitely installed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -e package_name.rpm Remove an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qa Show all installed rpm packages in the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qa | grep httpd Show all rpm packages containing &quot;httpd&quot; in their name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qi package_name Get specific information about an installed package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qg &quot;System Environment/Daemons&quot; Show rpm packages of a component&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -ql package_name Show file list provided by an installed rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qc package_name Show configuration file list provided by an installed rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -q package_name --whatrequires Show dependency list for an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -q package_name --whatprovides Show size occupied by an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -q package_name --scripts Show scripts executed during installation/removal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -q package_name --changelog Show modification history of an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qf /etc/httpd/conf/httpd.conf Confirm which rpm package provides the given file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qp package.rpm -l Show file list provided by an uninstalled rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm --import /media/cdrom/RPM-GPG-KEY Import public key digital certificate&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm --checksig package.rpm Verify integrity of an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -qa gpg-pubkey Verify integrity of all installed rpm packages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -V package_name Check file size, permissions, type, owner, group, MD5 check, and last modification time&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -Va Check all installed rpm packages in the system - use with caution&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -Vp package.rpm Verify an rpm package is not yet installed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm2cpio package.rpm | cpio --extract --make-directories *bin* Run executable files from an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm Install a built package from an rpm source&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;rpmbuild --rebuild package_name.src.rpm Build an rpm package from an rpm source&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;12-yum-package-updater&quot;&gt;&lt;a href=&quot;#12-yum-package-updater&quot;&gt;&lt;/a&gt;12. YUM Package Updater&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum install package_name Download and install an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum localinstall package_name.rpm Install an rpm package using your own software repositories to resolve all dependencies&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum update package_name.rpm Update all installed rpm packages in the current system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum update package_name Update an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum remove package_name Remove an rpm package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum list List all installed packages in the current system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum search package_name Search for software packages in rpm repositories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum clean packages Clean rpm cache delete downloaded packages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum clean headers Delete all header files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;yum clean all Delete all cached packages and header files&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;13-deb-packages&quot;&gt;&lt;a href=&quot;#13-deb-packages&quot;&gt;&lt;/a&gt;13. deb Packages&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -i package.deb Install/update a deb package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -r package_name Remove a deb package from the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -l Show all installed deb packages in the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -l | grep httpd Show all deb packages containing &quot;httpd&quot; in their name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -s package_name Get information about a specific package installed in the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -L package_name Show file list provided by an installed deb package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg --contents package.deb Show file list provided by an uninstalled package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;dpkg -S /bin/ping Confirm which deb package provides the given file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;APT Software Tools (Debian, Ubuntu and similar systems)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get install package_name Install/update a deb package&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-cdrom install package_name Install/update a deb package from CD&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get update Upgrade list of software packages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get upgrade Upgrade all installed software&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get remove package_name Remove a deb package from the system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get check Confirm dependency software repositories are correct&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-get clean Clean cache from downloaded software packages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;apt-cache search searched-package Return package names containing the search string&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;14-view-file-contents&quot;&gt;&lt;a href=&quot;#14-view-file-contents&quot;&gt;&lt;/a&gt;14. View File Contents&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat file1 View file contents from the first byte forward&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tac file1 View a file in reverse starting from the last line&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;more file1 View contents of a long file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;less file1 Similar to &apos;more&apos; command, but allows reverse operations like forward operations in the file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;head -2 file1 View first two lines of a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tail -2 file1 View last two lines of a file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;tail -f /var/log/messages Real-time view of content being added to a file&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;15-text-processing&quot;&gt;&lt;a href=&quot;#15-text-processing&quot;&gt;&lt;/a&gt;15. Text Processing&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat file1 file2 ... | command &amp;#x3C;&gt; file1_in.txt_or_file1_out.txt general syntax for text manipulation using PIPE, STDIN and STDOUT&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat file1 | command( sed, grep, awk, grep, etc...) &gt; result.txt Merge detailed description text of a file and write summary to a new file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;cat file1 | command( sed, grep, awk, grep, etc...) &gt;&gt; result.txt Merge detailed description text of a file and write summary to an existing file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grep Aug /var/log/messages Find keyword &quot;Aug&quot; in file &apos;/var/log/messages&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grep ^Aug /var/log/messages Find words starting with &quot;Aug&quot; in file &apos;/var/log/messages&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grep [0-9] /var/log/messages Select all lines containing numbers in file &apos;/var/log/messages&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;grep Aug -R /var/log/* Search for string &quot;Aug&quot; in directory &apos;/var/log&apos; and subsequent directories&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;sed &apos;s/stringa1/stringa2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Mon, 12 Sep 2022 00:00:00 GMT</pubDate></item><item><title>4. 配置PXE</title><link>https://blog.skywangdev.com/en/posts/4/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/4/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-4.jpeg&quot; width=&quot;800&quot;&gt;
&lt;h1 id=&quot;pxe&quot;&gt;PXE&lt;/h1&gt;
&lt;p&gt;Quick Start Guide. The following operations are performed on Ubuntu 20.04.&lt;/p&gt;
&lt;h2 id=&quot;install-required-software&quot;&gt;Install Required Software&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;apt&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; tftpd-hpa&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; isc-dhcp-server&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nginx&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;download-operating-system-iso-images&quot;&gt;Download Operating System ISO Images&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;rhel-server-7.9-x86_64-dvd.iso&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;rhel-8.3-x86_64-dvd.iso&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Kylin-Server-10-SP1-Release-Build20-20210518-x86_64.iso&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Kylin-Server-10-SP2-x86-Release-Build09-20210524.iso&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;create-a-local-repository&quot;&gt;Create a Local Repository&lt;/h2&gt;
&lt;p&gt;Using RHEL 7.9 as an example. The process is similar for other distributions.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /mnt/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mount&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel-server-7.9-x86_64-dvd.iso&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /mnt/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /mnt/rhel79&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/nginx/sites-enabled/default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;server&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  listen&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 80&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; default_server&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  root&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  autoindex&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;create-a-kickstart-file&quot;&gt;Create a Kickstart File&lt;/h2&gt;
&lt;p&gt;You can obtain this file from &lt;code&gt;/root/anaconda-ks.cfg&lt;/code&gt; after manually installing the operating system.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/kickstart&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/kickstart/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# The final directory structure is as follows:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;/var/www/html&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; kickstart&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; cdh.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gbase.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp1.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp2.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; addons&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; updates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel83&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; addons&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; updates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel84&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; addons&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; updates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; addons&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; updates&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;└──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; addons&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; base&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; updates&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;configure-dhcp&quot;&gt;Configure DHCP&lt;/h2&gt;
&lt;p&gt;Note: First, configure the local machine’s IP address to &lt;code&gt;10.0.0.1&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/dhcp/dhcpd.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;default-lease-time&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 600&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;max-lease-time&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 7200&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log-facility&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; local7&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; arch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; code&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 93&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; unsigned&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; integer&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 16&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;subnet&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.0&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; netmask&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 255.255.255.0&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  range&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.10&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.50&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  next-server&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  class&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;pxeclients&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    match&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; substring&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (option &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;vendor-class-identifier,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 0,&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 9&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) = &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;PXEClient&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; option&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; arch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 00:07&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; option&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; arch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 00:09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      # x86-64 EFI BIOS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;      filename&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;efi/x86_64/BOOTX64.EFI&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; option&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; arch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 00:0b&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      # ARM64 aarch64 EFI BIOS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;      filename&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;efi/aarch64/BOOTAA64.EFI&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      # Legacy non-EFI BIOS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;      filename&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;bios/x86_64/pxelinux.0&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/rsyslog.d/dhcp-relay.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;local7.*&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -/var/log/dhcp-relay.log&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Restart the service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; restart&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; isc-dhcp-server&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;configure-tftp&quot;&gt;Configure TFTP&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/default/tftpd-hpa&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;TFTP_USERNAME&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;tftp&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;TFTP_DIRECTORY&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;/srv/tftp&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;TFTP_ADDRESS&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;:69&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;TFTP_OPTIONS&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;--secure -vvv&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Create BIOS directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare pxelinux.0 and vesamenu.c32 files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/Packages/syslinux-4.05-15.el7.x86_64.rpm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;rpm2cpio&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; syslinux-4.05-15.el7.x86_64.rpm&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; cpio&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -dimv&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; usr/share/syslinux/pxelinux.0&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; usr/share/syslinux/vesamenu.c32&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare vmlinuz and initrd.img files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/images/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/images/pxeboot/vmlinuz&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; //srv/tftp/bios/x86_64/images/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/images/pxeboot/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/images/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare the default file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/pxelinux.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/isolinux/isolinux.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/pxelinux.cfg/default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/bios/x86_64/pxelinux.cfg/default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vesamenu.c32&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;timeout&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; local&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Boot&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ^local&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; drive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  localboot&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0xffff&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ^Install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Red&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Hat&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Enterprise&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Linux&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 7.9&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  kernel&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images/rhel79/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  append&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd=images/rhel79/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/rhel79.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; quiet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel83&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ^Install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Red&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Hat&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Enterprise&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Linux&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 8.3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  kernel&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images/rhel83/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  append&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd=images/rhel83/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/rhel83.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; quiet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ^Install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Kylin&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Linux&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Advanced&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Server&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; V10&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; SP1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  kernel&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images/v10sp1/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  append&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd=images/v10sp1/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/v10sp1.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; quiet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  menu&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; label&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ^Install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Kylin&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Linux&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Advanced&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Server&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; V10&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; SP2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  kernel&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images/v10sp2/vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  append&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd=images/v10sp2/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/v10sp2.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; quiet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Create UEFI directory&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare BOOTX64.EFI, grubx64.efi, and grub.cfg files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/EFI/BOOT/BOOTX64.EFI&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/EFI/BOOT/grubx64.efi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/EFI/BOOT/grub.cfg&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;chmod&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 644&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/BOOTX64.EFI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;chmod&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 644&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/grubx64.efi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare vmlinuz and initrd.img files&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -p&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/images/rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/images/pxeboot/vmlinuz&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/images/rhel79/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/www/html/rhel79/x86_64/base/images/pxeboot/initrd.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/images/rhel79/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Prepare grub.cfg file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vim&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /srv/tftp/efi/x86_64/grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; timeout=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; default=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;menuentry&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;Install Red Hat Enterprise Linux 7.9&apos;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  linuxefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/rhel79/vmlinuz&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ip=dhcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/rhel79.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  initrdefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/rhel79/initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;menuentry&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;Install Kylin Linux Advanced Server V10 SP1&apos;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  linuxefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/v10sp1/vmlinuz&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ip=dhcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/v10sp1.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  initrdefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/v10sp1/initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;menuentry&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;Install Kylin Linux Advanced Server V10 SP2&apos;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  linuxefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/v10sp2/vmlinuz&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ip=dhcp&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inst.ks=http://10.0.0.1/kickstart/v10sp2.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  initrdefi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi/x86_64/images/v10sp2/initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# The final directory structure is as follows:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;/srv/tftp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; bios&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; pxelinux.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; pxelinux.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;│&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;       └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vesamenu.c32&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;└──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; efi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;    └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; BOOTX64.EFI&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; grub.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; grubx64.efi&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; rhel79&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            │&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;   └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;            └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; v10sp2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;                ├──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; initrd.img&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;                └──&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; vmlinuz&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;view-logs&quot;&gt;View Logs&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tail&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/log/syslog&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; dhcp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tail&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/log/syslog&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; tftp&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tail&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -f&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /var/log/nginx/access.log&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;debugging&quot;&gt;Debugging&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Test the repository&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 10.0.0.1/kickstart/rhel79.cfg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Test DHCP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nmap&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --script&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; broadcast-dhcp-discover&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nmap&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --script&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; broadcast-dhcp-discover&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -e&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; eth0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dhcp-lease-list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Test TFTP&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; tftp&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10.0.0.1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tftp&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt; &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; bios/x86_64/pxelinux.0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;Received&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 27158&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; bytes&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 0.1&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; seconds&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;tftp&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=1672498&quot;&gt;Change permissions for grub2/shim.efi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/solutions/163253&quot;&gt;How to set-up and configure a PXE Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://jensd.be/533/linux/create-a-pxe-bootserver-to-server-multiple-linux-distributions&quot;&gt;Create a PXE bootserver to install multiple Linux distributions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.oracle.com/cd/E24628_01/em.121/e27046/appdx_pxeboot.htm#EMLCM12198&quot;&gt;Understanding PXE Booting and Kickstart Technology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.logiqwest.com/TechnicalPapers/KickStart/Kickstart_Server.html&quot;&gt;Kickstart Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/chap-installation-server-setup&quot;&gt;Preparing for a Network Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s1-kickstart2-putkickstarthere&quot;&gt;Making the Kickstart File Available&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.openeuler.org/zh/docs/20.03_LTS/docs/Installation/%E4%BD%BF%E7%94%A8kickstart%E8%87%AA%E5%8A%A8%E5%8C%96%E5%AE%89%E8%A3%85.html&quot;&gt;Automated Installation Using Kickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://juejin.cn/post/7136077266877939720&quot;&gt;s14.Operation Automation for System Deployment — Practical Case: Kickstart File Creation Process&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.golinuxhub.com/2018/05/sample-kickstart-partition-example-raid/&quot;&gt;Sample kickstart partition example (RAID, LVM, Multipath, Simple,..)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ubuntu.com/server/docs/how-to-install-and-configure-isc-dhcp-server&quot;&gt;How to install and configure isc-dhcp-server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://linuxhint.com/install_tftp_server_ubuntu/&quot;&gt;Installing and Configuring TFTP Server on Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/solutions/1355683&quot;&gt;Need to set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.chrisjing.com/003-%E8%87%AA%E5%8A%A8%E5%8C%96%E8%A3%85%E6%9C%BA/01-%E8%87%AA%E5%8A%A8%E5%8C%96%E8%A3%85%E6%9C%BA%E5%B7%A5%E5%85%B7-kickstart/&quot;&gt;Automated Installation Tool - Kickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://unix.stackexchange.com/questions/32243/how-do-i-configure-syslinux-to-boot-immediately&quot;&gt;How do I configure syslinux to boot immediately&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://unix.stackexchange.com/questions/615461/dhcp-relay-custom-log-file&quot;&gt;dhcp-relay custom log file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax&quot;&gt;Kickstart Syntax Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#kickstart-documentation&quot;&gt;Kickstart Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=1873278&quot;&gt;error: ../../grub-core/net/net.c:1795:timeout reading initrd.img&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://installati.one/install-createrepo-ubuntu-18-04/&quot;&gt;How To Install createrepo on Ubuntu 18.04&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.percona.com/blog/how-to-create-your-own-repositories-for-packages/#&quot;&gt;How to Create Your Own Repositories for Packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wiki.syslinux.org/wiki/index.php?title=PXELINUX&quot;&gt;PXELINUX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.chrisjing.com/003-%E8%87%AA%E5%8A%A8%E5%8C%96%E8%A3%85%E6%9C%BA/01-%E8%87%AA%E5%8A%A8%E5%8C%96%E8%A3%85%E6%9C%BA%E5%B7%A5%E5%85%B7-kickstart/&quot;&gt;01-Automated Installation Tool - Kickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-howto&quot;&gt;27.2. How Do You Perform a Kickstart Installation?&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Tue, 20 Jul 2021 00:00:00 GMT</pubDate></item><item><title>3. Ubuntu安装Nvidia驱动</title><link>https://blog.skywangdev.com/en/posts/3/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/3/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-3.jpeg&quot; width=&quot;800&quot;&gt;
&lt;h1 id=&quot;1-preliminary-preparation&quot;&gt;1. Preliminary Preparation&lt;/h1&gt;
&lt;h2 id=&quot;11-check-gpu-information&quot;&gt;1.1 Check GPU Information&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;lspci&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -i&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;12-configure-the-kernel&quot;&gt;1.2 Configure the Kernel&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dnf&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -y&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; gcc&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; dkms&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; kernel-devel-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;kernel-headers-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The installed version must match the current kernel version.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;13-disable-nouveau&quot;&gt;1.3 Disable nouveau&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Check nouveau&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;lsmod&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; grep&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nouveau&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Disable nouveau&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cat&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &gt;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;  /etc/modprobe.d/blacklist.conf&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; &amp;#x3C;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; EOF&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;blacklist nouveau&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;options nouveau modeset=0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;14-update-initramfs&quot;&gt;1.4 Update initramfs&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# AlmaLinux/RockyLinux&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mv&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /boot/initramfs-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.img&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /boot/initramfs-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.img.bak&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dracut&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /boot/initramfs-&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;.img&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; $(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; update-initramfs&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After completing this step, reboot the operating system before proceeding to the next step.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;2-install-the-driver&quot;&gt;2. Install the Driver&lt;/h1&gt;
&lt;h2 id=&quot;21-download-the-driver&quot;&gt;2.1 Download the Driver&lt;/h2&gt;
&lt;p&gt;Download the driver for your corresponding graphics card from &lt;a href=&quot;https://www.nvidia.cn/Download/index.aspx?lang=cn&quot;&gt;NVIDIA Driver Downloads&lt;/a&gt;. It is recommended to use the &lt;code&gt;.run&lt;/code&gt; executable file. If you plan to install the CUDA Toolkit (which includes the driver), you can skip this step.&lt;/p&gt;
&lt;h2 id=&quot;22-install-the-driver&quot;&gt;2.2 Install the Driver&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; NVIDIA-Linux-x86_64-470.256.02.run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;or&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; NVIDIA-Linux-x86_64-470.256.02.run&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --kernel-source-path=/usr/src/kernels/$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r)&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -k&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; $(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;uname&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;23-verify-installation&quot;&gt;2.3 Verify Installation&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;nvidia-smi&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If GPU-related information is returned, the installation was successful.&lt;/p&gt;
&lt;h1 id=&quot;3-install-the-cuda-toolkit&quot;&gt;3. Install the CUDA Toolkit&lt;/h1&gt;
&lt;h2 id=&quot;31-download-the-cuda-installer&quot;&gt;3.1 Download the CUDA Installer&lt;/h2&gt;
&lt;p&gt;Visit &lt;a href=&quot;https://developer.nvidia.com/cuda-toolkit-archive&quot;&gt;CUDA&lt;/a&gt; and select the operating system and version that matches your GPU. Since the CUDA Toolkit includes the driver, you can skip Step 2 and proceed directly with the CUDA Toolkit installation. &lt;a href=&quot;https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html&quot;&gt;Driver versions corresponding to the CUDA Toolkit&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;32-install-cuda&quot;&gt;3.2 Install CUDA&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;bash&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; cuda_11.4.0_470.256.02_linux.run&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;If the driver is already installed, be sure to deselect the driver installation option; otherwise, the installation may fail.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;33-verify-installation&quot;&gt;3.3 Verify Installation&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;/usr/local/cuda/bin/nvcc&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -V&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If CUDA version information is returned, the installation was successful.&lt;/p&gt;
&lt;h1 id=&quot;4-install-nvidia-fabricmanager&quot;&gt;4. Install nvidia-fabricmanager&lt;/h1&gt;
&lt;h2 id=&quot;41-add-software-repository&quot;&gt;4.1 Add Software Repository&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# AlmaLinux/RockyLinux&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Add the repository corresponding to your system version&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dnf&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; config-manager&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --add-repo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; http://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Add the repository corresponding to your system version&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wget&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;mv&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; cuda-ubuntu2004.pin&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/apt/preferences.d/cuda-repository-pin-600&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;wget&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;apt-key&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 7fa2af80.pub&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;rm&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 7fa2af80.pub&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;deb http://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 /&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; tee&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /etc/apt/sources.list.d/cuda.list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;42-install-nvidia-fabric-manager&quot;&gt;4.2 Install nvidia-fabric-manager&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# AlmaLinux/RockyLinux&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dnf&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; module&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -y&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-driver:470&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dnf&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -y&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabric-manager:470.256.02&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabric-manager-devel-0:470.256.02&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# Ubuntu&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;apt-get&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; update&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;apt-get&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -y&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabricmanager-470=470.256.02-1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;43-start-the-service&quot;&gt;4.3 Start the Service&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabricmanager&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; status&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabricmanager&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; nvidia-fabricmanager&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;44-verify&quot;&gt;4.4 Verify&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;nvidia-smi&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; topo&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -m&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the returned results contain &lt;code&gt;NV*&lt;/code&gt;, it indicates NVLink connections exist between GPUs. If all expected GPUs have NVLink connections and there are no error messages, then NVLink should be functioning normally.&lt;/p&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Tue, 13 Apr 2021 00:00:00 GMT</pubDate></item><item><title>2. CentOS 7重置root密码</title><link>https://blog.skywangdev.com/en/posts/2/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/2/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-2.jpeg&quot; width=&quot;800&quot;&gt;
&lt;blockquote&gt;
&lt;p&gt;In a CentOS server, the permissions of a regular user are restricted by the root (super administrator). Sometimes, it’s inconvenient to download and install software in CentOS, so you need to access the root (super administrator) user interface. However, you might occasionally forget the root user’s password, requiring a reset. There are many versions of CentOS, but the method to reset the root user’s password is similar across them—entering single-user mode to modify the root password.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;detailed-steps-to-reset-the-root-password&quot;&gt;Detailed Steps to Reset the Root Password&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Restart the server. When the system loading screen appears, press the &lt;code&gt;e&lt;/code&gt; key on your keyboard to enter edit mode.&lt;/p&gt;
&lt;img src=&quot;https://data.skywangdev.com/centos7-root-reset-1.png&quot; width=&quot;800&quot;&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Move the cursor to find the line starting with &lt;code&gt;linux16&lt;/code&gt;. Delete from the end until you reach &lt;code&gt;ro&lt;/code&gt; and stop.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;img src=&quot;https://data.skywangdev.com/centos7-root-reset-2.png&quot; width=&quot;800&quot;&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Change &lt;code&gt;ro&lt;/code&gt; to &lt;code&gt;rw&lt;/code&gt;, add a space, then append &lt;code&gt;rd.break&lt;/code&gt;. Press &lt;code&gt;Ctrl+X&lt;/code&gt; to boot.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Before modification: linux16 /vmlinuz-3.10.0-1160.e17.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=en_US.UTF-8&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;After modification: linux16 /vmlinuz-3.10.0-1160.e17.x86_64 root=/dev/mapper/centos-root rw rd.break&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result as follows:&lt;/p&gt;
&lt;img src=&quot;https://data.skywangdev.com/centos7-root-reset-3.png&quot; width=&quot;800&quot;&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Enter single-user mode.&lt;/li&gt;
&lt;/ol&gt;
&lt;img src=&quot;https://data.skywangdev.com/centos7-root-reset-4.png&quot; width=&quot;800&quot;&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Enter the following commands to remount the root directory and reset the root password (e.g., to &lt;code&gt;Aa@123456&lt;/code&gt;). Finally, reboot the system for the changes to take effect.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;mount -o remount,rw /sysroot&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;chroot sysroot&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;echo &apos;Aa@123456&apos; | passwd root --stdin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;touch /.autorelabel     &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;exit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;reboot&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Process as follows:&lt;/p&gt;
&lt;img src=&quot;https://data.skywangdev.com/centos7-root-reset-5.png&quot; width=&quot;800&quot;&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;After waiting for a while, when you return to the login interface, you can log in as root using the password you just set.&lt;/li&gt;
&lt;/ol&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Mon, 03 Aug 2020 00:00:00 GMT</pubDate></item><item><title>1. 服务器RAID基本概念</title><link>https://blog.skywangdev.com/en/posts/1/</link><guid isPermaLink="true">https://blog.skywangdev.com/en/posts/1/</guid><description>&lt;img src=&quot;https://data.skywangdev.com/blog/S-1.jpeg&quot; width=&quot;800&quot;&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Casually record some tech stuff, filtered and published here.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;basic-concepts-of-raid&quot;&gt;Basic Concepts of RAID&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The full Chinese name of RAID is “独立磁盘冗余阵列” (Redundant Array of Independent Disks).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Redundant Array of Independent Disks (RAID), formerly known as Redundant Array of Inexpensive Disks, commonly referred to as a disk array. It uses virtualization storage technology to combine multiple hard drives into one or more disk array groups, aiming to improve performance, provide data redundancy, or both. During operation, depending on the RAID level, data is distributed across the drives in various patterns. RAID levels are named starting with “RAID” followed by a number, such as: RAID 0, RAID 1, RAID 5, RAID 6, RAID 7, RAID 01, RAID 10, RAID 50, RAID 60. Each level has its theoretical advantages and disadvantages, balancing between two goals: increasing data reliability and increasing storage (array) read/write performance.&lt;/p&gt;
&lt;p&gt;In simple terms, RAID combines multiple hard drives into a single logical drive, so the operating system treats it as one physical drive. RAID is often used on server computers and typically uses identical drives for the array. Due to the continuous decline in hard drive prices and more effective integration of RAID functionality with motherboards, it has also become an option for ordinary users, especially for tasks requiring large storage capacity, such as video and audio production. ————&lt;em&gt;Source: Wikipedia&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;why-use-raid&quot;&gt;Why Use RAID?&lt;/h2&gt;
&lt;p&gt;Using RAID primarily aims to achieve one or more of the following goals:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Improve Performance:&lt;/strong&gt; Allow multiple hard drives to read/write data simultaneously, which is much faster than a single drive.
&lt;ul&gt;
&lt;li&gt;It’s like having multiple workers move goods at the same time, much faster than one person.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Increase Fault Tolerance/Reliability:&lt;/strong&gt; Through data redundancy (backup or parity), even if one drive suddenly fails, data is not lost, and service is not interrupted.
&lt;ul&gt;
&lt;li&gt;It’s like making photocopy backups of important documents; even if the original is lost, the backup is still available.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Expand Capacity:&lt;/strong&gt; Combine multiple small-capacity drives into one large logical volume for easier management and use.
&lt;ul&gt;
&lt;li&gt;It’s like knocking down walls between small rooms to create one large hall.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;** Important Note: RAID is NOT a substitute for regular backups! Its main purpose is to ensure service continuity and data availability. In cases of fire, accidental deletion, virus attacks, etc., data on RAID can still be lost. Therefore, you must adhere to the strategy of “RAID + Regular Backups.”**&lt;/p&gt;
&lt;h2 id=&quot;detailed-explanation-of-hard-drive-requirements-for-raid-levels&quot;&gt;Detailed Explanation of Hard Drive Requirements for RAID Levels&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAID 0 (Striping)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimum Drives: 2&lt;br&gt;
Description: RAID 0 splits data into blocks and writes them alternately across all drives. It provides no redundancy or fault tolerance. If any single drive fails, all data is lost.&lt;br&gt;
Advantages: Very high read/write performance (all drives work simultaneously).&lt;br&gt;
Disadvantages: Lowest reliability. The more drives, the higher the overall failure rate.&lt;br&gt;
Common Use Cases: Scenarios requiring extremely high performance where data is not critical or is temporary, such as graphics rendering cache, game storage drives.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAID 1 (Mirroring)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimum Drives: 2&lt;br&gt;
Description: RAID 1 writes complete data to every drive simultaneously, achieving 100% mirroring backup.&lt;br&gt;
Advantages: Slightly improved read performance, write performance is the same as a single drive. High data security; as long as not all drives fail at once, data is not lost.&lt;br&gt;
Disadvantages: Low disk space utilization (only 50%), high cost.&lt;br&gt;
Common Use Cases: Scenarios requiring extremely high data security, such as operating system drives, log files for critical databases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAID 5 (Striping with Parity)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimum Drives: 3&lt;br&gt;
Description: RAID 5 distributes data and parity information across all drives. It can tolerate the failure of any single drive. Usable capacity is (N-1) * single drive capacity.&lt;br&gt;
Advantages: Excellent balance between capacity, performance, and security. Space utilization is higher than RAID 1.&lt;br&gt;
Disadvantages: Poor write performance (requires parity calculation). After one drive fails, the array rebuild process is very stressful, time-consuming, and if another drive fails during this period, all data is lost.&lt;br&gt;
Common Use Cases: Widely used in file sharing servers, small to medium-sized database storage, etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAID 6 (Striping with Double Parity)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimum Drives: 4&lt;br&gt;
Description: RAID 6 is similar to RAID 5 but uses two different parity algorithms, allowing it to tolerate the simultaneous failure of any two drives. Usable capacity is (N-2) * single drive capacity.&lt;br&gt;
Advantages: Higher security than RAID 5, especially suitable for arrays with large-capacity drives (long rebuild times, double protection is safer).&lt;br&gt;
Disadvantages: Write performance is worse than RAID 5 (requires calculating parity twice). Lower space utilization.&lt;br&gt;
Common Use Cases: Arrays using large-capacity SATA drives, archival storage with extremely high data security requirements.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAID 10 (Mirroring first, then Striping)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Minimum Drives: 4 (must be an even number)&lt;br&gt;
Description: RAID 10 is a combination of RAID 1 and RAID 0. It first pairs drives into RAID 1 mirrored pairs, then combines these pairs into a RAID 0 striped volume.&lt;br&gt;
Advantages: Combines the high security of RAID 1 with the high performance of RAID 0. Rebuild speed is much faster than RAID 5/6.&lt;br&gt;
Disadvantages: Highest cost, disk space utilization is only 50%.&lt;br&gt;
Common Use Cases: Scenarios requiring both high performance and high reliability, such as database servers, virtualization hosts, high-traffic websites.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Important Notes:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The above are minimum requirements. Except for RAID 1, other levels can use more than the minimum number of drives (e.g., RAID 5 can use 4, 5, 6… drives; RAID 10 can use 4, 6, 8… drives).&lt;/li&gt;
&lt;li&gt;Hybrid RAID: There are other RAID levels (like RAID 50, RAID 60, etc.) that are combinations of the basic levels mentioned above and require more drives.&lt;/li&gt;
&lt;li&gt;Hot Spare: In actual enterprise deployments, one or more hot spare drives are often configured. When a working drive in the array fails, the hot spare automatically replaces it and begins data reconstruction. This process requires no manual intervention, further improving system availability. Hot spares do not participate in daily RAID operations and are not counted in the minimum requirements above.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;common-scenario-examples-which-raid-to-use&quot;&gt;Common Scenario Examples: Which RAID to Use?&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Operating System (OS) Drive and Critical Boot Drive&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Recommended: RAID 1&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Reason: The OS drive typically doesn’t require huge capacity but has extremely high availability and reliability requirements. RAID 1 provides the best protection; if one drive fails, the system continues running seamlessly, making it easy to replace the drive and rebuild. Read performance is also improved, aiding system boot and operation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;File Storage Server / NAS&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Small/Medium-sized, Budget-sensitive: Recommended RAID 5&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Reason: Achieves a perfect balance between capacity utilization and security. Offers the best cost-performance for servers storing general files like documents and images.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large-scale, using high-capacity drives (e.g., &gt;4TB): Strongly recommended RAID 6&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Reason: Rebuild times for high-capacity drives are very long (possibly over 24 hours), and the risk of a second drive failing during this period cannot be ignored. RAID 6’s double parity provides crucial safety.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Video Editing / Media Production&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Raw Footage Storage: Recommended RAID 5/6&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;RAID 5/6: A safer choice, providing sufficient bandwidth while ensuring data security.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finished Product Archiving: Recommended RAID 6&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Data is important, large in volume, and needs long-term safe storage. RAID 6 is the best choice.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Important things need to be said three times: RAID is not backup! RAID is not backup! RAID is not backup! No matter how secure your RAID is, you must have a strategy for regular backups to other media (such as tape, offsite NAS, cloud storage).&lt;/p&gt;
&lt;/blockquote&gt;&lt;hr style=&quot;border:none;border-top:0.5px solid rgba(0,0,0,0.08);margin:26px 0 14px;&quot; /&gt;
    &lt;p style=&quot;text-align:left;margin:0;font-family:-apple-system,BlinkMacSystemFont,&apos;Segoe UI&apos;,sans-serif;&quot;&gt;
      &lt;a
        href=&quot;https://blog.skywangdev.com&quot;
        style=&quot;
          display:inline-block;
          padding:6px 18px;
          border-radius:999px;
          background:#222;
          color:#fff;
          font-size:13px;
          text-decoration:none;
        &quot;
        target=&quot;_blank&quot;
        rel=&quot;noreferrer&quot;
      &gt;undefined&lt;/a&gt;
    &lt;/p&gt;</description><pubDate>Thu, 23 Jul 2020 00:00:00 GMT</pubDate></item></channel></rss>