From owner-freebsd-sysinstall@FreeBSD.ORG Sat May 17 16:13:48 2014 Return-Path: Delivered-To: freebsd-sysinstall@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3996C10D for ; Sat, 17 May 2014 16:13:48 +0000 (UTC) Received: from i3mail.icecube.wisc.edu (i3mail.icecube.wisc.edu [128.104.255.23]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5B620E8 for ; Sat, 17 May 2014 16:13:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by i3mail.icecube.wisc.edu (Postfix) with ESMTP id 2FF6938069 for ; Sat, 17 May 2014 11:13:47 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from i3mail.icecube.wisc.edu ([127.0.0.1]) by localhost (i3mail.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id ocugCQpXWKOU for ; Sat, 17 May 2014 11:13:47 -0500 (CDT) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) by i3mail.icecube.wisc.edu (Postfix) with ESMTPSA id D54F938046 for ; Sat, 17 May 2014 11:13:46 -0500 (CDT) Message-ID: <53778ABA.1010403@freebsd.org> Date: Sat, 17 May 2014 09:13:46 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: freebsd-sysinstall@freebsd.org Subject: Re: patch to bsdinstall to support BSD partitions References: <53778722.9000608@allanjude.com> In-Reply-To: <53778722.9000608@allanjude.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 16:13:48 -0000 This is not exactly a patch to bsdinstall to support plain BSD partitioning -- it has always done that. It is a patch to the ZFS module of bsdinstall. This kind of thing is one reason I was hoping the ZFS support could be integrated into the regular partition editor (which also knows how to set up EFI systems and such), to avoid this kind of duplication. I haven't had a chance to look at the submitted patches to do this, however. -Nathan On 05/17/14 08:58, Allan Jude wrote: > On some Lenovo machines, booting ZFS off MBR partitions does not work > > On the Lenovo X61s that we were able to test on at the BSDCan Hackers > Lounge, we were able to get them to boot properly using a BSD > partitioning scheme instead. > > > The attached patch makes the following changes: > > Add support for BSD partition type > > Moved the write of the MBR boot sector to the end of the process to > avoid it being nuked by the pedantic zpool labelclear commands > > Change the MBR code to not always create 2 zpools when using MBR. The > user only wants 2 pools (1 unencrypted to boot, and one encrypted for > data) in the case where they enable encryption. Due to the simplicity of > the code in previous versions of bsdinstall, two pools were used to > avoid a problem with the order of the creation of the partitions to > ensure that there was a partition at the front of the drive for the boot > code, and that the swap partition was the 2nd partition (BSD partition 'b') > > Some style cleanup to make the flow of the MBR section more > > fix an syntax error introduced in the previous patch where a newline was > not escaped > > Write the zfsboot code to the two different places require for MBR and > BSD. Write the larger section first because writing the first sector > first seems to make the BSD partition disappear and appear as an empty > MBR (No idea why this was happening, reproduced on two Lenovo laptops) > > Resolve variable reuse by renaming 'disksize' in second card to > 'usablesize' to avoid disksize being disksize less swap+boot size > > Sponsored By: ScaleEngine Inc. > > > _______________________________________________ > freebsd-sysinstall@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-sysinstall > To unsubscribe, send any mail to "freebsd-sysinstall-unsubscribe@freebsd.org"