停靠港湾 發表於 2021-10-29 09:17:00

ubuntu出现问题gave up waiting for root file system device ubuntu 16.04

<p>&nbsp;</p>
<p>ubuntu16.04出现以下画面:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202110/1438899-20211029091347667-1300290402.png"></p>
<p>&nbsp;</p>
<p>初步估计:引导出现问题了,系统启动找不到引导了。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">方案一:</span></p>
<ul>
<li>Reboot.</li>
<li>Press&nbsp;<kbd>F2</kbd>&nbsp;when the screen is lit up and go to the BIOS settings.</li>
<li>System Configurations → SATA Operations</li>
<li>Change RAID to AHCI</li>
</ul>
<p>结果:没有解决。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">&nbsp;方案二:</span></p>
<p>https://askubuntu.com/questions/247541/gave-up-waiting-for-root-device-on-ubuntu</p>
<p><strong>Attempt #3</strong></p>
<p>I opened terminal and typed the following command:</p>
<div class="cnblogs_code">
<pre>sudo grub-install /dev/sda</pre>
</div>
<p>and then I typed another command to update grub:</p>
<div class="cnblogs_code">
<pre>sudo update-grub</pre>
</div>
<p>After all of this, I rebooted computer and finally, error disappeared and problem was fixed!</p>
<p>问题是:根本进不去桌面,无法打开终端,也就无法使用sudo命令。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">&nbsp;方案三:</span></p>
<p>I just randomly started typing stuff... try:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">(initramfs) blkid
(initramfs) blockdev </span>--rereadpt /dev/<span style="color: rgba(0, 0, 0, 1)">sda
(initramfs) blkid
(initramfs) exit</span></pre>
</div>
<p>This at least gets you to the desktop where you can begin trouble shooting your problem which is probably due to a proprietary driver or something.</p>
<p>结果:失败,还是进入不了桌面。</p>
<p>下面我决定利用rufus软件制作u盘启动盘并进行引导的修复。</p>
<p>u盘启动盘制作参考:https://www.cnblogs.com/yibeimingyue/p/15479056.html</p>
<p>修复引导的参考链接:</p>
<p>https://www.cxyzjd.com/article/stlinax/107025125</p>
<p>https://blog.csdn.net/laocaibcc229/article/details/79274412</p>
<p>&nbsp;</p>
<h2>Ubuntu 18.04 启动失败的修复方法_stlinax的博客-程序员宅基地</h2>
<p>技术标签:&nbsp;虚拟机&nbsp;&nbsp;ubuntu&nbsp;&nbsp;信息整理&nbsp;&nbsp;安装技巧&nbsp;&nbsp;</p>
<div>&nbsp;</div>
<div id="article_content">
<div id="content_views" class="htmledit_views">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 由于突然断电,重新启动后发现不能进入Ubuntu系统,进入了GRUB界面。按照网上的方法在GRUB界面下修复,但是还是不能成功。原因可能是GRUB启动文件或者启动分区遭到破坏,于是尝试了另外一种方法,就是利用Ubuntu的安装光盘,加载Boot-Repair修复引导程序来解决问题。</p>
<p>这里涉及三个问题:</p>
<ol>
<li>制作Ubuntu安装光盘或U盘,然后启动到Ubuntu安装界面,注意这时候要选择“试用Ubuntu”,然后就能进入Ubuntu桌面。</li>
<li>连接上互联网,打开终端,然后下载安装并运行Boot-Repair进行修复。</li>
<li>如果发生分区问题,要使用GParted分区软件分出一个BIOS-boot分区,然后再修复。</li>
</ol>
<p>&nbsp;</p>
<h2>【一般情况下的修复方法】</h2>
<p>打开终端:</p>
<p>sudo add-apt-repository ppa:yannubuntu/boot-repair &amp;&amp; sudo apt-get update</p>
<p>sudo apt-get install -y boot-repair &amp;&amp; boot-repair</p>
<p>然后进入到Boot-Repair修复引导程序,点击“推荐修复”,如果没有错误提示的话,重启岂可成功修复。</p>
<p><img src="https://img-blog.csdnimg.cn/20200629174541864.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
<p>&nbsp;</p>
<h2>【分区破坏后的修复方法】</h2>
<p>点击“推荐修复”,Boot-Repair检测后发现并提示缺乏分区。</p>
<p><img src="https://img-blog.csdnimg.cn/20200629174620382.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
<p>打开Ubuntu自带的GParted分区软件,然后分出一个大于1MB的分区,这个分区不需要太大,不超过10MB就够了。注意这个分区不要选择EXT4,而是选择“未格式化”,点击左上角“√”按钮,完成分区。右击这个新建的分区,然后点击管理标识,在bios_grub前面打钩,退出GParted分区软件。</p>
<p>接着重新运行Boot-Repair点击“推荐修复”,按程序提示的要求另外打开一个终端,一步一步手动运行下去。如果需要复制粘贴,可以打开一个Gedit来粘贴。</p>
<p><img src="https://img-blog.csdnimg.cn/20200629174715941.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
<p>本例的修复命令如下:</p>
<p>sudo chroot "/mnt/boot-sav/sda2" dpkg --configure -a</p>
<p>sudo chroot "/mnt/boot-sav/sda2" apt-get install -fy</p>
<div class="google-auto-placed ap_container"><ins class="adsbygoogle adsbygoogle-noablate" data-ad-format="auto" data-ad-client="ca-pub-9066218177779829" data-adsbygoogle-status="done" data-ad-status="unfilled"><ins id="aswift_1_expand" title="Advertisement"><ins id="aswift_1_anchor"></ins></ins></ins></div>
<p>sudo chroot "/mnt/boot-sav/sda2" apt-get purge -y grub*-common shim-signed</p>
<p><img src="https://img-blog.csdnimg.cn/20200629174846363.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
<p>sudo chroot "/mnt/boot-sav/sda2" apt-get install -y grub-pc</p>
<p><img src="https://img-blog.csdnimg.cn/20200629174918619.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
<p>修复完成后,关闭所有终端和程序,然后关机,取出光盘或U盘,重启电脑,问题解决。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>另外,LinuxMint20的安装盘是自带Boot-Repair的,可以直接搜索后使用。</p>
<p><img src="https://img-blog.csdnimg.cn/20200730230704159.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3N0bGluYXg=,size_16,color_FFFFFF,t_70"></p>
</div>
</div>
<p>&nbsp;</p>
<p>打开终端:</p>
<p>sudo add-apt-repository ppa:yannubuntu/boot-repair &amp;&amp; sudo apt-get update</p>
<p>这一步遇到的问题:</p>
<div class="cnblogs_code">
<pre>** (appstreamcli:<span style="color: rgba(128, 0, 128, 1)">9437</span>): CRITICAL **: Error <span style="color: rgba(0, 0, 255, 1)">while</span> moving old database <span style="color: rgba(0, 0, 255, 1)">out</span><span style="color: rgba(0, 0, 0, 1)"> of the way.
AppStream cache update failed. </span></pre>
</div>
<p>解决办法:</p>
<p>https://askubuntu.com/questions/1020404/error-while-moving-old-database-out-of-the-way</p>
<p>然后:</p>
<p>sudo apt-get install -y boot-repair &amp;&amp; boot-repair</p>
<p>然后进入到Boot-Repair修复引导程序,点击“推荐修复”,如果没有错误提示的话,重启岂可成功修复。</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202110/1438899-20211029121118950-406146511.png"></p>
<p>&nbsp;</p>
<p>&nbsp;在运行:</p>
<p>sudo apt-get install -y boot-repair &amp;&amp; boot-repair</p>
<p>的时候,出现如下界面:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202110/1438899-20211029121234411-1846706568.png"></p>
<p>&nbsp;</p>
<p>即:无法定位软件包:boot-repair.</p>
<p>尝试的方法:</p>
<p>https://askubuntu.com/questions/449818/cant-find-boot-repair-package-for-the-newest-version-of-ubuntu</p>
<h1>Workaround: install packages for an older release</h1>
<p>It showed a 404 not found error because the PPA was not updated for the newer release (trusty). To install&nbsp;<code>boot-repair</code>&nbsp;in Ubuntu 14.04, run the below commands on terminal:</p>
<pre><code>sudo add-apt-repository ppa:yannubuntu/boot-repair
codename="$(lsb_release -cs)"
sudo sh -c "sed -i 's/$codename/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-$codename.list"
sudo apt-get update
sudo apt-get install -y boot-repair &amp;&amp; (boot-repair &amp;)
</code></pre>
<p>Now use the&nbsp;<code>recommended repair</code>&nbsp;option to repair your grub and restart after boot-repair finished repairing.</p>
<p>在运行:</p>
<div class="cnblogs_code">
<pre>sudo sh -c <span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">sed -i 's/$codename/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-$codename.list</span><span style="color: rgba(128, 0, 0, 1)">"</span></pre>
</div>
<p>的时候,出现的问题是:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211102105729460-966304159.jpg"></p>
<p>&nbsp;</p>
<p>sed: can't read /etc/apt/sources.list.d/yannubuntu-boot-repair-.list: No such file or directory</p>
<p>所以:方案三失败。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">&nbsp;方案四:</span></p>
<p>&nbsp;</p>
<p>如果安装Ubuntu后启动报错:“Reboot and Select proper Boot device or Insert Boot Media in selected Boot device”。(Ubuntu 16.04)</p>
<p>插上U盘或CD,进入Try Ubuntu模式。</p>
<p>用sudo fdisk -l查看原始分区信息。<br><br></p>
<p>sudo fdisk -l</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202110/1438899-20211031194311584-1773238330.jpg"></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>我看网上有个图是:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">   Device Boot      Start         End      Blocks   IdSystem
</span>/dev/sda1   *      <span style="color: rgba(128, 0, 128, 1)">2048</span>   <span style="color: rgba(128, 0, 128, 1)">2099199</span>   <span style="color: rgba(128, 0, 128, 1)">1048576</span>   <span style="color: rgba(128, 0, 128, 1)">83</span><span style="color: rgba(0, 0, 0, 1)">Linux
</span>/dev/sda2         <span style="color: rgba(128, 0, 128, 1)">2099200</span>   <span style="color: rgba(128, 0, 128, 1)">4196351</span>   <span style="color: rgba(128, 0, 128, 1)">1048576</span>   <span style="color: rgba(128, 0, 128, 1)">82</span>Linux swap /<span style="color: rgba(0, 0, 0, 1)"> Solaris
</span>/dev/sda3         <span style="color: rgba(128, 0, 128, 1)">4196352</span>   <span style="color: rgba(128, 0, 128, 1)">125829119</span>    <span style="color: rgba(128, 0, 128, 1)">60816384</span>   8eLinux LVM</pre>
</div>
<p>&nbsp; &nbsp; &nbsp;Device  # 分区名称</p>
<p>  Boot    # 启动分区,用*表示的是启动分区</p>
<p>  Start    # 表示开始的柱面</p>
<p>  End    # 表示结束的柱面</p>
<p>  Blocks    # block块数量</p>
<p>  Id      # 分区类型ID</p>
<p>  System    # 分区类型</p>
<p>但是我自己的没有带root标志的盘,所以可能启动没有了。。。</p>
<p><br>查看你的Ubuntu安装在哪里。例如:/dev/sda1,对应修改以下命令执行。注意:不要选择EFI分区!</p>
<p>sudo mount /dev/sda1 /mnt</p>
<p>sudo apt-get update<br>sudo apt-get install grub<br>接下来修复引导:</p>
<p>sudo grub-install /dev/sda --root-directory=/mnt<br>会看到这样的界面:</p>
<p><img src="https://www.linuxidc.com/upload/2016_09/160925103563051.png"></p>
<p>修复ubuntu引导</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p>https://blog.csdn.net/u011553516/article/details/116397597</p>
<p>&nbsp;挂载一个分区的方法:</p>
<p>1、建一个目录(挂载磁盘分区)</p>
<div class="table-box">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<p>1</p>
<p>2</p>






































