LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 08-21-2015, 02:28 PM   #16
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67

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.
 
Old 08-21-2015, 03:04 PM   #17
adiculiniute
LQ Newbie
 
Registered: Aug 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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"
Attached Thumbnails
Click image for larger version

Name:	grub-installed.jpg
Views:	14
Size:	113.5 KB
ID:	19240  
 
Old 08-21-2015, 03:42 PM   #18
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by adiculiniute View Post
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?
 
Old 08-21-2015, 03:52 PM   #19
adiculiniute
LQ Newbie
 
Registered: Aug 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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.
Attached Thumbnails
Click image for larger version

Name:	grub-e.jpg
Views:	16
Size:	106.7 KB
ID:	19241  
 
Old 08-21-2015, 04:16 PM   #20
adiculiniute
LQ Newbie
 
Registered: Aug 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-22-2015, 10:27 AM   #21
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
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.
 
Old 08-24-2015, 06:39 PM   #22
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Blog Entries: 1

Rep: Reputation: 59
Quote:
Originally Posted by adiculiniute View Post
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.
 
Old 08-24-2015, 07:11 PM   #23
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 08-27-2015, 03:10 PM   #24
adiculiniute
LQ Newbie
 
Registered: Aug 2015
Posts: 12

Original Poster
Rep: Reputation: Disabled
When I run the script ./bootinfoscript it says:

"./bootinfoscript: /bin/bash^M: bad interpreter: No such file or directory."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install grub to BOTH hdd's - /boot on software raid1 suprstar Linux - Software 1 09-14-2012 05:59 AM
[SOLVED] Laptop died, moved HDD to external enclosure. Can't boot. uncertain Linux - Laptop and Netbook 3 01-21-2010 04:04 PM
Kernel panic during boot with software RAID1 Petevs Linux - General 2 09-11-2007 06:41 PM
software RAID1; system doesn't boot kristof_v Linux - Software 1 06-19-2007 09:13 AM
[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails Akhran Linux - Newbie 2 05-04-2006 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration