Ubuntu and DMRaid, not quite there yet

By Creepy on Monday 22 February 2010 21:43 - Comments (5)
Category: Linux, Views: 7.278

I've been running Ubuntu 9.04 for some time now and of course I've also been wanting to upgrade to 9.10. I've been holding the upgrade off until last Saturday. Why? Because my root drive didn't have enough free space to run the upgrade so I had to do a re-install.

I suspected I would run into some problems and so I did.


So what should you do when installing Ubuntu 9.10 when your partitions are on a DMRaid? I've heard the most common "solution" too much: Wipe the drives and use Linux Software raid. I simply cannot do that because my system also boots Windows from time to time for gaming.

The real solution is actually quite easy but has some gotchas:
  • Boot the Ubuntu Installer
Thats easy!
  • In the the first menu, choose to start the Live CD.
Do not choose for the option to go directy to the installer. We need a working network connection while installing. I'll explain why later.
  • After booting Ubuntu, make sure you have a working internet connection
  • Now click on the "Install Ubuntu" icon" and install as usual
Ubuntu 9.10 has grub2 as default bootloader. Normally not a problem but it cannot be used when booting Linux on a DMRaid drive. The old grub (0.9 aka grub legacy) is needed for that. But the old grub is NOT on the install CD. So the installer actually gets the old grub from the Ubuntu repository. Yes, thats right. Without a working internet connection the installer will complain that it could not install grub, but give you no clue why.
  • After the installation finishes: DONT REBOOT!
No, really, dont. The installer just has removed DMRaid from the newly installed system and from the initrd, the virtual root partition that gets mounted by the booting kernel first. With the scripts and hardware detected then, the system tries to mount the real root partition and continue booting. But it needs dmraid in the initrd to actually by able to find the real root partition at all!
  • Fire up a terminal and mount your new root partition and chroot into there

code:
1
2
3
mount /dev/mapper/xxxxxx_Volumex /target
chroot /target
mount /proc

  • Install DMRaid

code:
1
aptitude install dmraid


DMRaid wil now be installed and a new initrd will be generated with DMRaid.
  • Exit out of the chroot

code:
1
exit

  • And reboot into your newly installed Ubuntu

Comments


By Tweakers user Hadron, Monday 22 February 2010 22:21

Reading that makes me happy that my little server only runs debian, so linux-based software raid is possible. Initially, I tried DMRaid too, and ran into similar problems :S In the end, I had to switch the S-ATA controller, lost all the data and switched to linux-sw-raid. It works like a charm, but that's no option if you have to multi-boot windows.

It still makes me wonder, though... Isn't there any solution out there that'll let you run linux software raid on windows?

Edit: Without running windows in a VirtualBox/VMWare, that is. Useful though they are, gaming in a virtual machine isn't very nice.

Edit 2: Hmm. If both the Gentoo and Arch wiki's suggest to use hardware raid, I must have remembered wrong. Drat :/

[Comment edited on Monday 22 February 2010 22:58]


By Tweakers user Petervanakelyen, Monday 22 February 2010 23:00

This is a common problem. GRUB2 really sucks the hell out of it. I've downgraded to GRUB-legacy on every dual-boot system I came across. I hate GRUB2. Everytime you edit the main menu file (grub.cfg), it just gets overwritten after a kernel-update. All your nicely customized settings gone, back to the (faulty) auto-probe values.

By Tweakers user Jaap-Jan, Tuesday 23 February 2010 01:32

Hadron, the problem with software RAID is that you can't dual boot Linux and Windows, because Linux software RAID uses it's own disk layout which Windows doesn't onderstand.

So if you want to be able to boot both Windows and Linux, you need to use dmraid.

By Hadron, Tuesday 23 February 2010 09:54

I know it does, I just thought I'd seen a windows-driver for it somewhere.
Guess I was wrong :/

By Noobslab, Monday 15 August 2011 00:32

Really nice, Thanks for this.

Comments are closed