From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XknhD-0000ka-O5 for mharc-grub-devel@gnu.org; Sun, 02 Nov 2014 01:27:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xknh7-0000kN-63 for grub-devel@gnu.org; Sun, 02 Nov 2014 01:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xknh2-0004zk-Q9 for grub-devel@gnu.org; Sun, 02 Nov 2014 01:27:17 -0400 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:42886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xknh2-0004zf-Fz for grub-devel@gnu.org; Sun, 02 Nov 2014 01:27:12 -0400 Received: by mail-lb0-f180.google.com with SMTP id z12so7712968lbi.25 for ; Sat, 01 Nov 2014 22:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=J4bZ+A9pYQyoSZGaqLgqzofGvypbC2+B5ZpJFrwHx08=; b=AUX8cINiB0wwSypmJKDmN/7U1cq9hBDyHvVri0c18Cai+iN+EPSVw/ebCVMC1+uYUe oYlM8eOs1qBlKa+EBn/zlELFBDfdDwAqXpK9SzvDPU0AXHz5VVdT2QimHWkAEeUVtfSU qTQoO/97o+cwzvB3FdJKs69BeqOdk4kBFRw9uNokzeeAwu3p61XdTGTSNp5qPQxKujeM CTUjYnRCx5CTkFFG0m4QyS3xcCELPb1GxI3O+bZaaY6+5otuFrUnHBVY8Mqa1CzT1sO6 U2zBViSj+lLs6YV64NIk9qOJ1W9+vSYFXUuBDHnoqBIeTNNIpm3VaR+J3HR0NmvU8AiD kSfg== X-Received: by 10.152.7.175 with SMTP id k15mr39000138laa.58.1414906030251; Sat, 01 Nov 2014 22:27:10 -0700 (PDT) Received: from opensuse.site (ppp91-76-139-38.pppoe.mtu-net.ru. [91.76.139.38]) by mx.google.com with ESMTPSA id rb2sm6332113lbb.17.2014.11.01.22.27.08 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Nov 2014 22:27:09 -0700 (PDT) Date: Sun, 2 Nov 2014 08:27:07 +0300 From: Andrei Borzenkov To: Chris Murphy Subject: Re: workaround install boot on btrfs with windows partition scheme Message-ID: <20141102082707.68748fa5@opensuse.site> In-Reply-To: References: <20141030083243.GA7083@linux-dsax.tai.apac.novell.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::234 Cc: The development of GNU GRUB 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: Sun, 02 Nov 2014 05:27:21 -0000 =D0=92 Sat, 1 Nov 2014 14:35:57 -0600 Chris Murphy =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > On Oct 30, 2014, at 2:32 AM, Michael Chang wrote: >=20 > > Many shipped Windows created it's first partition aligned in 63 > > (cylinder) and therefore can't offer enough room for core.img. Even > > worse the partitions has been created as logical. > >=20 > >> sudo /sbin/fdisk -l=20 > > Disk /dev/sda: 64.4 GB, 64424509440 bytes, 125829120 sectors > > Units =3D sectors of 1 * 512 =3D 512 bytes > > Sector size (logical/physical): 512 bytes / 512 bytes > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > Disk label type: dos > > Disk identifier: 0x0001c622 > >=20 > > Device Boot Start End Blocks Id System > > /dev/sda1 63 2056319 1028128+ b W95 FAT32 > > /dev/sda2 * 2058240 125829119 61885440 f W95 Ext'd > > (LBA) > > /dev/sda5 2060288 5302271 1620992 82 Linux swap / > > Solaris > > /dev/sda6 5304320 47247359 20971520 83 Linux > > /dev/sda7 47249408 125804543 39277568 83 Linux > >=20 > > This leaves us currently no option to succeed in installation if boot is > > on btrfs, or any other filesystems that block lists can't be used and > > core.img must be embedded in order to be reliably addressed. > >=20 > > The attached patch try to workaround this scenario by placing the core.= img > > in filesystem's (btrfs) bootloader embedding area if available to overc= ome > > the too small MBR gap which gets loaded by boot.img placed in MBR. > >=20 > > Please kindly review the patch or suggests for how to fix this scenario > > sanely. >=20 > Why not have a dedicated partition with MBR type code for core.img, equiv= alent to BIOSBoot currently used on GPT? freedesktop.org has a proposal to = use type code 0xEA for this purpose (in part). The boot.img code in the MBR= can arbitrarily jump to any LBA, so 0xEA doesn't need to be a primary part= ition does it? >=20 It is rarely needed in simple cases; in complicated cases (btrfs or LVM) we already have space dedicated for core.img. It seems more logical to use this space. Also you still need to tell grub-setup to use this special partition at which point why not extend it to support arbitrary location for core.img? It could be made check partition type and not refuse to install on raw partition for special 0xEA type then as a bonus.