From owner-freebsd-questions@FreeBSD.ORG Tue Nov 27 16:05:48 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5BC2CEFC for ; Tue, 27 Nov 2012 16:05:48 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA1F8FC0C for ; Tue, 27 Nov 2012 16:05:47 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id qARG5k14056321; Tue, 27 Nov 2012 09:05:46 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id qARG5kCE056318; Tue, 27 Nov 2012 09:05:46 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 27 Nov 2012 09:05:46 -0700 (MST) From: Warren Block To: Ralf Mardorf Subject: Re: How to create a partition for FreeBSD 9.0? In-Reply-To: <1354029192.2827.11.camel@q> Message-ID: References: <1353795280.2662.12.camel@q> <20121124233520.7ad4b4be.freebsd@edvax.de> <1353798889.2662.46.camel@q> <20121125002717.11a61c8d.freebsd@edvax.de> <1353807268.2773.16.camel@q> <20121125131908.671f6d31.freebsd@edvax.de> <1353846552.2508.23.camel@q> <1353877782.2508.225.camel@q> <1354029192.2827.11.camel@q> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Tue, 27 Nov 2012 09:05:46 -0700 (MST) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 16:05:48 -0000 On Tue, 27 Nov 2012, Ralf Mardorf wrote: > All instructions failed. Is there a way to mount a linux partition or > USB-stick and to redirect the output of the gpart commands to a log > file? > > In linux after mounting a partition or usb-stick I would do it like > that: > > spinymouse@q:~$ echo "$ ls -l" >> logfile > spinymouse@q:~$ ls -l >> logfile Too much work. Use script(1): $ script /tmp/session.log $ (do a bunch of stuff) $ exit And session.log will contain everything. Including control characters, so edit it before posting. > So how can I mount e.g. an USB stick? This is in the Handbook somewhere, but a quick look didn't find it, so: # mount -t msdosfs /dev/da0s1 /mnt That assumes there is a FAT filesystem in the first partition of the memory stick, a common setup. Please don't use NTFS.