PDA

View Full Version : [SOLVED] 11.10 install fails on Intel fakeraid RAID1



heltoupee
April 16th, 2012, 04:47 AM
Been trying to get Ubuntu 11.10 installed to my new machine all weekend. In the end, I'd like to dual-boot Windows 7 and Ubuntu. Installing to (and booting from) a SATA RAID (Intel ICH10R Chipset on an Intel-branded board, so there shouldn't be any 3rd-party-didn't-implement-this-one-thing-right stuff). RAID1. Can't get it to work.

FakeRAID howto (https://help.ubuntu.com/community/FakeRaidHowto) suggests that everything should work fine after 10.04. I went through the desktop installer, and Grub2 wouldn't install to the /dev/mapper/isw_xxxx_Volume0 device, or anything else, for that matter. Tried following the FakeRAID howto for 9.10 (the last release it thinks didn't work right out of the box), and I can't make gparted make an extended partition on the blank disk - it's greyed out.

Next, some posts on these forums say that I need to use the alternate CD - that there will be an option to configure RAID - I do that, and everything just works. Fine, I get to that point, looks like everything is fine, but when it comes time to choose a partition to install to, no disks are detected. Fail again.

Here's how far I can get:

Using LiveCD - 'dmraid -r' shows the array is there and OK. Unless I have run the installer, none of the device nodes in /dev/mapper show up for the partitions on the RAID volume, just the one for the volume itself. I can make them appear by apt-get'ting kpartx, and using it to make the device nodes. I can even mount them at this point and read/write/chroot/whatever. If I have run the installer, the partition device nodes are there, and the one I've installed to is mounted in /target. Still doesn't help because Grub2 refuses to install to that array. I've even partitioned the volume with gparted before running the installer, then installing to the existing partition. Grub doesn't complain, and the install looks successful at this point, but when rebooting, all I see is a blinking cursor. No grub prompt, no failback to busybox, just the cursor.

Using the alternate CD - I get as far through the installer as I've said above. I can Alt-F2 over to a busybox shell, and play with dmraid, and mdadm (some forum post claimed that dmraid is not being developed anymore, and Intel is going with mdadm now.) Both applications can see the array as being OK, and output from both 'dmraid -r' and 'mdadm --detail' is correct. Neither of them will make the partition device nodes show up, much less get them to a point I can mount them - and that's saying nothing about grub.

Has anyone managed to get this working? Is there a guide out there for this version (11.10)?

Thanks!

darkod
April 16th, 2012, 08:45 AM
Did the alternate installer asked you whether you want to activate the raid? I haven't used fakeraid, but from what I know the installer should ask you to activate the raid. If it doesn't, or you don't do that, the reason might be that it's not finding the array correctly because it never activated it.

Sorry, can't be of much help.

And as far as I know, mdadm is still only for software raid, you should stick with dmraid. And I would use the Alternate CD, not the standard live cd, regardless the claims it should work after 10.04. I think installing grub2 with the standard installer is always a challenge for it.

Try another version of the alternate cd also, I know you want the latest, but 11.10 might have issues with it. For curiosity, try 10.04 LTS, the LTS releases should have best compatibility. The next LTS is out in 2 weeks.

heltoupee
April 16th, 2012, 05:43 PM
Thanks for the reply. Yes, the alt installer did ask to mount the sata raid, and I said yes. I think the problem is that it's finding the raid container, but none of the volumes inside. Could this be because it's trying to use gpt?

At any rate, win 7 is going on next. Gotta get something up and running. Will try 12.04 when it releases. Fwiw, both mdadm and dmraid would see the container and read the metadata, but I could only get the partitions to mount by running kpartx first with dmraid. Kpartx isn't on either the standard or alt install, so not sure where I went wrong.

Thanks, any other ideas, anyone.

Quackers
April 16th, 2012, 05:48 PM
I've installed to an Intel Raid setup from the desktop live cd by installing kpartx first.

heltoupee
April 16th, 2012, 05:58 PM
@Quackers - fantastic. Any real bumps in the road? Or is it just:

1.) Boot LiveCD
2.) open terminal, 'sudo apt-get install kpartx'.
3.) click the 'install' link on the desktop.
4.) install as normal, choosing the proper place to put Grub2 at the end (cause it defaults to /dev/sda, which absolutely isn't correct)

Do I need to chroot into the newly-installed system, and install kpartx there, too?

Any configuration that needs to happen before reboot?

Thanks!

Quackers
April 16th, 2012, 06:08 PM
It seems to vary with Ubuntu versions.
On one I needed to chroot in to the new installation and install kpartx there. On the other I didn't.

heltoupee
April 16th, 2012, 06:39 PM
OK, so nothing specifically for 11.10. I guess it's worth a shot. Here's what I'm going to try tonight, and will report back with results:

1.) Break up the array in BIOS.
2.) Remove all partitions from the drives, and, in general, start from scratch.
3.) Remove access to all other drives on the controller (there's a drive from my old 10.04 install with Grub, etc. that I want to migrate data from when done. I can put it back later, or connect it externally, or whatever once this is working.)
4.) Create new RAID1 array in BIOS.
5.) Boot from 11.10 LiveCD. Choose "try ubuntu"
6.) Bring up terminal. 'sudo apt-get install kpartx'.
7.) Start installer from desktop.
8.) Install normally. Partition RAID device, leaving 200GB free space for Windows 7 install.
9.) When GRUB asks where to install, choose /dev/mapper/isw_xxxxxxxx_[name of volume] as the location. ***Expect error here.***
10.) open terminal, chroot into where the new install is mapped. I expect this to be /target
11.) 'sudo apt-get install kpartx'.
12.) exit the chroot. reboot the system. Hope for the best.

If this works, then awesome. I'll link to it from wherever I can, because documentation on this is scarce - I've been searching. If not, well, wait for 12.04 and see if it fairs any better. Install Win 7 in the meantime.

Thanks, guys. If anyone else has experience in this, and would like to weigh in, I'd appreciate it.

Quackers
April 16th, 2012, 06:43 PM
Does the system currently run Windows in RAID1?
No need to start again if that's the case. Just make sure to not exceed the 4 primary partition limit and carry on.
You may need to create the Ubuntu partition(s) beforehand, as the installer can sometimes refuse to do it - even with kpartx installed.

darkod
April 16th, 2012, 07:25 PM
If it gives you an error about the grub2 install, there will be nothing to boot ubuntu after the restart. So in that case, if you are chroot-ing to add kpartx, also install grub-pc which is the grub2 package. Not sure if you need to create the config manually but it doesn't hurt doing it just in case.

So, if you are already in with chroot, it would be like:

apt-get install grub-pc
grub-mkconfig
update-grub
grub-install /dev/mapper/XXXXXX

NOTE: Once inside chroot you don't use sudo, by definition you are inside your installation as root with max permissions.

Quackers
April 16th, 2012, 07:52 PM
grub-pc was already installed in my attempts. It just seems to be the MBR code that's missing.

heltoupee
April 16th, 2012, 09:49 PM
Thanks again for all the help.

The system doesn't run Windows in RAID1 at the moment. They were completely blank disks before I'd started the 11.10 install.

I'll take your comments into account, darkod, and if there's problems with grub2 from the installer, I'll try your steps. I'd never worked in a chroot before, so that's good to know about the access level and permissions. If nothing else, if after the reboot it's a no-go with just the flashing cursor, I can get back into the LiveCD, install kpartx, mount the new install, chroot, and give installing grub there a shot, following your instructions, right?

Like I said, I'll give all this a shot tonight and post results.

thanks again, guys!

darkod
April 16th, 2012, 10:03 PM
Yes, you can chroot into it when ever you want.

If grub-pc is installed as Quackers said and only the MBR part is missing, you can do just the last command, that is the one installing the MBR part. Just make sure you select the whole raid device, not a specific partition on it:
grub-install /dev/mapper/XXXXXX

Note that that works only from chroot. If you ever need to do that from live mode (without chroot-ing), it's little bit different commands.

heltoupee
April 17th, 2012, 02:01 AM
OK, here we go. Disks are blank. newly created RAID1. kpartx installed. playing with dmraid:

root@ubuntu:/home/ubuntu# ls /dev/mapper/
control isw_djgfiehdi_RAID1
root@ubuntu:/home/ubuntu# dmraid -ay
RAID set "isw_djgfiehdi_RAID1" already active
root@ubuntu:/home/ubuntu# dmraid -r
/dev/sdb: isw, "isw_djgfiehdi", GROUP, ok, 3907029166 sectors, data@ 0
/dev/sda: isw, "isw_djgfiehdi", GROUP, ok, 3907029166 sectors, data@ 0
root@ubuntu:/home/ubuntu#

looking good so far. Starting install.

