From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1R10jW-0005iP-DH for mharc-grub-devel@gnu.org; Tue, 06 Sep 2011 14:50:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R10jU-0005iJ-6s for grub-devel@gnu.org; Tue, 06 Sep 2011 14:50:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R10jO-0004z2-SQ for grub-devel@gnu.org; Tue, 06 Sep 2011 14:50:52 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:56794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R10jO-0004yu-Fz for grub-devel@gnu.org; Tue, 06 Sep 2011 14:50:46 -0400 Received: by bkbzt4 with SMTP id zt4so5987253bkb.0 for ; Tue, 06 Sep 2011 11:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=HaCgkrTcFb+rIyZeV0bGKb2CE4MbRMr17hbQYeHnqlg=; b=IHYT0vWC6w+3tlXvCRn/iJna0tL+CEsAgJ+wMgXqnGodpQAC7UgcWWvZga3nhjRP9Z n/d+jWobgjphw8zgSYdbfFNAngLz7K3kHDP992ohyUDz58jQXQLd1+mNodnEgKK89oAL YAyooFrwCg+ZGZL/i+a7JQHBrqxtebqYcay/8= Received: by 10.204.148.23 with SMTP id n23mr3161258bkv.323.1315335045523; Tue, 06 Sep 2011 11:50:45 -0700 (PDT) Received: from debian.x201.phnet (ip156.170.adsl.wplus.ru [195.131.170.156]) by mx.google.com with ESMTPS id z7sm1341943bkt.5.2011.09.06.11.50.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Sep 2011 11:50:42 -0700 (PDT) Message-ID: <4E666B7F.2000306@gmail.com> Date: Tue, 06 Sep 2011 22:50:39 +0400 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Iceowl/1.0b2 Icedove/3.1.12 MIME-Version: 1.0 To: pkg-grub-devel@lists.alioth.debian.org, stephane.chazelas@googlemail.com, 632048@bugs.debian.org, The development of GRUB 2 , Colin Watson Subject: Re: Bug#632048: segfault in grub-setup References: <20110906081857.GE3355@riva.dynamic.greenend.org.uk> <20110906145010.GA15096@yahoo.fr> In-Reply-To: <20110906145010.GA15096@yahoo.fr> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigBE26188808FA9D8EC0E01FF1" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 18:50:53 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBE26188808FA9D8EC0E01FF1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06.09.2011 18:50, Stephane Chazelas wrote: > 2011-09-06 09:18:57 +0100, Colin Watson: >> On Tue, Sep 06, 2011 at 08:39:24AM +0100, Stephane Chazelas wrote: >>> I do get a segfault as well when doing a grub-setup/grub-install >>> on a mdraid with 1.2 metadata. >>> >>> The segv is in: >>> >>> grub_util_biosdisk_is_floppy() because the disk->id for the root >>> device is not a bios disk id, but a big number that is the >>> "array id". The patch below seems to fix it for me, though I >>> can't tell it's the right fix or not (probably not). >> This fix makes sense to me; calling grub_util_biosdisk_is_floppy on >> disks that aren't GRUB_DISK_DEVICE_BIOSDISK_ID doesn't make sense. >> grub-devel, second opinion? >> >>> --- a/util/grub-setup.c 2011-09-05 12:11:31.864955442 +0100 >>> +++ b/util/grub-setup.c 2011-09-05 13:00:24.891368760 +0100 >>> @@ -315,7 +315,7 @@ >>> /* If DEST_DRIVE is a hard disk, enable the workaround, which is= >>> for buggy BIOSes which don't pass boot drive correctly. Inste= ad, >>> they pass 0x00 or 0x01 even when booted from 0x80. */ >>> - if (!allow_floppy && !grub_util_biosdisk_is_floppy (dest_dev->di= sk)) >>> + if (!allow_floppy && dest_dev->disk->dev->id =3D=3D GRUB_DISK_DE= VICE_BIOSDISK_ID && !grub_util_biosdisk_is_floppy (dest_dev->disk)) >>> /* Replace the jmp (2 bytes) with double nop's. */ >>> *boot_drive_check =3D 0x9090; >>> } > [...] > > Well, anyway, even after that patch, it still doesn't work > > grub-install /dev/md0 > reports success for nothing is written to any disk. > This command supposes that md0 is used as a disk for a VM > grub-install /dev/sda > or /dev/sdb > > doesn't work because it complains about a partition-less disk. > Because you can't use RAID on disks for booting (except some cases but it's not recommended even if they apply). Make a RAID of partitions and leave 1M before the start of the single partition on the disk. GRUB has done its job in telling that your setup is unbootable. > Looks like it's not supported. Strange, as when started, grub > can happily see files on 1.2 raids (using mdraid1x). Or did I > miss something. > > I'll have to revert to 0.9 metadata for now. > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigBE26188808FA9D8EC0E01FF1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5ma38ACgkQNak7dOguQglaaAD/XM3lsZPm28WCpjJsyaRnWzEt XGqJ3sXION7TDMuGVFsA/1dUBwpfgDZwaZ4mgK937mHMOcTT6aL9HcErKGMv6/jX =w7xD -----END PGP SIGNATURE----- --------------enigBE26188808FA9D8EC0E01FF1--