Skip to contentSkip to conversation

partition based raid1 and multi boot Ubuntu/Xubuntu

DISCUSSION Gavin Whitehead 3 participants 5 messages Nov 22, 2011 – Nov 24, 2011 MD RAID

lore
Share & tools
lore
#0 lore raw

I'm not sure if this is a GRUB2 problem or a RAID/MD issue but here goes...

I want to set up a machine that will boot two Linux installations using raid 1 partitions and Windows XP on a single partition.

I have two identical disks partitioned as follows

$ cat /proc/partitions
major minor  #blocks  name
   8        0  244198584 sda
   8        1   30720000 sda1
   8        2   30720000 sda2
   8        3   40960000 sda3
   8        4          1 sda4
   8        5    4194304 sda5
   8        6  137601024 sda6
   8       16  244198584 sdb
   8       17   30720000 sdb1
   8       18   30720000 sdb2
   8       19   40960000 sdb3
   8       20          1 sdb4
   8       21    4194304 sdb5
   8       22  137601024 sdb6

I installed WinXP first in sda3.

I then installed Ubuntu 11.04 from the Alternate CD and created some raid1 devices

    md0        sda1 sdb1    /
    md1        sda5 sdb5    swap
    md2        sda6 sdb6    /home

I set the boot flag on sda1 and sdb1.
This worked a treat. I could boot in to either Ubuntu 11.04 to WinXP. I tested the RAID1 (power down, unplug a disk, power up, power down, replug the disk, power up, use 'mdadm --add' to rebuild the array). Brilliant.

Then I installed Xubuntu 11.10 from the Alternate CD. For this install I created one new raid1 device (md3) and reused md1 and md2

    md3        sda2 sdb2    /
    md1        sda5 sdb5    swap
    md2        sda6 sdb6    /home

I set the boot flag on sda2 and sdb2.

After the install had completed and grub2 had built the grub.cfg I only had my new Xubuntu 11.10 in the boot menu. The Xubuntu 11.10 install works perfectly (and I can boot in to Win XP) but I can't boot in to the Ubuntu 11.04 installation. I've re-run 'update-grub' but it doesn't find the other installation.

If I run 'sudo mount /dev/md0 /mnt' I can access the Ubuntu 11.04 files.

Is my intended configuration (tri-boot with two raid1, partition based, Linux installations and XP on a single parition) unachievable?

Gav

#1 lore raw
Quoted 53 lines · On Tue, 22 Nov 2011 22:23:00 +0000 Gavin Whitehead…

I'm not sure if this is a GRUB2 problem or a RAID/MD issue but here goes...

I want to set up a machine that will boot two Linux installations using raid 1 partitions and Windows XP on a single partition.

I have two identical disks partitioned as follows

$ cat /proc/partitions
major minor  #blocks  name
    8        0  244198584 sda
    8        1   30720000 sda1
    8        2   30720000 sda2
    8        3   40960000 sda3
    8        4          1 sda4
    8        5    4194304 sda5
    8        6  137601024 sda6
    8       16  244198584 sdb
    8       17   30720000 sdb1
    8       18   30720000 sdb2
    8       19   40960000 sdb3
    8       20          1 sdb4
    8       21    4194304 sdb5
    8       22  137601024 sdb6

I installed WinXP first in sda3.

I then installed Ubuntu 11.04 from the Alternate CD and created some raid1 devices

     md0        sda1 sdb1    /
     md1        sda5 sdb5    swap
     md2        sda6 sdb6    /home

I set the boot flag on sda1 and sdb1.
This worked a treat. I could boot in to either Ubuntu 11.04 to WinXP. I tested the RAID1 (power down, unplug a disk, power up, power down, replug the disk, power up, use 'mdadm --add' to rebuild the array). Brilliant.

Then I installed Xubuntu 11.10 from the Alternate CD. For this install I created one new raid1 device (md3) and reused md1 and md2

     md3        sda2 sdb2    /
     md1        sda5 sdb5    swap
     md2        sda6 sdb6    /home

I set the boot flag on sda2 and sdb2.

After the install had completed and grub2 had built the grub.cfg I only had my new Xubuntu 11.10 in the boot menu. The Xubuntu 11.10 install works perfectly (and I can boot in to Win XP) but I can't boot in to the Ubuntu 11.04 installation. I've re-run 'update-grub' but it doesn't find the other installation.

Quoted 5 lines

If I run 'sudo mount /dev/md0 /mnt' I can access the Ubuntu 11.04 files.

Is my intended configuration (tri-boot with two raid1, partition based, Linux installations and XP on a single parition) unachievable?

I would just dive into grub.cfg with an editor and make it work.

