Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Km9Bv-0004it-45 for mharc-grub-devel@gnu.org; Sat, 04 Oct 2008 11:37:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Km9Bt-0004iC-KN for grub-devel@gnu.org; Sat, 04 Oct 2008 11:37:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Km9Br-0004gs-T4 for grub-devel@gnu.org; Sat, 04 Oct 2008 11:37:08 -0400 Received: from [199.232.76.173] (port=39025 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Km9Br-0004gn-ON for grub-devel@gnu.org; Sat, 04 Oct 2008 11:37:07 -0400 Received: from fk-out-0910.google.com ([209.85.128.184]:24377) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Km8V0-0007gj-Jr for grub-devel@gnu.org; Sat, 04 Oct 2008 10:52:51 -0400 Received: by fk-out-0910.google.com with SMTP id 18so1520465fkq.10 for ; Sat, 04 Oct 2008 07:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=XrPacpfZ8bKGHmGSWJqXZmuYqihPBN6McQOLvtCh1js=; b=ZYNEV/rPVY/o4hrGoagGOTjCnH/Ks7OSM0YbxEPQxjOMe3/wTf5IqKNrg7n7Ckb6U2 cQcR2gnZjpBBWJQY2MQn3KfuHUXDVgx3Td3SloVYNaPJRRkX8eT6XoqiY7k1uPMXdbvg 77+CtL9ikflhLFqFh8V6VVfpUnE5w/Eo1YXSU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=PvN5sZ3KrqEPsvaD2/75wfcUpq4qSKH74I9/xWtAq6q441672fjiIcijUqT7y8zcOU yevd+Yx7hZ0jUnRxaeq0IXH3akONYtMKQfz24j6EkU28EZaRXdbeJRWlK3LTvWKxx3Uu z69HDtedatIBieDmhE6QgoscaUznNYhEkMqac= Received: by 10.180.239.7 with SMTP id m7mr1800303bkh.87.1223131967518; Sat, 04 Oct 2008 07:52:47 -0700 (PDT) Received: by 10.181.15.13 with HTTP; Sat, 4 Oct 2008 07:52:47 -0700 (PDT) Message-ID: Date: Sun, 5 Oct 2008 00:52:47 +1000 From: "Cameron Braid" Sender: cbraid@gmail.com To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_33371_17062011.1223131967504" X-Google-Sender-Auth: 341cb79c2b93dbb3 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: grub2 /boot on lvm on ubuntu - incorrect magic number X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 15:37:10 -0000 ------=_Part_33371_17062011.1223131967504 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_33371_17062011.1223131967504 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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
------=_Part_33371_17062011.1223131967504--