From owner-freebsd-questions@FreeBSD.ORG Sun Jun 14 19:48:47 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F418410657F0 for ; Sun, 14 Jun 2009 19:48:46 +0000 (UTC) (envelope-from doug@polands.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by mx1.freebsd.org (Postfix) with ESMTP id D50338FC21 for ; Sun, 14 Jun 2009 19:48:45 +0000 (UTC) (envelope-from doug@polands.org) Received: from haran.polands.org ([75.87.219.217]) by hrndva-omta01.mail.rr.com with ESMTP id <20090614192853601.ETKC9737@hrndva-omta01.mail.rr.com> for ; Sun, 14 Jun 2009 19:28:53 +0000 Received: from email.polands.org (ammon.polands.org [172.16.1.7]) by haran.polands.org (8.14.3/8.14.3) with ESMTP id n5EJSqCC066754 for ; Sun, 14 Jun 2009 14:28:52 -0500 (CDT) (envelope-from doug@polands.org) Received: from 172.16.1.37 (SquirrelMail authenticated user djp) by email.polands.org with HTTP; Sun, 14 Jun 2009 14:28:52 -0500 Message-ID: Date: Sun, 14 Jun 2009 14:28:52 -0500 From: "Doug Poland" To: questions@freebsd.org User-Agent: SquirrelMail/1.4.19 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: Bootable GPT USB device X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 19:48:48 -0000 Hello, I'm trying to create a bootable USB drive using the new GEOM_PART_ partitioning technology. Following gpart(8), I've done this... gpart create -s GPT da0 gpart bootcode -b /boot/pmbr da0 gpart add -b 34 -s 128 -t freebsd-boot da0 gpart bootcode -p /boot/gptboot -i 1 da0 gpart add -b 162 -s 2097152 -t freebsd-ufs da0 gpart add -b 2097314 -s 8388608 -t freebsd-swap da0 gpart add -b 10485922 -s 2097152 -t freebsd-ufs da0 gpart add -b 12583074 -s 8388608 -t freebsd-ufs da0 gpart add -b 20971682 -s 135329773 -t freebsd-ufs da0 # gpart show => 34 156301421 da0 GPT (75G) 34 128 1 freebsd-boot (64K) 162 2097152 2 freebsd-ufs (1.0G) 2097314 8388608 3 freebsd-swap (4.0G) 10485922 2097152 4 freebsd-ufs (1.0G) 12583074 8388608 5 freebsd-ufs (4.0G) 20971682 135329773 6 freebsd-ufs (65G) newfs -L boot /dev/da0p2 newfs -L swap /dev/da0p3 newfs -UL tmp /dev/da0p4 newfs -UL var /dev/da0p5 gjournal load gjournal label /dev/da0p6 newfs -L usrgj /dev/da0p6.journal mkdir -p /mnt/{boot,var,tmp,usr} mount /dev/ufs/boot /mnt/boot/ mount /dev/ufs/tmp /mnt/tmp mount /dev/ufs/var /mnt/var/ mount -o async /dev/ufs/usrgj /mnt/usr/ cd /mnt/boot && dump -0aLuC32 -f- / | restore -rf- cd /mnt/tmp && dump -0aLuC32 -f- /tmp | restore -rf- cd /mnt/var && dump -0aLuC32 -f- /var | restore -rf- cd /mnt/usr && dump -0aLuC32 -f- /usr | restore -rf- I've tried this on two systems now, 7.1-RELEASE i386 and 7.2-STABLE amd64. In each case, I cannot boot from the newly create USB drive. I know each machine is capable of USB boot as I have a 4GB thumbdrive created with the traditional bsdlabel partitioning tools. Each box boots nicely off that USB disk. So, question is, what am I doing wrong? And, how can use the new disk partitioning GEOM class to create a bootable, external, USB drive? Many thanks in advance. -- Regards, Doug