These wonderful "automatically make a config file for you tools" certainly have a place, but there is a reason that config files are plain text files and that reason is emacs (or possible vim).

NeilBrown

#2 lore raw
Quoted 61 lines · NeilBrown
Quoted 53 lines · On Tue, 22 Nov 2011 22:23:00 +0000 Gavin Whitehead…

I'm not sure if this is a GRUB2 problem or a RAID/MD issue but here goes...

I want to set up a machine that will boot two Linux installations using raid 1 partitions and Windows XP on a single partition.

I have two identical disks partitioned as follows

$ cat /proc/partitions
major minor  #blocks  name
     8        0  244198584 sda
     8        1   30720000 sda1
     8        2   30720000 sda2
     8        3   40960000 sda3
     8        4          1 sda4
     8        5    4194304 sda5
     8        6  137601024 sda6
     8       16  244198584 sdb
     8       17   30720000 sdb1
     8       18   30720000 sdb2
     8       19   40960000 sdb3
     8       20          1 sdb4
     8       21    4194304 sdb5
     8       22  137601024 sdb6

I installed WinXP first in sda3.

I then installed Ubuntu 11.04 from the Alternate CD and created some raid1 devices

      md0        sda1 sdb1    /
      md1        sda5 sdb5    swap
      md2        sda6 sdb6    /home

I set the boot flag on sda1 and sdb1.
This worked a treat. I could boot in to either Ubuntu 11.04 to WinXP. I tested the RAID1 (power down, unplug a disk, power up, power down, replug the disk, power up, use 'mdadm --add' to rebuild the array). Brilliant.

Then I installed Xubuntu 11.10 from the Alternate CD. For this install I created one new raid1 device (md3) and reused md1 and md2

      md3        sda2 sdb2    /
      md1        sda5 sdb5    swap
      md2        sda6 sdb6    /home

I set the boot flag on sda2 and sdb2.

After the install had completed and grub2 had built the grub.cfg I only had my new Xubuntu 11.10 in the boot menu. The Xubuntu 11.10 install works perfectly (and I can boot in to Win XP) but I can't boot in to the Ubuntu 11.04 installation. I've re-run 'update-grub' but it doesn't find the other installation.

Quoted 5 lines

If I run 'sudo mount /dev/md0 /mnt' I can access the Ubuntu 11.04 files.

Is my intended configuration (tri-boot with two raid1, partition based, Linux installations and XP on a single parition) unachievable?

Quoted 7 lines

I would just dive into grub.cfg with an editor and make it work.

These wonderful "automatically make a config file for you tools" certainly have a place, but there is a reason that config files are plain text files and that reason is emacs (or possible vim).

NeilBrown

Doh. Obvious really, but thanks for suggesting it. I have tried it and it works.

Now back to DR testing...

Thanks,

Gav

#3 lore raw
In reply to Gavin Whitehead
Quoted 4 lines · Gavin Whitehead

I then installed Ubuntu 11.04 from the Alternate CD and created some raid1 devices

   md0        sda1 sdb1    /
   md1        sda5 sdb5    swap
   md2        sda6 sdb6    /home

Can't help you with the GRUB issue as I use LILO, however... Something that someone on this list suggested to me many year back has stuck with me and proven to be useful and that's to try to number the md devices the same as the sd (or hd in those days!) devices, so:

md1 : active raid1 sdb1[1] sda1[0] md2 : active raid10 sdb2[1] sda2[0] md3 : active raid10 sdb3[1] sda3[0] md5 : active raid10 sdb5[1] sda5[0]

etc.

Is it still a good idea? I think so - anything that helps to reduce the possibility of mistakes is good in my books...

Gordon

#4 lore raw
Quoted 14 lines · Gordon Henderson
Quoted 4 lines · Gavin Whitehead

I then installed Ubuntu 11.04 from the Alternate CD and created some raid1 devices

   md0        sda1 sdb1    /
   md1        sda5 sdb5    swap
   md2        sda6 sdb6    /home

Can't help you with the GRUB issue as I use LILO, however... Something that someone on this list suggested to me many year back has stuck with me and proven to be useful and that's to try to number the md devices the same as the sd (or hd in those days!) devices, so:

md1 : active raid1 sdb1[1] sda1[0]
md2 : active raid10 sdb2[1] sda2[0]
md3 : active raid10 sdb3[1] sda3[0]
md5 : active raid10 sdb5[1] sda5[0]

Quoted 9 lines

etc.

Is it still a good idea? I think so - anything that helps to reduce the possibility of mistakes is good in my books...

Gordon

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Gordon,

Thanks for the suggestion. I will bear it in mind next time I am building the raid devices (which I have a feeling will be soon).

Gav