简体   繁体   English

如何从Fedora Core的rc.local中的错误insmod中拯救Linux系统?

[英]How to rescue the Linux system from erroneous insmod in rc.local in Fedora Core?

I have placed a faulty kernel object in the rc.local. 我在rc.local中放置了错误的内核对象。 Because of this faulty kernel object,the system crashes on bootup. 由于此错误的内核对象,系统在启动时崩溃。 Now, my aim is to remove that faulty ko insmod from rc.user. 现在,我的目标是从rc.user中删除有问题的ko insmod。 However, I cannot access rc.user as my system crashes on bootup. 但是,由于系统在启动时崩溃,因此无法访问rc.user。 How can I fix this issue? 如何解决此问题?

If you are getting the grub screen then you can go to runlevel 1 and change the file. 如果您正在获取grub屏幕,则可以转到runlevel 1并更改文件。

On grub screen you will have to 在grub屏幕上,您将必须

press a after selecting the Fedora kernel with which you want to boot.
APPEND single after space in that line and press enter
press b to boot in single user mode

You can edit any file in this mode. 您可以在此模式下编辑任何文件。

The safest & easiest approach when I get into such troubles is to mount the HD (contaning the faulty kernel) as an external hard drive to another linux machine and manually edit the files causing trouble. 当我进入这样的烦恼,最安全和最简单的方法是mount在HD(contaning故障内核)作为外部硬盘驱动器到另一个Linux机器和手动编辑文件作祟。

  1. Do a fdisk -l with your HD plugged in (thorugh USB). 在插入HD的情况下执行fdisk -l (通过USB)。 Take notice of the < /dev/sd*# >. 注意< /dev/sd*# >。
  2. mount /media /dev/<sd*#>

Now, you can access your boot or root partition to access the files. 现在,您可以访问boot分区或root分区来访问文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM