All of lore.kernel.org
 help / color / mirror / Atom feed
* grub2 /boot on lvm on ubuntu - incorrect magic number
@ 2008-10-04 14:52 Cameron Braid
  2008-10-04 15:52 ` Andy Goth
  2008-10-04 15:56 ` Andy Goth
  0 siblings, 2 replies; 6+ messages in thread
From: Cameron Braid @ 2008-10-04 14:52 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

I have the following setup

* ubuntu hardy on amd64
* grub2 from subversion trunk r1885
* root partition is a lvm device (/dev/mapper/Ubuntu-hardy64)
* /boot is a folder on the root filesystem
* /dev/sdd is one of the hard drives in the physical volume
* the /boot/grub/device.map contains an entry for all of my hard drives

when running grub-install I get the following error :

beast:grub2$ sudo grub-install /dev/sdd
error: Unknown metadata header
error: Unknown metadata header
grub-probe: error: no mapping exists for `Ubuntu-hardy64'
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

I found that grub-install exists after the "grub-probe" command is unable to
resolve a filesystem for this device.  So, I ran the same probe command with
the verbosity increased. see attached grub-probe.txt

This didn't really show up anything, so I modified lvm.c to tell me if it
was the version or the magic number that was wrong.  It was the magic
number.

I am not a C programmer, but fezie on #grub was able to help me print out
what my actual magic number is :

grub_util_info("magic =
%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX-%hhX",mdah->magic[0],mdah->magic[1],mdah->magic[2],mdah->magic[3],mdah->magic[4],mdah->magic[5],mdah->magic[6],mdah->magic[7],mdah->magic[8],mdah->magic[9],mdah->magic[10],mdah->magic[11],mdah->magic[12],mdah->magic[13],mdah->magic[14],mdah->magic[15]);

which produces : 61-20-7B-0A-69-64-20-3D-20-22-32-43-39-54-54-4C

which obviously doesn't match GRUB_LVM_FMTT_VERSION (in hex :
20-4C-56-4D-32-20-78-5B-35-41-25-72-30-4E-2A-3E - fezie ran the same code on
his debian amd64 box)

So, my magic number is wrong.

Is this an issue with ubuntu's LVM, or an issue with my LVM device ?

Is there a tool to fix this, or can grub2 work around it ?

Cheers,

Cameron

[-- Attachment #2: Type: text/html, Size: 2128 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-08 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-04 14:52 grub2 /boot on lvm on ubuntu - incorrect magic number Cameron Braid
2008-10-04 15:52 ` Andy Goth
2008-10-04 22:56   ` Cameron Braid
2008-10-04 15:56 ` Andy Goth
2008-10-04 22:59   ` Cameron Braid
2008-10-08 13:24     ` Cameron Braid

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.