Skip to main content

Thread: GRUB2 + GPT + mdadm/mdraid


i'm having ton of problems getting system set up. comes down getting grub2 see raid devices. can rescue prompt, after that, nothing

booted live cd, partitioned harddrive, set mdraid , ran 10.04.3 server installation. failed on grub , continued without it.


i'm booted ubuntu 10.10 desktop. cannot grub recognize raid devices.

here's info:

partitions
code:
# parted -l model: ata hitachi hds72303 (scsi) disk /dev/sda: 3001gb sector size (logical/physical): 512b/512b partition table: gpt  number  start   end     size    file system     name     flags  1      17.4kb  2000kb  1983kb                  grub     bios_grub  2      2097kb  2997gb  2997gb  xfs             primary  raid  3      2997gb  3001gb  4001mb  linux-swap(v1)  swap     raid   model: ata hitachi hds72303 (scsi) disk /dev/sdb: 3001gb sector size (logical/physical): 512b/512b partition table: gpt  number  start   end     size    file system     name     flags  1      17.4kb  2000kb  1983kb                  grub     bios_grub  2      2097kb  2997gb  2997gb  xfs             primary  raid  3      2997gb  3001gb  4001mb  linux-swap(v1)  swap     raid
raid info
code:
model: linux software raid array (md) disk /dev/md0: 2997gb sector size (logical/physical): 512b/512b partition table: loop  number  start  end     size    file system  flags  1      0.00b  2997gb  2997gb  xfs   model: linux software raid array (md) disk /dev/md1: 4001mb sector size (logical/physical): 512b/512b partition table: loop  number  start  end     size    file system     flags  1      0.00b  4001mb  4001mb  linux-swap(v1)  # mdadm --detail --scan array /dev/md0 level=raid1 num-devices=2 metadata=01.00 name=0 uuid=6bb41264:84b97c4c:85f5beb4:355f331c array /dev/md1 level=raid1 num-devices=2 metadata=01.00 name=1 uuid=ef7ecae8:4969eec3:4439ba59:e65ce048  root@ubuntu:~# mdadm --detail /dev/md0 /dev/md0:         version : 01.00   creation time : tue nov 22 00:27:38 2011      raid level : raid1      array size : 2926356344 (2790.79 gib 2996.59 gb)   used dev size : 5852712688 (5581.58 gib 5993.18 gb)    raid devices : 2   total devices : 2 preferred minor : 0     persistence : superblock persistent      update time : tue nov 22 02:11:40 2011           state : active, resyncing  active devices : 2 working devices : 2  failed devices : 0   spare devices : 0   rebuild status : 23% complete             name : 0            uuid : 6bb41264:84b97c4c:85f5beb4:355f331c          events : 9      number   major   minor   raiddevice state        0       8        2        0      active sync   /dev/sda2        1       8       18        1      active sync   /dev/sdb2 root@ubuntu:~# mdadm --detail /dev/md1 /dev/md1:         version : 01.00   creation time : tue nov 22 00:28:49 2011      raid level : raid1      array size : 3907572 (3.73 gib 4.00 gb)   used dev size : 3907572 (3.73 gib 4.00 gb)    raid devices : 2   total devices : 2 preferred minor : 1     persistence : superblock persistent      update time : tue nov 22 02:11:40 2011           state : active  active devices : 2 working devices : 2  failed devices : 0   spare devices : 0             name : 1            uuid : ef7ecae8:4969eec3:4439ba59:e65ce048          events : 2      number   major   minor   raiddevice state        0       8        3        0      active sync   /dev/sda3        1       8       19        1      active sync   /dev/sdb3

uuids:
code:
root@ubuntu:~# blkid /dev/loop0: type="squashfs" /dev/sda2: uuid="6bb41264-84b9-7c4c-85f5-beb4355f331c" label="0" type="linux_raid_member" /dev/sda3: uuid="ef7ecae8-4969-eec3-4439-ba59e65ce048" label="1" type="linux_raid_member" /dev/sdb2: uuid="6bb41264-84b9-7c4c-85f5-beb4355f331c" label="0" type="linux_raid_member" /dev/sdb3: uuid="ef7ecae8-4969-eec3-4439-ba59e65ce048" label="1" type="linux_raid_member" /dev/md0: uuid="2b463369-10d0-4e01-aa6c-948ab4284f1d" type="xfs" /dev/md1: uuid="b36b8777-0e52-4c76-a365-c36f81519dac" type="swap" /dev/sdc1: label="pendrive" uuid="1203-1228" type="vfat"
install procedure
hit tab when livecd prompts pick boot from. add

code:
nodmraid
to end of option , boot.

install mdadm:
code:
sudo apt-get install --no-install-recommends mdadm
make sure drives recognized
code:
sudo mdadm --detail --scan
mount , enter chroot
code:
mount /dev/md0 /mnt; in /dev /dev/pts /proc /sys; sudo mount -b $i /mnt$i; done ; chroot /mnt

use following install:

create /boot/grub/device.map:
code:
grub-mkdevicemap
i added (md0) entry manually:
code:
root@ubuntu:/# cat /boot/grub/device.map (md0)   /dev/md0 (hd0)   /dev/sda (hd1)   /dev/sdb (hd2)   /dev/sdc
create grub.cfg
code:
root@ubuntu:/# grub-mkconfig -o /boot/grub/grub.cfg generating grub.cfg ... found linux image: /boot/vmlinuz-2.6.32-35-generic found initrd image: /boot/initrd.img-2.6.32-35-generic found memtest86+ image: /boot/memtest86+.bin ls: cannot access /cdrom: no such file or directory ls: cannot access /cdrom: no such file or directory ls: cannot access /cdrom: no such file or directory ls: cannot access /cdrom: no such file or directory ls: cannot access /cdrom: no such file or directory ls: cannot access /cdrom: no such file or directory done
i added following top of /boot/grub/grub.cfg
code:
set pager=1 set debug=all insmod part_gpt insmod raid insmod mdraid insmod normal insmod configfile
install bios_grub partitions:
code:
root@ubuntu:/# grub-install --no-floppy --modules='biosdisk xfs raid mdraid' /dev/sda installation finished. no error reported. root@ubuntu:/# grub-install --no-floppy --modules='biosdisk xfs raid mdraid' /dev/sdb installation finished. no error reported.
exit chroot
code:
exit
umount , reboot:
code:
for in /sys /proc /dev/pts /dev; sudo umount /mnt$i; done ; umount /mnt; reboot
note:
loosely related voyage starting: http://ubuntuforums.org/showthread.php?p=11477254

would tell purpose of this? root partition? assume /dev/md0 data partition? , why swap partitions in raid1, too?


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] GRUB2 + GPT + mdadm/mdraid


Ubuntu

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support