PDA

View Full Version : [ubuntu] Software raid, grub loader fail.



derr12
February 8th, 2011, 11:43 PM
Hello, I am installing ubuntu server 10.04 with a non-standard partition setup. This is going to be a plesk webserver so i need software mirrors. On the suggestion of a linux geek i have setup my partions like so.

md0
200mb ext4 /boot

md1
LVM physical volume that spans the full size of the RAID 1 device (2tb)

and then i have several LVM groups for
/ ext4
/tmp ext4
/swap
/var ext4

when i get to the grub boot loader part of the install, it fails on the default master boot record location (obviously because of the non-standard setup)

So i tried using the location "/dev/md0" and that does not work either. it just craps out when it tries to install.

any suggestions for getting the boot loader to run on a sofware raid device?

derr12
February 9th, 2011, 12:23 AM
from what i read, I understand that the standard setup would have me have 2 identical boot loaders on the seperate drives on non-raded partitions.

Is there no way to have a mirrored boot partition?

My linux geek says he has this working in centOS.

derr12
February 10th, 2011, 06:32 PM
bump

derr12
February 10th, 2011, 11:50 PM
found another thread with the answer.

So it's passing the grub installer now. I needed to add a 1mb "reserved for boot bios" partition at the beginning of each drive.

I guess it would have done so if i didnt use the manual partitioner and let it setup itself.

so there is 2 1mb boot partions and 1 raid device with a 128mb /boot mounted partiton.

I guess thats what it takes to float ubuntu's boat.

gear-dog
February 23rd, 2011, 12:51 AM
I've tried getting it to work pushing a dozen times now. I should have made a spreadsheet for the combinations I've tried.


so .. You made a 128 MB raid array for /boot, and made two little 1MB boot partitions.

Did you mount the two itty bitty partitions or are they accessed by a lower layer without the need?
If you mounted them, where? /???
How were they configured?
Did you install grub on the small ones or the raid array? something like "/dev/sda1 /dev/sdb1" or "/dev/md0" ?
or did you use the default grub syntax "/dev/sda /dev/sdb"


It seems to me the /boot array is superfluous as ubuntu's default is just [/ & swap] partitions ...

If grub is on the two 1mb partitions, whats on /boot?




maybe post that link? =)

derr12
February 24th, 2011, 03:43 AM
This was all done in the Ubuntu 10.04 installation. In the partitioning stage.

I basically set up both disks as follows.

1mb beginning of drive, set to "reserved for boot bios"
128mb set to physical volume for Raid
2tb rest of drive, set to physical volume for Raid

I then created a raid 1 array "md0" with the two 128mb partitions.
I set the md0 device to use ext4 and set it to mount @ /boot.
Im not sure what the 1mb partition is for, but i think grub needs more than 1mb.

created "md1" out of the big 2tb partition.

created logical volume group on that partition and logical volumes;

/swap 16gb
/ 30gb
/tmp 1gb
/var = the rest.


The installer setup perfectly after that. and it would boot on either drive.

I was trying to simulate a raid failure tho and ended up deleting data off both disks.... stupid 5 bay rack had the cables crossed. thought sda was sdc. oops. have to re-do it tomorrow.

derr12
February 24th, 2011, 03:44 AM
Im not sure where i found that post, but i found it via Google... sorry i didn't bookmark it.

YesWeCan
February 24th, 2011, 04:32 AM
Curious. Grub can boot a RAID 1 directly. So during the Ubuntu install you just make the big RAID 1 and LVM partitions and that should be it.

towheedm
February 24th, 2011, 04:50 AM
Curious. Grub can boot a RAID 1 directly. So during the Ubuntu install you just make the big RAID 1 and LVM partitions and that should be it.

Not sure it's that simple though. I've been trying to do just that since Saturday. Lost my saved Karmic, trashed my Windows drive MBR, thanks to Maverick changing the bootloader device everytime to select a partition.

So now I've decided to stay with Maverick, booting of a single /boot partition in sdb1 with the rest of my drive set to raid 0. Once I set my two boot partitions on sdb1 and sdc1 to raid1, the boot fails to the grub rescue prompt saying cannot get CHS values.

There's a post around with a workaround for though. Will try it some other time, after I've gotten this frustration thing out of my head.

YesWeCan
February 24th, 2011, 05:11 AM
Not good.
I installed my RAID10 with a separate RAID1 for /boot, all using the alternate CD partitioner and it just worked.

I assume you did update-initramfs, update-grub and grub-install on both MBRs?
I dont know what that helpful grub error means.

towheedm
February 24th, 2011, 11:13 PM
Gues CHS is the Cylinder/Head/Sector geometry of the drive. I also installed from the alternate CD. I'll try setting sdb1 as a degraded RAID1, copy /boot to sdc1, do the update stuffs, add the missing drive and see what happens.

derr12
March 1st, 2011, 02:29 AM
Does anybody know what is actually in that 1mb "reserved for boot bios" partitions?

Ive been calling them my "secret sauce" boot partitions.

I know they are nessicary to boot from that drive, because when i broke my array, and rebuilt it on a new disk, it wouldnt boot from the new one without first doing: "cp /dev/sda1 /dev/sdb1"

Then it booted fine.