LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2021, 09:01 AM   #16
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled

Quote:
Originally Posted by LinuGeek View Post
Am I missing something here?
I think you've covered all the bases.

When in the recovery environment, all you really need to do is create the correct partition structure on the new drive and install GRUB.

Well, you may also want to start the rebuild process for the partition containing /boot, and wait for it to complete. I don't know how smart GRUB is when it comes to loading the kernel and initrd from a degraded mdadm RAID volume.

Once GRUB is in place, you can safely reboot the server and then perform the remaining tasks.
 
1 members found this post helpful.
Old 01-14-2021, 04:02 AM   #17
LinuGeek
Member
 
Registered: Jun 2008
Posts: 126

Original Poster
Rep: Reputation: 0
I did run some extra commands to find out the location of grub.

Quote:
#dd if=/dev/sdb bs=512 count=1 2> /dev/null | grep -q GRUB && echo "GRUB found"
GRUB found

The above command tells us whether or not Grub is installed on a particular disk. In our case, I found out that Grub is installed on /dev/sdb. Is as well logical as this disk is a part of the software raid md0 (/boot). Does it mean, the system will be able to boot *normally* even if we restart the system without taking out the faulty disk.

This question is only for knowledge purpose!!!
 
Old 01-14-2021, 07:58 AM   #18
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
In order for the system to be able to boot from the second drive (using GRUB), the GRUB bootblock must be installed, it must be able to locate the 2. stage bootloader, and of course the BIOS must be able to boot from the drive.

It seems there's indeed a GRUB bootblock present in the MBR of the second drive. Will it be able locate and load the bootloader if the first drive is missing or non-functional? I can't say. In theory it should, given that is supposedly supports software RAID volumes.

If the first drive has bad blocks, the very minimal loader in the bootblock must contain functionality to handle a case where the bootblock is loaded from drive A, but the second stage loader must be fetched from drive B due to read errors on drive A. Perhaps I'm being overly pessimistic, but I have my doubts that the tiny MBR bootloader contains such functionality.

On the other hand, if the first drive is missing entirely, what used to be the second drive (BIOS drive 0x81) will automatically become the first drive (BIOS drive 0x80). If the MBR loader simply keeps using the same BIOS drive that was used to load the MBR in the first place, the system will probably boot normally.
 
1 members found this post helpful.
  


Reply

Tags
disk, linux, lvm, raid, suse



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to replace Faulty Linux RAID disk LXer Syndicated Linux News 0 03-30-2017 09:03 AM
LXer: How to replace Faulty Linux RAID disk LXer Syndicated Linux News 0 02-22-2017 01:51 PM
RAID1: can't replace faulty spare (marked again as 'faulty spare' within seconds) Thambry Linux - General 2 11-14-2013 07:31 AM
Faulty card or faulty config? svar Linux - Networking 4 09-02-2009 09:39 AM
software raid - add device wrongly marked faulty back into array? snoozy Linux - General 2 06-27-2003 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:35 AM.

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