Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Trouble installing grub on RAID array

  1. #21
    Join Date
    Apr 2007
    Beans
    107

    Re: Trouble installing grub on RAID array

    Quote Originally Posted by psusi View Post
    Now you seem to have two different arrays, one of which is using format 1.2, which grub can not work with.
    I don't think that's been the case since grub-1.98+20100720-1 (link).

    I read some information here that got me thinking my new RAID member superblocks needed to be updated. So I did this:

    Code:
    sudo mdadm --stop /dev/md0
    sudo mdadm --assemble /dev/md0 --update=super-minor /dev/sda1 /dev/sdc1
    $ sudo mount /dev/md0 /mnt/raid
    $ sudo mount --bind /dev /mnt/raid/dev
    $ sudo mount --bind /dev/pts /mnt/raid/dev/pts
    $ sudo mount --bind /proc /mnt/raid/proc
    $ sudo mount --bind /sys /mnt/raid/sys
    $ sudo chroot /mnt/raid
    # mdadm --detail --scan
    ARRAY /dev/md0 level=raid5 num-devices=3 metadata=01.02 name=eve:0 UUID=98ab8ad1:23e4df2e:d8bb3605:b9be0e1f
    Yay! No more md/0!

    However, grub STILL thinks there's a /dev/md/0 somewhere.
    Code:
    # dpkg-reconfigure mdadm
    runlevel:/var/run/utmp: No such file or directory
     * Stopping MD monitoring service mdadm --monitor                               No /sbin/mdadm found running; none killed.
                                                                             [ OK ]
    Generating array device nodes... /var/lib/dpkg/info/mdadm.postinst: 170: /dev/MAKEDEV: not found
    failed.
     Removing any system startup links for /etc/init.d/mdadm-raid ...
    update-initramfs: Generating /boot/initrd.img-2.6.35-25-generic
    update-rc.d: warning: mdadm start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (S)
    update-rc.d: warning: mdadm stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 6)
    runlevel:/var/run/utmp: No such file or directory
     * Starting MD monitoring service mdadm --monitor                        [ OK ] 
    
    # update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-2.6.35-25-generic
    Found initrd image: /boot/initrd.img-2.6.35-25-generic
    Found linux image: /boot/vmlinuz-2.6.35-24-generic
    Found initrd image: /boot/initrd.img-2.6.35-24-generic
    Found linux image: /boot/vmlinuz-2.6.35-23-generic
    Found initrd image: /boot/initrd.img-2.6.35-23-generic
    Found linux image: /boot/vmlinuz-2.6.35-22-generic
    Found initrd image: /boot/initrd.img-2.6.35-22-generic
    Found linux image: /boot/vmlinuz-2.6.32-25-generic
    Found initrd image: /boot/initrd.img-2.6.32-25-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Microsoft Windows XP Home Edition on /dev/sdb1
    done
    
    # grep 'set root=' /boot/grub/grub.cfg 
    set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(md/0)'
    	set root='(hd1,msdos1)'
    Last edited by parsim; February 6th, 2011 at 12:58 AM. Reason: grub-1.98+20100720-1, not mdadm-1.98_20100720-1

  2. #22
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Trouble installing grub on RAID array

    Some progress of sorts! Well, you might do worse than to start from scratch and erase both drives completely so as to remove any raid ghosts. Like use disk utility to create new partition tables and a new ext4 partition on each.

    And, of course, disable any mobo RAID stuff in the bios.

    BTW, I have a RAID10 and I installed Ubuntu on it on an LVM partition. I created a SWAP partition in LVM. I reckoned in the unlikely event that a disk failed while the OS was using swap space it would ensure the system carried on without crashing. If the swap space is outside the RAID then I presume a sudden loss of swap data will cause the OS to have a crisis. I mention this in case you want to make a raid then LVM before you copy your OS over.

    Also, make sure there is no raid superblock stuff on any other disks.
    Last edited by YesWeCan; February 6th, 2011 at 01:32 AM.

  3. #23
    Join Date
    Apr 2007
    Beans
    107

    Re: Trouble installing grub on RAID array

    Yes, given I had it working earlier on a different array, I suspect I could fix this by wiping everything, zeroing superblocks, and starting again. But I don't really want to copy all that data again, and I feel like it should be fixable, dammit.

    I've even tracked down the line of code in grub that's causing me grief. I just don't understand it:

    http://bazaar.launchpad.net/~ubuntu-...sk/raid.c#L584

    I might file a bug against that and see where it gets me.

    Really appreciate the help, thank you both.

  4. #24
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: Trouble installing grub on RAID array

    It looks to me like it is using md/0 instead of md0 because it is 1.x format.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •