[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub2 /boot on lvm on ubuntu - incorrect magic number

From: Cameron Braid
Subject: grub2 /boot on lvm on ubuntu - incorrect magic number
Date: Sun, 5 Oct 2008 00:52:47 +1000

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/ 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 ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]