</td>
<td>
<p><code>mkdir</code>&nbsp;<code>/mnt/sda1</code></p>
<p><code>#通过mkdir命令创建文件夹</code></p>






































</td>






































</tr>






































</tbody>






































</table>






































</div>
<p>2、挂载/dev/sda1分区</p>
<div class="table-box">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<p>1</p>
<p>2</p>






































</td>
<td>
<p><code>mount</code>&nbsp;<code>/dev/sda1</code>&nbsp;<code>/mnt/sda1</code></p>
<p><code>#挂载/dev/sda1到/mnt/sda1目录下</code></p>






































</td>






































</tr>






































</tbody>






































</table>






































</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>2. 挂载磁盘</p>
<blockquote>sudo mount /dev/sda9 /mnt<br>sudo mount /dev/sda8 /mnt/boot<br>sudo mount /dev/sda10 /mnt/home<br>sudo mount --bind /sys /mnt/sys<br>sudo mount --bind /proc /mnt/proc<br>sudo mount --bind /dev /mnt/dev</blockquote>
<p>&nbsp;</p>
<p><strong>linux下mnt目录的作用:</strong>mount 可直接理解为“挂载”挂接光驱、USB设备的目录,加载后,会在mnt里多出相应设备的目录。</p>
<h2>linux系统根目录下各个目录用途说明:</h2>
<p>1、/ 根目录 --------- 所有目录挂在其下</p>
<p>2、/boot --------- 存放Ubuntu内核和系统启动文件。系统启动时这些文件先被装载。</p>
<p>3、/etc --------- 系统的配置文件目录。密码文件、设置网卡信息、环境变量的设置等都在此目录中,许多网络配置文件也在其中。</p>
<p>4、/lib &nbsp; ---------&nbsp;根文件系统目录下程序和核心模块的共享库。这个目录里存放着系统最基本的动态链接共享库,类似于Windows下的system32目录,几乎所有的应用程序都需要用到这些共享库。</p>
<p>5、/media &nbsp; --------- 主要用于挂载多媒体设备。ubuntu系统自动挂载的光驱、usb设备,存放临时读入的文件。</p>
<p>6、/proc &nbsp; --------- 这个目录是系统内存的映射,我们可以直接访问这个目录来获取系统信息。也就是说,这个目录的内容不在硬盘上而是在内存里。</p>
<p>7、/sbin&nbsp; &nbsp; &nbsp; ---------&nbsp;s就是Super User的意思,这里存放的是系统管理员使用的系统管理程序,如系统管理、目录查询等关键命令文件。</p>
<p>8、/tmp&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------&nbsp;这个目录是用来存放一些临时文件的,所有用户对此目录都有读写权限。</p>
<p>9、/home  &nbsp; --------- 用户的主目录。下面是自己定义的用户名的文件夹。每个用户的设置文件,用户的桌面文件夹,还有用户的数据都放在这里。</p>
<p>10、/mnt&nbsp;&nbsp;  --------- 此目录主要是作为挂载点使用。通常包括系统引导后被挂载的文件系统的挂载点。如挂载Windows下的某个分区。</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>OK。接下来即可重启进入操作系统!</p>
<p>如果安装正确,则可以直接进入系统。当然,也有部分机子会报错:</p>
<p>如果报错“Minimal BASH-like line editing is supported.”</p>
<p>有两种解决方法:</p>
<p>第一种(推荐)</p>
<p>依次输入如下命令(注意字符中空格)</p>
<p>grub&gt;root (hd0,0)<br>命令含义:从硬盘第一个分区C盘启动</p>
<p>grub&gt;chainloader (hd0,0)+1<br>命令含义:指示GRUB读取分区的第一个扇区的引导记录</p>
<p>grub&gt;boot<br>命令含义:启动GRUB</p>
<p>PS:我在执行这样的命令后,ubuntu启动提示“Unable to find a medium containing a live file system”。google有解。</p>
<p>第二种</p>
<p>sudo apt-get -y purge grub<br>sudo apt-get install grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed<br>然后安装</p>
<p>sudo grub-install /dev/sda --efi-directory=/mnt/boot/efi --boot-directory=/mnt/boot</p>
<p>如果在制作Ubuntu To Go或安装Ubuntu出现“error: file '/grub/i386-pc/normal.mod' not found”的报错,请查看下面这篇文章。</p>
<h3><strong>Ubuntu引导错误修复 - i386</strong></h3>
<p>如果在制作Ubuntu To Go或安装Ubuntu出现“error: file '/grub/i386-pc/normal.mod' not found”的报错,可以进入LiveCD模式进行引导的安装。</p>
<p>插上U盘或CD,进入Try Ubuntu模式。</p>
<p>sudo fdisk -l<br>查看你的Ubuntu安装在哪里。例如:/dev/sda1,对应修改以下命令执行。</p>
<p>sudo mount /dev/sda1 /mnt<br>接下来安装GRUB 2:</p>
<p>sudo grub-install /dev/sda --root-directory=/mnt<br>OK。接下来即可重启进入操作系统!</p>
<p>更多Ubuntu相关信息见Ubuntu&nbsp;专题页面&nbsp;http://www.linuxidc.com/topicnews.aspx?tid=2</p>
<p><strong>本文永久更新链接地址</strong>:http://www.linuxidc.com/Linux/2016-09/135486.htm</p>
<p>&nbsp;</p>
<p>方案四的结局:还是不行。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">方案五(2021.11.1):</span></p>
<p><span style="background-color: rgba(255, 255, 255, 1)">针对目前出现的这个问题:</span></p>
<p><span style="background-color: rgba(255, 204, 0, 1)"><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103092954423-674079593.png"></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="background-color: rgba(255, 255, 255, 1)">再挣扎一次。</span></p>
<p><span style="background-color: rgba(255, 255, 255, 1)">https://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/</span></p>
<p>&nbsp;</p>
<div class="breadcrumb">下面是参考内容:</div>
<div class="entry-content">
<h2>Fixing “minimal BASH like line editing is supported” Grub error</h2>
<p>The process is simple if you follow the steps carefully (not blindly). You may have to change the partition names as per your system.</p>
<p>Step 1: Boot in to the live Linux USB.</p>
<p>Step 2: You need to find out iif your system uses EFI or BIOS. To do that, open the terminal and use the following command to list your partitions:</p>
<pre class="wp-block-code"><code>sudo fdisk -l</code></pre>
<p>Look closely in its output because it could be a huge output. If you see something like EFI, it’s an indication that your system has EFI. This information is important in later stages.</p>
<pre class="wp-block-code"><code>Device      Start       End   Sectors   Size Type
/dev/sda1      2048    976895    974848   476M EFI System
/dev/sda2    976896400383993906150418.6G Linux filesystem
/dev/sda340038400790999033906150418.6G Linux filesystem
/dev/sda479099904 468875263 389775360 185.9G Linux filesystem</code></pre>
<p>You need to note two things here. The partition where EFI is installed (if it is installed) and the partition where root partition is installed.</p>
<p>&nbsp;</p>
</div>
<p>Step 3 (only for non-EFI system): Installing grub on non-EFI system is even easier.</p>
<p>Mount the root partition of Linux:</p>
<pre class="wp-block-code"><code>sudo mount /dev/sda1 /mnt</code></pre>
<p>And then install grub:</p>
<pre class="wp-block-code"><code>sudo grub-install /dev/sd1</code></pre>
<p>Reboot and it should be fine.</p>
<p>当我执行:</p>
<div class="cnblogs_code">
<pre>sudo grub-install /dev/sd1</pre>
</div>
<p>这一步的时候,出现以下错误:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101211326930-216754566.png"></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>解决这个错误的参考链接:</p>
<p>https://www.cnblogs.com/tsreaper/p/chroot-fix-boot.html</p>
<p>然而,在执行第2步:</p>
<p>&nbsp;</p>
<p><span style="font-size: 1.17em">2. 挂载虚拟文件系统</span></p>
<p>Linux 系统运行过程中,还需要 /proc、/dev、/run 等虚拟文件系统。参考资料 1&nbsp;中使用下面这个命令统一完成虚拟文件系统的挂载:</p>
<p>&nbsp;<span class="cnblogs_code">for&nbsp;i&nbsp;in&nbsp;/dev /dev/pts /proc /sys /run;&nbsp;do&nbsp;sudo&nbsp;mount&nbsp;-B $i /mnt$i;&nbsp;done&nbsp;</span></p>
<p>我在虚拟机中执行这个指令成功了,但是在修复学校服务器时不知道为什么不能成功(但是现在也无法重现这个失败...)。所以我使用了参考资料 2&nbsp;中的命令完成虚拟文件系统的挂载:</p>
<div class="cnblogs_code">
<pre>sudo mount -t proc /proc /mnt/proc
sudo mount --rbind /sys /mnt/sys
sudo mount --rbind /dev /mnt/dev
sudo mount --rbind /run /mnt/run</pre>
</div>
<p>我后来特地搜索了一下 mount 指令的几个选项,-B(或者 --bind)可以挂载一个文件系统中已有的子目录,--rbind 则是递归版的 --bind(可以看一下&nbsp;这篇博客&nbsp;了解两者的区别),-t 则是指定挂载的文件系统类型。网上也说&nbsp;&nbsp;<span class="cnblogs_code">sudo&nbsp;mount&nbsp;-B /proc /mnt/proc&nbsp; 和&nbsp;&nbsp;<span class="cnblogs_code">sudo&nbsp;mount&nbsp;-t proc /proc /mnt/proc&nbsp; 一般没什么区别,所以也不太知道发生了什么...如果有知道区别的朋友还请留言赐教。</span></span></p>
<p>&nbsp;</p>
<p><span style="background-color: rgba(255, 255, 255, 1)">的时候,出现以下报错信息:</span></p>
<p><span style="background-color: rgba(255, 255, 255, 1)"><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101211735266-1196966638.png"></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>在绝望之际,以“ubuntu硬盘修复”为关键词进行百度搜索,搜到了下面这个文章:</p>
<p>&nbsp;</p>
<p>**********************************************************************</p>
<p>https://blog.csdn.net/magicarm_lw/article/details/80185926</p>
<p>前几天最担心的事情发生了,公司里自己的代码编译服务器进不去系统了,当时就想到了里面还有一个新功能的代码没有上传,悲剧了。之前有同事的电脑发生过类似的事情,但是由于里面没有重要的东西,就直接格式化硬盘重装系统。但是这次有些东西还没上传,所以不敢直接格式化重装系统。</p>
<p>先用U盘制作了一个ubuntu安装盘,点试用ubuntu进系统,想在系统里面挂载硬盘,把里面要的东西拷贝出来,结果一挂载就报错,没成功。</p>
<p>在度娘输入“ubuntu修复硬盘”,好像有点眉目,看到有命令fsck -y /dev/sda2这个命令,想着死马当活马医,在刚才试用的那个系统里面输入sudo fsck -y /dev/sda2,看到系统在运行这个命令了,等了半个小时去看了下,显示已经完成了。重启了一下,果然好了!哈哈</p>
<div class="cnblogs_code">
<pre>sudo fsck -y /dev/sda2</pre>
</div>
<p>**********************************************************************</p>
<p>&nbsp;</p>
<p>此时,我想起了我的机器之前开机一直出现的问题:</p>
<p>https://www.cnblogs.com/yibeimingyue/p/14261416.html</p>
<p>此时输入命令:</p>
<div class="cnblogs_code">
<pre>sudo fsck -y /dev/sda3</pre>
</div>
<p>机器一阵狂跑:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101230641478-1763110224.jpg"></p>
<p>上图中的部分内容如下:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101230756994-1300393236.jpg"></p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101230652392-1887381707.jpg"></p>
<p>&nbsp;最后竟然出现了固态硬盘的盘符,这下数据有可能有救了!!!</p>
<p>&nbsp;<img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211101230939187-278949260.jpg"></p>
<p>&nbsp;</p>
<p>先把数据拷贝出来再说。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">2021.11.2</span></p>
<p>部分文件拷贝出来了,重启还是进入不了系统,算了,不挣扎了,重装系统吧。</p>
<p><span style="background-color: rgba(255, 204, 0, 1)">2021.11.4的挣扎:</span></p>
<p>https://askubuntu.com/questions/449428/unable-to-locate-package-boot-repair-in-14-04</p>
<p>You can use the following commands to install boot-repair in Ubuntu 14-04:</p>
<pre><code>sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sudo apt-get update
sudo apt-get install -y boot-repair &amp;&amp; boot-repair</code></pre>
<p>出现的问题是:</p>
<div class="cnblogs_code">
<pre>ubuntu@ubuntu:~$ sudo sh -c <span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(128, 0, 0, 1)">sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list</span><span style="color: rgba(128, 0, 0, 1)">"</span><span style="color: rgba(0, 0, 0, 1)">
sed: can</span><span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">t read /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list: No such file or directory</span></pre>
</div>
<p>这个是最后的挣扎了:</p>
<p>My solution is to use&nbsp;<code>boot-repair disk iso</code>, it works for 14.04&nbsp;http://sourceforge.net/projects/boot-repair-cd/files/<br>要不行,就下定决心重装系统了。</p>
<p>boot-repair-disk-64bit.iso的使用方法参考下面的链接:</p>
<p>https://blog.csdn.net/ccc_cui/article/details/82803846</p>
<p>&nbsp;在选择从usb启动后,现在,出现了这个画面:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103111418133-2126246437.png"></p>
<p>&nbsp;</p>
<p>&nbsp;点击Recommended repair之后,出现:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103111229319-188204242.png"></p>
<p>提示可以利用Gparted执行创建BIOS-boot partition, 然后,我点击:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103112434186-131217699.jpg"></p>
<p>&nbsp;</p>
<p>&nbsp;后,出现:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103112449202-735081020.jpg"></p>
<p>&nbsp;</p>
<p>&nbsp;此时,对着第一个分区sda1右键,选择manage flags.</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103125552507-1776632509.jpg"></p>
<p>&nbsp;</p>
<p>跳出:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103125652224-2026110681.jpg"></p>
<p>&nbsp;</p>
<p>之后,在bios_grub那一项打对勾,然后点击close.</p>
<p>此时,敲入命令:</p>
<div class="cnblogs_code">
<pre>sudo fdisk -l</pre>
</div>
<p>显示:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103125747577-1780861060.jpg"></p>
<p>&nbsp;</p>
<p>重复做这一步:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103111418133-2126246437.png"></p>
<p>此时,出现:</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103130321743-873636832.jpg"></p>
<p>&nbsp;</p>
<p>这是一个积极的信号,重启一下看看。</p>
<p>结果是:</p>
<p>开机停在grub界面:</p>
<p>&nbsp;</p>
<p><img src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103153955647-803793783.jpg"></p>
<p>还是不行。</p>
<p>参考下面这个链接进行解决:</p>
<p>https://linuxhint.com/grub_rescue_ubuntu_1804/</p>
<p>&nbsp;</p>
<h2>Using GRUB Rescue to Boot into Ubuntu 18.04 LTS:</h2>
<p>In the GRUB Rescue command line interface, you can list the hard drives and partitions you have installed with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;<span class="kw2">ls</span></span></div>
</div>
<p>As you can see, I have&nbsp;(hd0),&nbsp;(hd0, gpt1)&nbsp;and&nbsp;(hd0,gpt2)&nbsp;available.&nbsp;(hd0)&nbsp;represents the raw hard drive.&nbsp;(hd0,gpt1)&nbsp;and&nbsp;(hd0,gpt2)&nbsp;are the first and second GPT partitions of&nbsp;(hd0)&nbsp;respectively.</p>
<div id="AdThrive_Content_3_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p><img src="https://linuxhint.com/wp-content/uploads/2018/07/g3-2.png"></p>
<p>I’ve Ubuntu 18.04 LTS installed on UEFI hardware. So the first partition&nbsp;(hd0,gpt1)&nbsp;is the EFI partition and the second partition&nbsp;(hd0,gpt2)&nbsp;is the root partition. The files required to boot into the operating system is in the&nbsp;/boot&nbsp;directory of&nbsp;(hd0,gpt2)&nbsp;partition in my case. You may have&nbsp;/boot&nbsp;directory in a separate partition, in that case, make changes to the commands as you see fit.</p>
<p>You can list what files you have in a certain partition with&nbsp;ls&nbsp;command from the GRUB Rescue command line interface.</p>
<p>List the files and directories of the root partition&nbsp;(hd0,gpt2)&nbsp;with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;<span class="kw2">ls&nbsp;<span class="br0">(hd0,gpt2<span class="br0">)<span class="sy0">/</span></span></span></span></span></div>
</div>
<p><img sizes="(max-width: 581px) 100vw, 581px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g4-2.png 581w, https://linuxhint.com/wp-content/uploads/2018/07/g4-2-300x25.png 300w" alt="" width="581" height="48" class="aligncenter size-full wp-image-28780 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g4-2.png"></p>
<p>As you can see, the files and directories are listed.</p>
<div id="AdThrive_Content_4_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p><img sizes="(max-width: 1053px) 100vw, 1053px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g5-2.png 1053w, https://linuxhint.com/wp-content/uploads/2018/07/g5-2-300x24.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g5-2-768x61.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g5-2-1024x81.png 1024w, https://linuxhint.com/wp-content/uploads/2018/07/g5-2-810x64.png 810w" alt="" width="1053" height="83" class="aligncenter size-full wp-image-28781 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g5-2.png"></p>
<p>We are interested in the files we have in the&nbsp;/boot&nbsp;directories.</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;<span class="kw2">ls&nbsp;<span class="br0">(hd0,gpt2<span class="br0">)<span class="sy0">/boot</span></span></span></span></span></div>
</div>
<p>You should find two files in the&nbsp;/boot&nbsp;directory,&nbsp;vmlinuz&nbsp;and&nbsp;initrd&nbsp;as marked in the screenshot below. These files are required in order to boot correctly.</p>
<p><img sizes="(max-width: 1048px) 100vw, 1048px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g6-2.png 1048w, https://linuxhint.com/wp-content/uploads/2018/07/g6-2-300x26.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g6-2-768x67.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g6-2-1024x89.png 1024w, https://linuxhint.com/wp-content/uploads/2018/07/g6-2-810x70.png 810w" alt="" width="1048" height="91" class="aligncenter size-full wp-image-28782 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g6-2.png"></p>
<p>&nbsp;</p>
<p><em>在这一步的时候,我的电脑的界面是:</em></p>
<p><img alt="" loading="lazy" src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211103164702281-153091619.jpg"></p>
<p>&nbsp;</p>
<p><em>这说明,我的硬盘里面是丢失了引导文件内核的。</em></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now set the&nbsp;root&nbsp;variable to point to the root partition&nbsp;(hd0,gpt2)&nbsp;with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;<span class="kw1">set&nbsp;<span class="re2">root=<span class="br0">(hd0,gpt2<span class="br0">)</span></span></span></span></span></div>
</div>
<p><img src="https://linuxhint.com/wp-content/uploads/2018/07/g7-1.png"></p>
<div id="AdThrive_Content_5_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>Now you have to use the&nbsp;linux&nbsp;command to make the relative path of&nbsp;vmlinuz&nbsp;file known to GRUB bootloader.</p>
<p>You can do that with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;linux&nbsp;<span class="sy0">/boot<span class="sy0">/vmlinuz-4.15.0-<span class="nu0">20-generic&nbsp;<span class="re2">root=<span class="sy0">/dev<span class="sy0">/sda2</span></span></span></span></span></span></span></div>
</div>
<p><img sizes="(max-width: 931px) 100vw, 931px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g8-1.png 931w, https://linuxhint.com/wp-content/uploads/2018/07/g8-1-300x21.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g8-1-768x53.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g8-1-810x56.png 810w" alt="" width="931" height="64" class="aligncenter size-full wp-image-28784 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g8-1.png"></p>
<p><span style="text-decoration: underline">NOTE:</span>&nbsp;Here&nbsp;root=/dev/sda2&nbsp;is required. Otherwise you may not be able to boot.&nbsp;/dev/sda2&nbsp;means, that it is the second partition of the first hard drive. I added a table to help you understand how it works.</p>
<table style="width: 803px">
<tbody>
<tr>
<td>GRUB Identifier</td>
<td>Hard Drive</td>
<td>Partition</td>
<td>Linux Identifier</td>
</tr>
<tr>
<td>(hd0)</td>
<td>First</td>
<td>&nbsp;</td>
<td>/dev/sda</td>
</tr>
<tr>
<td>(hd0,gpt1)</td>
<td>First</td>
<td>First</td>
<td>/dev/sda1</td>
</tr>
<tr>
<td>(hd0,gpt2)</td>
<td>First</td>
<td>Second</td>
<td>/dev/sda2</td>
</tr>
<tr>
<td>(hd1)</td>
<td>Second</td>
<td>&nbsp;</td>
<td>/dev/sdb</td>
</tr>
<tr>
<td>(hd1,gpt2)</td>
<td>Second</td>
<td>Second</td>
<td>/dev/sdb2</td>
</tr>
<tr>
<td>(hd1,gpt5)</td>
<td>Second</td>
<td>Fifth</td>
<td>/dev/sdb5</td>
</tr>
</tbody>
</table>
<p>Also know that file and directory auto completion with the&nbsp;&lt;Tab&gt;&nbsp;key works in the GRUB command line interface as well, just like it does in a Linux terminal. So you should not have hard time navigating around GRUB command line interface.</p>
<p>Now you have to run the&nbsp;initrd&nbsp;command to make the initrd image know to the GRUB bootloader.</p>
<div id="AdThrive_Content_6_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>You can do that with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;initrd&nbsp;<span class="sy0">/boot<span class="sy0">/initrd.img-4.15.0-<span class="nu0">20-generic</span></span></span></span></div>
</div>
<p><img sizes="(max-width: 802px) 100vw, 802px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g9-1.png 802w, https://linuxhint.com/wp-content/uploads/2018/07/g9-1-300x24.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g9-1-768x60.png 768w" alt="" width="802" height="63" class="aligncenter size-full wp-image-28785 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g9-1.png"></p>
<p>Now that everything is set, you can run the following GRUB command to boot into your Ubuntu 18.04 LTS operating system.</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;&nbsp;boot</span></div>
</div>
<p><img sizes="(max-width: 532px) 100vw, 532px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g10-1.png 532w, https://linuxhint.com/wp-content/uploads/2018/07/g10-1-300x34.png 300w" alt="" width="532" height="60" class="aligncenter size-full wp-image-28786 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g10-1.png"></p>
<p>The boot process should start as you can see from the screenshot below.</p>
<p><img sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g11-1.png 1024w, https://linuxhint.com/wp-content/uploads/2018/07/g11-1-300x225.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g11-1-768x576.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g11-1-810x608.png 810w" alt="" width="1024" height="768" class="aligncenter size-full wp-image-28787 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g11-1.png"></p>
<div id="AdThrive_Content_7_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>You should see the login screen afterward. Login to your Ubuntu 18.04 LTS system.</p>
<p><img sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g12-1.png 1024w, https://linuxhint.com/wp-content/uploads/2018/07/g12-1-300x225.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g12-1-768x576.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g12-1-810x608.png 810w" alt="" width="1024" height="768" class="aligncenter size-full wp-image-28788 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g12-1.png"></p>
<div id="AdThrive_Content_8_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>Now that you’re logged in, run the following command to update the GRUB 2 configuration file:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer"><span class="co4">$&nbsp;<span class="kw2">sudo&nbsp;update-grub2</span></span></div>
</div>
<p><img sizes="(max-width: 922px) 100vw, 922px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g13-1.png 922w, https://linuxhint.com/wp-content/uploads/2018/07/g13-1-300x31.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g13-1-768x79.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g13-1-810x83.png 810w" alt="" width="922" height="95" class="aligncenter size-full wp-image-28789 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g13-1.png"></p>
<p>The GRUB 2 configuration should be updated.</p>
<p><img sizes="(max-width: 1117px) 100vw, 1117px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g14-1.png 1117w, https://linuxhint.com/wp-content/uploads/2018/07/g14-1-300x84.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g14-1-768x215.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g14-1-1024x286.png 1024w, https://linuxhint.com/wp-content/uploads/2018/07/g14-1-810x226.png 810w" alt="" width="1117" height="312" class="aligncenter size-full wp-image-28790 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g14-1.png"></p>
<div id="AdThrive_Content_9_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>You may also need to re-install GRUB bootloader with the following command:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer"><span class="co4">$&nbsp;<span class="kw2">sudo&nbsp;grub-install&nbsp;<span class="sy0">/dev<span class="sy0">/sda</span></span></span></span></div>
</div>
<p><span style="text-decoration: underline">NOTE:</span>&nbsp;Here&nbsp;/dev/sda&nbsp;is the hard drive where you want to install GRUB bootloader. Usually, it is the hard drive where you have your root partition.</p>
<p><img sizes="(max-width: 988px) 100vw, 988px" srcset="https://linuxhint.com/wp-content/uploads/2018/07/g15-1.png 988w, https://linuxhint.com/wp-content/uploads/2018/07/g15-1-300x62.png 300w, https://linuxhint.com/wp-content/uploads/2018/07/g15-1-768x159.png 768w, https://linuxhint.com/wp-content/uploads/2018/07/g15-1-810x168.png 810w" alt="" width="988" height="205" class="aligncenter size-full wp-image-28791 lazyloaded lazyload" data-ll-status="loaded" data-src="https://linuxhint.com/wp-content/uploads/2018/07/g15-1.png"></p>
<p>Now that everything is working, you should be able to boot normally. If you still need something fixed, you can do it right now.</p>
<h4>Loading Additional Modules:</h4>
<p>At times, the GRUB command line interface prompt should be&nbsp;grub rescue&gt;&nbsp;instead of</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub<span class="sy0">&gt;</span></div>
</div>
<p>In that case, you need to run 2 additional commands. They are used to load GRUB modules that are not loaded by default. But are very important to boot the system.</p>
<div id="AdThrive_Content_10_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>The commands are:</p>
<div class="codecolorer-container bash default">
<div class="bash codecolorer">grub rescue<span class="sy0">&gt;&nbsp;insmod normal<br>grub rescue<span class="sy0">&gt;&nbsp;insmod linux</span></span></div>