So I'm partitioning myself. It sees the RAID device just fine. I've created a 1800gB ext4 partition mounted at / (for simplicity sake), an 8GB swap partition (I have 8GB of RAM), and left 192GB free. Device for boot loader installation is /dev/mapper/isw_XXXXX. Here we go.

Now I'm being asked a question I've never seen before. My RAID contains GPT signatures, but doesn't have a valid fake msdos partition table. Is it GPT. I'm gonna say 'Yes'. Well, neither of the buttons do anything. Time to reboot and maybe try making the partitions first with gparted...

heltoupee
April 17th, 2012, 03:11 AM
aaaaand we're back! dmraid's still happy as a pig in s***. kpartx is a bit angry:

root@ubuntu:/home/ubuntu# kpartx -a -g /dev/mapper/isw_djgfiehdi_RAID1
Warning: Disk has a valid GPT signature but invalid PMBR.
Use GNU Parted to correct disk.
gpt option taken, disk treated as GPT.
Alternate GPT is invalid, using primary GPT.

I'll take it's advice and fire up gparted (I know, technically, it's saying use 'parted', but gparted does that for me). gparted shows a warning:

/dev/mapper/isw_XXXX contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?

Invalid arguement during seek for read
on /dev/mapper/isw_XXXX

Hmmm... kpartx was fairly confident parted could fix this. Let's give it a shot. Ooh, I get to choose what type to create. default is msdos. defaults are usually good. I choose msdos. No more warnings, yippee! Partitioning time! Same as before, although the ntfs-3g plugin is loaded, so I'll go ahead and make that one, too. Operations successful. new partitions show in /dev/mappper. let's install.

Install sees my new partitions. I tell it where to mount stuff, and make sure it's going to try to install the bootloader to the RAID array. It's now happily copying files. And completed without error. Had to remount the partition I installed to, chrooted in, and there was nothing in the /dev/mapper directory anymore. dmraid couldn't find anything, either. I installed kpartx, and am now rebooting. Wish me luck!

heltoupee
April 17th, 2012, 04:28 AM
Rebooted, Grub menu came up. Chose the new install, waited for what seemed like an eternity, and it booted into the desktop! mucked around for a bit, and it seems like all my partitions are seen. the swap partition I set up is there and found. I didn't get too far into it (wife not happy about how much time I'm spending on this...) but it looks good. So, for any adventurers that have found themselves down this path, here's the "works for me" step-by-step

1.) start with a newly created, blank array.
2.) Boot the 11.10 live CD (I used 32-bit). You want to go to the desktop, not immediately install. I think this is labelled "try ubuntu"
3.) once at the desktop, open a terminal, and execute 'sudo apt-get install kpartx'
4.) Now we're going to partition the RAID. The installer doesn't do it right, so fire up gparted.
5.) once in gparted, choose your RAID device (should be /dev/mapper/isw_XXXX if you're using an Intel chipset - the first letters before the '_' change for different vendors). it should show as blank.
6.) Choose Device->Create Partition Table. leave the type as 'msdos'.
7.) partition the device like you normally would. I made a single ext4 partition, and a swap partition.
8.) apply changes.
9.) Start the installer by running the 'Install This' icon on the desktop. Get to the point that it needs to pick a disk to install on.
10.) installer should see all the partitions you just made. you'll need to choose mount points for the partition(s) you are installing on. I chose my one ext4 partition, and clicked the 'Change...' button. set the mount point to '/', set the 'use as' to ext4, and checked the 'Format' checkbox.
11.) THIS IS IMPORTANT - in the dropdown at the bottom, you need to select your RAID device as the place to install the bootloader. it's the one that looks like /dev/mapper/isw_XXXXX... (again, if Intel chipset).
12.) continue the install. the install should finish. don't reboot, instead, click 'continue testing'.
13.) If the newly installed system is no longer mounted, (in my case, it was not mounted after the installer finished), you'll need to mount it:
13a.) Go back to the terminal. in /dev/mapper/ there should be a 'control' entry, the main RAID device (which is named isw_[some letters]_[name you gave the array in BIOS] for Intel chipset), along with entries with 'p1', 'p2', etc appended to the name of the RAID device for each partition you made -- those are the devices that correspond to the filesystems on those partitions, and the things you need to mount. You can look in gparted again to see exactly which entry corresponds to what.
13b.) In my case, the ext4 partition I installed to was the first partition on the array, so I executed 'sudo mount /dev/mapper/isw_[some letters]_[name of array in BIOS]p1 /mnt' to mount the newly-installed system to /mnt.
14.) chroot into the newly installed and mounted system. If it's mounted in /mnt, like it would be if you followed the little detour in step 13a and 13b, from the terminal again, execute 'chroot /mnt'
15.) after chrooting in, execute 'apt-get install kpartx'. it will complain about not being able to log changes - that's OK, the install works.
16.) exit out of the terminal and reboot. You should see a grub menu come up, once you choose the entry on that menu to boot it will boot off the RAID array onto the desktop (the time between choosing the menu entry and getting to the desktop seems like it takes forever).

