From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RteyR-0001Dj-8I for mharc-grub-devel@gnu.org; Sat, 04 Feb 2012 07:44:11 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RteyN-0000zg-G2 for grub-devel@gnu.org; Sat, 04 Feb 2012 07:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RteyM-00015v-2V for grub-devel@gnu.org; Sat, 04 Feb 2012 07:44:07 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:36717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RteyL-00014S-UE for grub-devel@gnu.org; Sat, 04 Feb 2012 07:44:06 -0500 Received: by wgbdt13 with SMTP id dt13so3704470wgb.30 for ; Sat, 04 Feb 2012 04:44:04 -0800 (PST) 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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=cViTj3yIyHebkw1eVHuDijtRYpqLBs63/aAETNufwC8=; b=p0SazNQZR6KfOEjQiIizLUIEbzFv9o3qh+N9ZSxY3UcDBFiN/NKHWtXUwwGUG8E8dF RaVkiS4NnFdgD6NEb2ObFwNIStiTbJprcCuWFzMT55kqLVhWL4ebkHROAmxurKN7a7kE UsMuHGYp3QyCy3vSv086Z7j7ZYxQ1SwjQFjcA= Received: by 10.180.103.132 with SMTP id fw4mr22158757wib.3.1328359444755; Sat, 04 Feb 2012 04:44:04 -0800 (PST) Received: from fedora.x201.phnet (79-5.62-81.cust.bluewin.ch. [81.62.5.79]) by mx.google.com with ESMTPS id d9sm12756308wiy.2.2012.02.04.04.44.01 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Feb 2012 04:44:02 -0800 (PST) Message-ID: <4F2D2810.1090802@gmail.com> Date: Sat, 04 Feb 2012 13:44:00 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Stephane Chazelas , 632048-done@bugs.debian.org 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 Cc: grub-devel@gnu.org, Colin Watson 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: Sat, 04 Feb 2012 12:44:08 -0000 The problem with floppy part was fixed and the attempt to install on partionless disk was a user error. Closing On 06.09.2011 16: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. Instead, >>> they pass 0x00 or 0x01 even when booted from 0x80. */ >>> - if (!allow_floppy&& !grub_util_biosdisk_is_floppy (dest_dev->disk)) >>> + if (!allow_floppy&& dest_dev->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID&& !grub_util_biosdisk_is_floppy (dest_dev->disk)) >>> /* Replace the jmp (2 bytes) with double nop's. */ >>> *boot_drive_check = 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. > > grub-install /dev/sda > or /dev/sdb > > doesn't work because it complains about a partition-less disk. > > 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. > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko