From owner-cvs-src@FreeBSD.ORG Wed Oct 24 21:45:17 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6358716A41A; Wed, 24 Oct 2007 21:45:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id D57F413C4AA; Wed, 24 Oct 2007 21:45:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8p) with ESMTP id 215936913-1834499 for multiple; Wed, 24 Oct 2007 17:47:16 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l9OLiUD5097452; Wed, 24 Oct 2007 17:44:39 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Wed, 24 Oct 2007 17:44:16 -0400 User-Agent: KMail/1.9.6 References: <200710242133.l9OLX05K085372@repoman.freebsd.org> In-Reply-To: <200710242133.l9OLX05K085372@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710241744.16811.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 24 Oct 2007 17:44:39 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/4592/Wed Oct 24 17:34:05 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys gpt.h src/lib/libstand Makefile src/sbin/gpt Makefile add.c boot.c gpt.8 gpt.c gpt.h show.c src/sys/boot/common ufsread.c src/sys/boot/i386 Makefile src/sys/boot/i386/gptboot Makefile gptboot.c gptldr.S ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 21:45:17 -0000 On Wednesday 24 October 2007 05:33:00 pm John Baldwin wrote: > jhb 2007-10-24 21:33:00 UTC > > FreeBSD src repository > > Modified files: > sys/sys gpt.h > lib/libstand Makefile > sbin/gpt Makefile add.c gpt.8 gpt.c gpt.h show.c > sys/boot/common ufsread.c > sys/boot/i386 Makefile > sys/boot/i386/gptboot Makefile gptboot.c > sys/boot/i386/libi386 biosdisk.c devicename.c > sys/geom/part g_part.c g_part.h g_part_gpt.c > Added files: > sbin/gpt boot.c > sys/boot/i386/gptboot gptldr.S > sys/boot/i386/pmbr Makefile pmbr.s > Log: > First cut at support for booting a GPT labeled disk via the BIOS bootstrap > on i386 and amd64 machines. The overall process is that /boot/pmbr lives > in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for > locating and loading /boot/gptboot. A quick way to use it is thus: gpt create disk0 gpt boot disk0 -- use gpt add to add filesystems -- newfs filesystems -- populate filesystems Some other notes: - gptboot can not distinguish SCSI vs ATA disks since it has no bsdlabel to peek into. However, since the loader reads /etc/fstab to determine the root device, this doesn't actually matter. - Currently the algorithm to find / is not very optimal. I've been talking some with Marcel about this so this will probably change. - ZFS + GPT booting shouldn't be that difficult to do now. It basically requires two things: 1) A ZFS file system driver in libstand. 2) A gptboot that can read ZFS. This could either be a separate gptboot.zfs or gptboot could be expanded to read both UFS and ZFS. Right now gptboot is a little over 8k and the default size of the boot partition is 64k, so there's a good bit of room there for read-only ZFS support. - All the I/O for GPT disks uses EDD LBA with no C/H/S crap. Ever. -- John Baldwin