Unable to install grub to MBR with LVM root device

Bug #340429 reported by Robert Sander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: grub-pc

The system (amd64, Ubuntu 8.04.2) has one hard disk with 3 primary partitons:

/dev/sda1 ext3 /boot
/dev/sda2 lvm
/dev/sda3 ntfs

The LVM has 3 volumes:

  root system -wi-ao 15.00G
  swap system -wi-ao 1.00G
  tmp system -wi-ao 2.00G

/dev/system/root ext3 /
/dev/system/tmp ext3 /tmp

grub legacy says:

root@quidde:~# grub-install '(hd0)'
/dev/mapper/system-root does not have any corresponding BIOS drive.

grub-pc says:

root@quidde:~# grub-install '(hd0)'
grub-setup: error: Can't embed the core image, but this is required when the root device is on a RAID array or LVM volume.

lilo was installed first from within the Ubuntu installer.

How do I install grub to the MBR?

The exact same disk layout works without any issue on i386 Ubuntu 8.04.2.
Is there any difference in the grub packages for amd64 and i386?

Revision history for this message
Felix Zielcke (fzielcke) wrote :

Do you use maybe GPT instead of msdos partition table?
or did you remove the dos compatibility flag with fdisk or the Maximize button in cfdisk?
fdisk -lu must show that the first partition begins at sector 63 and NOT sector 1
In case you use GPT you must create a bios_grub partition.
See the GRUB wiki: http://grub.enbug.org/BIOS_Boot_Partition

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Felix Zielcke (fzielcke) wrote :

Could you please provide the requested information? Thanks!

Revision history for this message
Felix Zielcke (fzielcke) wrote :

This is probable because you are using either GPT without a bios_grub partition or somehow the partitions were created with a start sector of 1 instead of the usual 63

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Natim (site-remy) wrote :

Here is the result of fdisk -lu

fdisk -lu

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xf4e553b1

   Device Boot Start End Blocks Id System
/dev/sda1 1 192779 96389+ fd Linux raid autodetect
/dev/sda2 192780 1237004 522112+ 83 Linux
/dev/sda3 1237005 22201829 10482412+ fd Linux raid autodetect
/dev/sda4 22201830 976735934 477267052+ 5 Extended
/dev/sda5 22201831 32435234 5116702 fd Linux raid autodetect
/dev/sda6 32435236 976735934 472150349+ fd Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x44ae422c

   Device Boot Start End Blocks Id System
/dev/sdb1 1 192779 96389+ fd Linux raid autodetect
/dev/sdb2 192780 1237004 522112+ 83 Linux
/dev/sdb3 1237005 22201829 10482412+ fd Linux raid autodetect
/dev/sdb4 22201830 976735934 477267052+ 5 Extended
/dev/sdb5 22201831 32435234 5116702 fd Linux raid autodetect
/dev/sdb6 32435236 976735934 472150349+ fd Linux raid autodetect

Disk /dev/md0: 98 MB, 98631680 bytes
2 heads, 4 sectors/track, 24080 cylinders, total 192640 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 10.7 GB, 10733879296 bytes
2 heads, 4 sectors/track, 2620576 cylinders, total 20964608 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 5239 MB, 5239406592 bytes
2 heads, 4 sectors/track, 1279152 cylinders, total 10233216 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md3: 483.5 GB, 483481878528 bytes
2 heads, 4 sectors/track, 118037568 cylinders, total 944300544 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Disk /dev/md3 doesn't contain a valid partition table

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.