常见问题解决办法
<p>[TOC]</p>
<h1>1、CentOS7制作成U盘启动盘,安装时出现dracut问题</h1>
<p>CentOS7制作成U盘启动盘,安装时出现dracut问题的解决办法,如下提示:
<img src="https://www.showdoc.cc/server/api/common/visitfile/sign/0ffbd08686d561ca299175e8913e3b61?showdoc=.jpg" alt="" />
分析原因:
制作好U盘镜像之后,注意:U盘名字变成了: CentOS 7</p>
<h2>1.1 方法一:修改文件法</h2>
<p><code>注意:大小写,LABLE中不能有空格</code></p>
<h3>(1)修改U盘LABLE为CENTOS7</h3>
<h3>(2)修改 文件 CentOS\x207\x20x86_64 改成与U盘的 LABLE 相同。</h3>
<p>编辑下面几个文件中的内容:</p>
<pre><code class="language-bash">I:\EFI\BOOT\grub.cfg
I:\isolinux\syslinux.cfg
I:\isolinux\isolinux.cfg</code></pre>
<p><code>注意:大小写,LABLE中不能有空格,U盘修改标签后会自动变成大写</code>
把文件中的<code>LABEL=CentOS\x207\x20x86_64</code>改为<code>LABEL=CENTOS7</code></p>
<h2>1.2 方法二:选更好的U盘安装盘制作工作</h2>
<p>如:rufus ,制作U盘安装盘时以DD方式写入即可。</p>
<h1>2.非正常关系,系统启动报错</h1>
<p>linux系统中:an error occurred during the file system check 错误解决方法
<a href="https://blog.csdn.net/qq_26710805/article/details/81556971">https://blog.csdn.net/qq_26710805/article/details/81556971</a>
错误内容:</p>
<pre><code class="language-bash">***an error occurred during the file system check
***dropping you to a shell;the system will reboot
***when you leave the shell.
***warningive root password for maintenance</code></pre>
<p>意思是在文件检测的时候发生错误,要么离开shell重启,要么就键入root的password进行修复。
这时假若重启的话,八成不是回到这个界面。那么,就让我们输入根密码修复文件系统吧。
进入shell后,要用fsck(filesystem check)命令检测并修复文件系统,该指令使用方法如下:
直接键入fsck,不带任何附加项
当提示<F/N>的时候全部键入Y
直到重新回到shell,reboo重启电脑,这样,基本上就能恢复正常使用了</p>
<h1>3、Linux 错误: $'\r': command not found</h1>
<p>报错原因是linux无法解析$'\r'。这其实是windows与linux系统的差异导致的。
因为linux上的换行符为\n,而windows上的换行符为\r\n。所以脚本到linux上就无法解析了。
通常的处理办法主要有2种:</p>
<h2>3.1 处理办法1:set ff=unix</h2>
<pre><code class="language-bash">vi hello.sh
Esc进入命令行运行模式,输入
set ff=unix</code></pre>
<h2>3.2 处理办法2:dos2unix</h2>
<pre><code class="language-bash">dos2unix hello.sh</code></pre>
<h3>如果报command not found 是因为你没有安装,安装dos2unix插件即可。</h3>
<h1>4、centos7 中文乱码问题解决方法</h1>
<p><a href="https://www.cnblogs.com/lywJ/p/10710460.html">https://www.cnblogs.com/lywJ/p/10710460.html</a></p>
<h1>5、常用软件下载</h1>
<p><a href="https://msdn.itellyou.cn/">https://msdn.itellyou.cn/</a></p>
<h1>6、Centos6虚拟机克隆后的ip配置</h1>
<p><a href="https://www.cnblogs.com/toov5/p/9607775.html">https://www.cnblogs.com/toov5/p/9607775.html</a></p>
<pre><code class="language-bash">rm -rf /etc/udev/rules.d/70-persistent-net.rules
ip a,
把网卡的MAC加到eth0中,reboot</code></pre>
<h1>7 SSH 服务 异常报错“Failed to start OpenSSH Server daemon”</h1>
<p><a href="https://blog.csdn.net/qq_21782255/article/details/84633623">https://blog.csdn.net/qq_21782255/article/details/84633623</a></p>
<h1>8 CentOS7忘记密码怎么办</h1>
<p><a href="https://blog.csdn.net/qq_34272964/article/details/79490351">https://blog.csdn.net/qq_34272964/article/details/79490351</a></p>