Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed Ubuntu 12.04.1 in a new server and set up the 4 hard drives with 3 RAID 1 devices, the configuration is such that the first two drives have md0 (swap space) and md1 (/) with the third and fourth drives having md2 (/var).

I've been testing the operation under a drive failure and found that the system boots fine if I remove disk two but if I remove disk one then the system gets to grub and then just restarts. I'm confused as to why grub appears to be loading properly from disk two but then the boot fails.

I've tried to copy the MBR from disk 1 to 2:

dd if=/dev/sda of=/dev/sdb bs=512 count=1

but this didn't make a difference.

Any ideas how to get it to boot from just the second disk?

fdisk -l

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ccfa5

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    31250431    15624192   fd  Linux RAID autodetect
/dev/sda2   *    31250432  3907028991  1937889280   fd  Linux RAID autodetect

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ccfa5

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    31250431    15624192   fd  Linux RAID autodetect
/dev/sdb2   *    31250432  3907028991  1937889280   fd  Linux RAID autodetect

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00035b05

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048  3907028991  1953513472   fd  Linux RAID autodetect

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c73aa

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907028991  1953513472   fd  Linux RAID autodetect

Disk /dev/md1: 1984.3 GB, 1984264208384 bytes
2 heads, 4 sectors/track, 484439504 cylinders, total 3875516032 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/md2: 2000.3 GB, 2000263380992 bytes
2 heads, 4 sectors/track, 488345552 cylinders, total 3906764416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/md0: 16.0 GB, 15990652928 bytes
2 heads, 4 sectors/track, 3903968 cylinders, total 31231744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
share|improve this question
    
Can we please get the output of fdisk -l. Also...why is your SWAP a Raid1? –  Bobby Aug 31 '12 at 12:51
    
I realise setting up a raid with swap is not needed, could it actually cause any problems? I've added the output above. –  beacon_bonanza Aug 31 '12 at 13:11
    
What actually happens when you say the "boot fails?" –  Garrett Aug 31 '12 at 15:34
    
To clarify, it get's to the grub menu then restarts. –  beacon_bonanza Sep 3 '12 at 10:21

1 Answer 1

This a long standing grub bug, you can fix it by :

/etc/defalt/grub:

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console

PS: Swapfiles on raid is good if you want not just speed, but also reliable redundancy (unfortunately Ubuntu's raid implementation isn't as reliable as it could be).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.