Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
08-21-2015, 02:28 PM
|
#16
|
Member
Registered: Aug 2015
Distribution: Kubuntu 24.04 LTS
Posts: 241
Rep:
|
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.
|
|
|
08-21-2015, 03:04 PM
|
#17
|
LQ Newbie
Registered: Aug 2015
Posts: 12
Original Poster
Rep: 
|
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"
|
|
|
08-21-2015, 03:42 PM
|
#18
|
Member
Registered: Aug 2015
Distribution: Kubuntu 24.04 LTS
Posts: 241
Rep:
|
Quote:
Originally Posted by adiculiniute
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?
|
|
|
08-21-2015, 03:52 PM
|
#19
|
LQ Newbie
Registered: Aug 2015
Posts: 12
Original Poster
Rep: 
|
Yes... definitely we are on the right track!
I put a picture with what e key returns on grub menu.
hd1,2 - I changed that ... maybe I will gues the right numbers, sincer I don't know if it's 0 or 1, and what partition number is right.
|
|
|
08-21-2015, 04:16 PM
|
#20
|
LQ Newbie
Registered: Aug 2015
Posts: 12
Original Poster
Rep: 
|
Hmm... we have progress!!
I changed in grub.conf... from hd1,2 in hd0,2... and now the os want's to boot. The centos logo appears.
After a while it says:
Kernel panic - not syncing. Atempt to kill init!
PID1 init not tained 2.6.32-573.el6.i686 #1
Call trace:
...... switching back to text console.
NOW what? So close to success! 
Last edited by adiculiniute; 08-21-2015 at 04:17 PM.
|
|
|
08-22-2015, 10:27 AM
|
#21
|
Member
Registered: Aug 2015
Distribution: Kubuntu 24.04 LTS
Posts: 241
Rep:
|
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.
|
|
|
08-24-2015, 06:39 PM
|
#22
|
Member
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Rep:
|
Quote:
Originally Posted by adiculiniute
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
grub2-install /dev/xxx
Please read info grub2.
|
|
|
08-24-2015, 07:11 PM
|
#23
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,379
|
Nope. CentOS 6 doesn't use grub2.
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.
|
|
|
08-27-2015, 03:10 PM
|
#24
|
LQ Newbie
Registered: Aug 2015
Posts: 12
Original Poster
Rep: 
|
When I run the script ./bootinfoscript it says:
"./bootinfoscript: /bin/bash^M: bad interpreter: No such file or directory."
|
|
|
All times are GMT -5. The time now is 10:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|