Centos rescue notes under the grub command

Source: Internet
Author: User
Yesterday, the/boot/grub2/fuse package was modified. after the normal tar-zxvf decompression, A. iso file will appear.

I modified/boot/grub2/grub yesterday. cfg, an error occurred while guiding the result. the command line mode of grub was directly entered when the machine was started. after a long time, the system still failed to recover. Therefore, we had to reinstall Ubuntu to clear the original centos7.

The cause is that Firefox cannot play videos and music, and Adobe flashplayeris required. in this case, I downloaded a flashplayer.tar.gz package. after normal tar-zxvf decompression, A. iso file and a usr source code folder will appear. According to Du Niang, this. iso file should be added to the/usr/lib64/mozilla/plugins folder. as the name suggests, all mozilla plug-ins should be placed here. Then cp ALL the source code files/usr/* to/usr. I followed the rules step by step, but the lack of plug-ins still appeared after I restarted Firefox.

Then I want to change the installation method, so I downloaded a Flashplayer rpm Package and installed it directly using the rpm command. Here, the rpm package and the dpkg under the Debian release agree. they are all software package management tools that will automatically compile, install, and analyze the dependency between the software. In the Debian system, make apt-get to simplify the download + installation process, so Redhat has yum. Back to the question, rpm-ivh shows that everything is normal, but it still shows the lack of plug-ins when you open Firefox! Hold the grass !!! Yum update means to upgrade all software packages, system configurations, versions, and kernels! Note that the system has been upgraded. The only thing to be thankful for is that Firefox can watch videos and listen to music. However, when I try to access my win7 system after a restart, the problem arises.

The loss of Windows 7 startup items is not a major concern because colleagues who have installed Centos have encountered this problem. There are also many solutions online, that is, modifying the grub configuration file, add the partition where the windows system kernel is located to the startup item. This grub. cfg I modified it at the beginning. I thought the system upgrade overwrites it and opened it with a try. I found that the startup code I added was still there, it's just that the Centos startup item has an additional item and you don't know what it is. I saved it directly in vim and restarted it. The Win7 boot item still does not appear in the boot menu. Strange, I went to Baidu grub. cfg different modification methods, see this post http://www.2cto.com/ OS /201411/354914.html, (here it is not set to hyperlink is for a reason !) According to his solution 1, then... Then... I got down and started to go to the grub command line. it is obvious that grub. cfg has been changed and crashed! This blog post also took a lot of detours. he finally chose to use the system disk to solve the problem (but I don't have a system disk) but he was trying to write down his detours to release the pressure, but I was so miserable... Do not add your own win7 startup item code to the Centos startup item code as described by the blogger! You can read grub. cfg carefully to understand its purpose. after all, there are a lot of comments. But the blogger still said some of the key, that is, "grub2-mkconfig-o/boot/grub2/grub. cfg ", set grub. cfg re-mkconfig should be able to solve the problem, of course I have not tried, we suggest you be careful! Another point is that you must back up important system files before modifying them! Laruence also said every day...

Now that things have reached this point, I came to the grub command line. As shown in the following example, Baidu should fix the problem. However, Baidu mostly uses grub commands, while grub2 is mine! There are still many differences. for example, the root command is changed to set root, and the kernel command is changed to linux. Then, based on the grub in Baidu's experience, run the following command to repair centos: http://jingyan.baidu.com/article/c35dbcb0f020478917fcbc56.htmlclick to open the link. I also understand the meaning. First, find the disk on which the boot partition is located (the disk where/boot was originally mounted) and then read the kernel image vmlinuz *. img, and then use the initrd command to mount a temporary root file system to support the two phases of the boot. The loaded file contains many drivers and executable programs used to mount the real file system. If everything goes well, you can boot to Centos after entering boot. However, I did not succeed. every time I boot the system, it enters the emergency mode. I think it may be that the/boot mount disk partition has not been selected, and I have to reinstall Ubuntu. In fact, there are a lot of cases on the Internet that use Centos system disks to repair success. Unfortunately, I don't have a system disk at hand...

Finally, we will compare the advantages and disadvantages of Centos and Ubuntu: The Ubuntu interface looks better, and many operations can be made as in Windows. Ubuntu can automatically identify the ntfs file system format, which is not available in Centos. you must manually mount the ntfs file system using software, or you can edit the/etc/fstab file to boot and Mount ntfs, in fact, things are both sides. Although this is troublesome, you have learned more and understood more deeply!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.