Thanks to Quackers and darkod for the help and support! Hopefully this will help others in the future!

Quackers
April 17th, 2012, 01:27 PM
Very Nice :-)
That's pretty much as I remember it. Nice write up :-)

Your GPT errors could probably have been removed with Fixparts, but if things are happy I may be inclined to leave it now. Your new msdos partition table may have fixed it.

Happy Ubuntuing :-)

darkod
April 17th, 2012, 02:07 PM
Yeah, it seems you had MBR vs GPT conflict on one of the disks (or both) and that might have been the reason behind all these issues.

From what I have seen here, it seems that if you convert gpt disk to msdos using windows, it deletes only the main table, but leaves the backup table that gpt has. Windows is happy with that, but ubuntu detects the backup table and is not sure what do you actually want to use, because the purpose of the backup table is precisely to recover it if the main table is different (and it is since windows wrote msdos table).

Fixparts can sort these issues out.

heltoupee
April 17th, 2012, 03:28 PM
Cool, thanks. I'm gonna go try to break it again tonight. Want to get the dual-boot set up, and would like to use a 64-bit OS to make use of all the RAM I have. It seems 11.10 32bit _might_ come with PAE enabled (finding conflicting docs), but I'll probably want 64bit anyway. Plan is to not repartition anything. Install windows - which will probably break grub. Then install Ubuntu 11.10 x64, which will fix grub and detect Windows, and boot both. Hopefully.

darkod
April 17th, 2012, 03:41 PM
To be sure what I have running, I would use parted print which also prints the partition table type. Only I am not sure if it picks up a fakeraid array. You can try though.

Boot into live mode, enable the array as you have done before, and try:
sudo parted /dev/sda unit s print all

That should print all disks as far as I know, hopefully the array too.

The reason is, if running gpt you need to create a small bios_grub partition because with gpt grub2 doesn't fit on the MBR like with msdos table. So it needs a small 1MB partition WITH NO filesystem, and with the bios_grub flag on.

Additionally, windows seems to work on gpt only with EFI boot, not standard BIOS boot.

So you might wanna make sure you have only GPT tables on both disks, and the array.

heltoupee
April 18th, 2012, 02:09 AM
parted says I have msdos partition table - as it should, that's what I told gparted to create in the beginning. Windows 7 installed fine, as I'd expected, but then made a mess of things, as I also expected, and the system wouldn't boot. Now, I'm back in Ubuntu LiveCD (11.10 x64 this time) running the installer again. Here's my thinking - when I got it to work the first time, Grub found my old XP install on that other drive that I said I was going to disconnect, but was too lazy to. I'm hoping the same holds true here - it's going to find the Windows 7 install, and overwrite Windows' failed attempt at making a working MBR, and everything will just work out.

Or, since I don't remember having to load RAID drivers during the Win7 install, maybe I've really put my foot in it, and I'll be doing this all again. Who knows? But it will be interesting to find out. :)

Renato196
April 18th, 2012, 04:09 AM
hello friends! İ have installed ubuntu 11.10 oneiric oncelot, from a cd burned on my PC, unfortunately İ can't connect internet. İ tried tu install some programs from my usb, but failed to install them. Exist a way to install from my USB offline in my PC ? Thank you

heltoupee
April 18th, 2012, 04:11 AM
Everything went smashingly, except for the Windows actually booting part. It wouldn't boot after the first install, either, so I'll bet it's because I forgot to hit F6 and install the right driver. Wonder why found the right partitions and let me install anyway... Maybe it was just talking to the disk, not the RAID?

checked BIOS, and it's set to legacy boot, and my disks aren't technically bigger than 2TB, so I'm not even going to try to mess with EFI and GPT. Too much trouble.

Anyway, one more shot at Windows, it looks like...