Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sorry, my last post was maybe a bit ambiguous. When I wrote "/dev/sda?" I didn't mean to replace the question mark with the partition number, I was just asking whether it is /dev/sda or /dev/sdb or ...
So try again with
grub-install /dev/sdb
Usually you install the boot loader in the MBR of a hard disk, and not in the boot record of a partition. The latter you only do when you chainload from another boot manager.
Yeah, I put sdb instead of sdb3
Apparently it worked.
But the system don't want to boot.
It says "File not found" when I choose from grub menu "CentOS 2.6.32-431.el6.x86_64"
I'm not a grub expert, so maybe someone else can step in. But I think we're on the right track. BTW are we talking about grub 1 or 2? Since your grub config was working before I wouldn't think that you need to recreate the grub.cfg. When in the grub menu, can you press "e" and write here what it says?
You know that you can change the grub boot parameter from within grub? You don't need to change your grub.cfg every time. Just edit the line with 'e' and when you finished editing press 'b' to boot. Much quicker than booting rescue, mounting and editing grub.cfg.
I found this thread where someone had the same problem. Some said that there is a problem with certain kernel versions, someone solved it by replacing 'root=UUID=...' with 'root=/dev/md0'. I too suspect that the UUID is the one from the boot partition of the failed drive. You can check the UUID by booting into the rescue system and issue the 'blkid' command. This should give you the UUIDs of all partitons. So use the correct UUID or try 'root=/dev/md124' or 'root='/dev/sdb3'. Keep in mind that sdb might not be sdb when you don't boot from the rescue media. You might also need to rebuild the initramfs when you are in the chroot after changing the grub.cfg.
I am trying to restore the grub from a live CD for 3 hours!
I can't!
I google a lot, and did everything ... not working.
You have a step by step guide?
Thank you!
The way it has to be done is to either run grub2-mkconfig /dev/xxx -o /boot/grub2/grub.cfg (if on a non-efi system. If there was never a grub segment in the mbr of that disk, you may have to run
From a liveCD go here and download the script. Run it as the readme says. Post the RESULTS.txt here so we can see what the real situation is in your environment rather than guessing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.