Eu tenho um problema com um dos meus dois discos de um software raid1 (oi dedicado servidor com O.S. Debian 7.1). Ele será substituído em poucos dias. Minha pergunta é como verificar com o Grub se ambos os discos são inicializáveis. Eu gostaria de saber que após a reconstrução do software do raid1 pelo mdadm, o servidor irá inicializar sem problemas.
Posso adicionar algumas informações:
1) Eu tenho o Bios e não o Uefi
2) Este é o texto do arquivo de configuração do grub "grub.cfg"
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) Pela execução de um script que baixei (bootscriptinfo) tive essa saída:
============================= 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) Examinando o arquivo group.cfg eu comentei estas duas linhas que pelo uuid identificam antes das partições sda2 e sdb2 e depois (na segunda linha) md2.
set root='(mduuid/9bad0377260a5b69a4d2adc226fd5302)'
search --no-floppy --fs-uuid --set=root adcd0e04-e6ee-4a7d-abd2-a8880e6ba90d
5) Examinando a saída de bootscriptinfo eu comentei dois detalhes:
O primeiro:
=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.
O segundo:
The first parttion 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?
Espero que esta informação seja suficiente para ter algumas respostas às minhas perguntas.