Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2012 11:54:53 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        Thomas Mueller <mueller23@insightbb.com>, freebsd-questions@freebsd.org
Subject:   Re: Format a USB flash drive using gpart
Message-ID:  <20120708115453.8bd9b271.freebsd@edvax.de>
In-Reply-To: <alpine.BSF.2.00.1207080947470.1560@wojtek.tensor.gdynia.pl>
References:  <7E.91.25131.DEDA8FF4@smtp01.insight.synacor.com> <alpine.BSF.2.00.1207080947470.1560@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 Jul 2012 09:49:30 +0200 (CEST), Wojciech Puchar wrote:
> >> Magdeburg, Germany
> >
> > I have used gpart to partition a USB flash drive into FreeBSD boot partition, root partition and swap partition.
> 
> making swap partition on USB pendrive is at least stupid. if you won't 
> swap at all - wasted space.
> If you will it would be so slow and wear USB pendrive so quickly that you 
> certainly don't want this.
> 
> 
> bsdlabel -w device
> 
> bsdabel -e  device and make "a" partition start from 0 to end, 4.2BSD
> 
> newfs it
> 
> bsdlabel -B
> 
> and put everything in one partition.
> 
> make heavy use of tmpfs, make sure noatime is put in fstab to limit writes 
> to pendrive.

An addition: You can label the a partition (e. g. /dev/da0a)
or use its UFSID in /etc/fstab, so you don't depend on the
exact device name, which in turn depends on the detection
order of mass storage which is hard to predict.

I'd like to recommend reading for details:
http://www.wonkity.com/~wblock/docs/html/disksetup.html
and
http://www.freebsd.org/doc/handbook/geom-glabel.html



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120708115453.8bd9b271.freebsd>