LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-24-2017, 05:46 AM   #1
iampy
LQ Newbie
 
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
grub - software raid1- check if both disks are bootable


I've a problem with one of my two disks of a raid1 software (ovh dedicated server with O.S. Debian 7.1). It will be replaced in a few days.

My question is how to check with Grub if both disk are bootable. I'd like to be sure that after software rebuilding of raid1 by mdadm, the server will boot without problems.

I can add some information:

1) I have Bios and not Uefi

2) This is the text of the grub configuration file "grub.cfg"

Quote:
if [ -s $prefix/grubenv ]; then

load_env

fi

set default="0"

if [ "${prev_saved_entry}" ]; then

set saved_entry="${prev_saved_entry}"

save_env saved_entry

set prev_saved_entry=

save_env prev_saved_entry

set boot_once=true

fi

function savedefault {

if [ -z "${boot_once}" ]; then

saved_entry="${chosen}"

save_env saved_entry

fi

}

function load_video {

insmod vbe

insmod vga

insmod video_bochs

insmod video_cirrus

}

insmod raid

insmod mdraid09

insmod part_gpt

insmod part_gpt

insmod ext2

set root='(mduuid/9bad0377260a5b69a4d2adc226fd5302)'

search --no-floppy --fs-uuid --set=root adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d

if loadfont /usr/share/grub/unicode.pf2 ; then

set gfxmode=640x480

load_video

insmod gfxterm

insmod raid

insmod mdraid09

insmod part_gpt

insmod part_gpt

insmod ext2

set root='(mduuid/9bad0377260a5b69a4d2adc226fd5302)'

search --no-floppy --fs-uuid --set=root adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d

set locale_dir=($root)/boot/grub/locale

set lang=

insmod gettext

fi

terminal_output gfxterm

set timeout=5

set menu_color_normal=cyan/blue

set menu_color_highlight=white/blue

menuentry "Debian GNU/Linux, OVH kernel 3.8.13-xxxx-grs-ipv6-64" {

insmod raid

insmod mdraid09

insmod part_gpt

insmod part_gpt

insmod ext2

set root='(mduuid/9bad0377260a5b69a4d2adc226fd5302)'

search --no-floppy --fs-uuid --set=root adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d

linux /boot/bzImage-3.8.13-xxxx-grs-ipv6-64 root=/dev/md2 ro quiet

}

if [ -f $prefix/custom.cfg ]; then

source $prefix/custom.cfg;

fi
3) By the execution of a script I downloaded (bootscriptinfo) I had these output:

Quote:
============================= Boot Info Summary: ===============================
=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.


sda1: __________________________________________________________________________

File system: BIOS Boot partition
Boot sector type: -
Boot sector info:

sda2: __________________________________________________________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda3: __________________________________________________________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda4: __________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________________________________

File system: BIOS Boot partition
Boot sector type: Grub2's core.img
Boot sector info:

sdb2: __________________________________________________________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb3: __________________________________________________________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb4: __________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

md3: ___________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:

md2: ___________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Mounting failed: mount: /dev/md2 already mounted or MDRaid/md2 busy

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 1 3,907,029,167 3,907,029,167 ee GPT


GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sda1 40 2,048 2,009 BIOS Boot partition
/dev/sda2 4,096 307,202,047 307,197,952 RAID partition (Linux)
/dev/sda3 307,202,048 3,845,582,847 3,538,380,800 RAID partition (Linux)
/dev/sda4 3,845,582,848 3,907,020,799 61,437,952 Swap partition (Linux)

Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 1 3,907,029,167 3,907,029,167 ee GPT


GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sdb1 40 2,048 2,009 BIOS Boot partition
/dev/sdb2 4,096 307,202,047 307,197,952 RAID partition (Linux)
/dev/sdb3 307,202,048 3,845,582,847 3,538,380,800 RAID partition (Linux)
/dev/sdb4 3,845,582,848 3,907,020,799 61,437,952 Swap partition (Linux)

"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/md2 adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d ext4
/dev/md3 adfbad7d-c8c3-4b04-884a-87d2d35e3a62 ext4
/dev/sda2 9bad0377-260a-5b69-a4d2-adc226fd5302 linux_raid_member
/dev/sda3 cca07bac-0ea8-99e8-a4d2-adc226fd5302 linux_raid_member
/dev/sda4 05de1987-d6cb-4baa-87f8-3b008e05de8e swap
/dev/sdb2 9bad0377-260a-5b69-a4d2-adc226fd5302 linux_raid_member
/dev/sdb3 cca07bac-0ea8-99e8-a4d2-adc226fd5302 linux_raid_member
/dev/sdb4 7b1315b8-dcf4-4bd6-9379-ffbcf3014aa6 swap


=============================== StdErr Messages: ===============================

No volume groups found
4) By examining the file grub.cfg I remarked these two lines that by the uuid identify before the partitions sda2 and sdb2 and after (in the second line) md2.

Quote:
set root='(mduuid/9bad0377260a5b69a4d2adc226fd5302)'
search --no-floppy --fs-uuid --set=root adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d
5) By examing the output of bootscriptinfo I remarked two details:

The first one:
Quote:
=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.
The second one:
Quote:
The first partition of both disks is dedicated to a Bios Boot Partition and only for sdb1 there is this value in Boot Sector type
Boot sector type: Grub2's core.img

Core.img is a file in the same folder of grub.cfg (\boot\grub). Why does it appear only in sdb1?
I hope that this information will be enough in order to have some answers to my questions.

Thanks in advance for your help.
 
Old 06-26-2017, 08:51 AM   #2
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Install it to be sure.
Code:
# grub2-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
Repeat for /dev/sdb once replaced.
 
  


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
Upgrading disks in software raid1 DebianUser Linux - Hardware 2 11-12-2013 03:16 AM
software raid1, underlying disks swamp-dog Linux - General 4 06-08-2013 12:57 PM
[SOLVED] slackware 13.37 and bootable software RAID1 asidko Linux - Software 1 07-05-2012 03:33 PM
Making bootable both disks of mdadm raid1 chiendarret Linux - Software 0 03-08-2009 05:15 AM
Non-bootable software RAID1 partitions also cannot be mounted pcardout Linux - Server 4 06-28-2007 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:54 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