</div>
<h5>Useful GRUB Rescue Commands:</h5>
<p>In this section, I am going to list some of the common GRUB rescue commands that you may need in order to troubleshoot boot problems.</p>
<p>set pager=1&nbsp;– If the output of any command is long enough that it doesn’t fit the screen, then this commands shows the outputs in a pager, like&nbsp;less&nbsp;in Linux terminal.</p>
<p>lsmod&nbsp;– It lists all the GRUB modules that are loaded.</p>
<p>cat&nbsp;– used to read files.</p>
<p>usb&nbsp;– list all the USB devices attached to your system.</p>
<div id="AdThrive_Content_11_desktop" class="adthrive-ad adthrive-content adthrive-content-1">&nbsp;</div>
<p>clear&nbsp;– clears all the text from the GRUB command line window.</p>
<p>configfile grub.cfg_filePath&nbsp;– You can add a&nbsp;grub.cfg&nbsp;file using this command.</p>
<p>insmod&nbsp;– load GRUB module.</p>
<p>lspci&nbsp;– list all the attached PCI devices.</p>
<p>ls&nbsp;– list files, directories and block devices of your computer.</p>
<p>Although, this article is geared toward Ubuntu 18.04 LTS, it should work for any other modern Linux distribution that uses GRUB bootloader. Thanks for reading this article.</p>
<p>&nbsp;</p>
<p>&nbsp;算了,不折腾了,重装。</p>
<p>&nbsp;重装后的ubuntu:<br><img alt="" width="628" height="333" loading="lazy" src="https://img2020.cnblogs.com/blog/1438899/202111/1438899-20211104131505495-1073725165.png"></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br><br></p>
<p>&nbsp;</p><br><br>
来源:https://www.cnblogs.com/yibeimingyue/p/15478779.html
頁: [1]
查看完整版本: ubuntu出现问题gave up waiting for root file system device ubuntu 16.04