Re: anoncvs password

2012-07-08 Thread Matthias Apitz
El día Sunday, July 08, 2012 a las 02:59:24AM -0700, per...@pluto.rain.com 
escribió:

 What is one supposed to enter when anoncvs prompts for a password?
 
 I have tried:
 
 * my email address, as I would use for anon FTP
 * ftp, as was once conventionally used for anon FTP
 * cvs (same idea, but mentioning the transport in use)
 * nothing -- just hit return
 
 None of these works.  I get
 
 Permission denied (publickey,keyboard-interactive).
 cvs [checkout aborted]: end of file from server (consult above messages if 
 any)


$ CVSROOT=:pserver:anon...@anoncvs.fr.freebsd.org:/home/ncvs
$ export CVSROOT
$ cvs login
Logging in to :pserver:anon...@anoncvs.fr.freebsd.org:2401/home/ncvs
CVS password: 
$ cvs co src
cvs checkout: Updating src
U src/COPYRIGHT
U src/LOCKS
U src/MAINTAINERS

I used as pw 'anoncvs'; note also: one should use today better svn, not
cvs;

HIH

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


df(1) and missing space in partition /dev/ada0p2

2012-07-08 Thread Matthias Apitz

Hello,

I hace setup a fresh 10.0-CURRENT, this time using gpart(8) and I do not
understand why the sum of Used and Avail does not equal to the full
space of /dev/ada0p2:

$ uname -a
FreeBSD aurora-clone.Sisis.de 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r235646M: 
Thu Jul  5 09:38:00 UTC 2012 
r...@aurora-clone.sisis.de:/usr/obj/usr/src/sys/GENERIC  i386
$ df -k
Filesystem  1024-blocks UsedAvail Capacity  Mounted on
/dev/ada0p274130588 25389436 4281070837%/
devfs 110   100%/dev
linprocfs 440   100%/compat/linux/proc
/dev/md0 126492   24   116352 0%/tmp
$ echo '25389436+42810708' | bc
68200144

in some older system, which was setup the 'traditional way', it does:

$ uname -a
FreeBSD tinyCurrent 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r21: Thu Oct 28 
10:56:32 CEST 2010 
g...@current.sisis.de:/usr/home/guru/myThings/FreeBSD/9-CURRENT/obj/usr/home/guru/myThings/FreeBSD/9-CURRENT/src/sys/GENERIC
 i386
$ df -k
Filesystem  1024-blocks  Used Avail Capacity  Mounted on
/dev/ad4s1a 101297430109271188230%/
devfs 1 1 0   100%/dev
/dev/ad4s1d 5049390132150   4917240 3%/var
/dev/ad4s1e 101297428525872771628%/tmp
/dev/ad4s1f   227454428 122082964 10537146454%/usr
linprocfs 4 4 0   100%/compat/linux/proc
$ echo '122082964+105371464' | bc
227454428

Any idea?

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: df(1) and missing space in partition /dev/ada0p2

2012-07-08 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Sun Jul  8 01:46:23 2012
 Date: Sun, 8 Jul 2012 08:44:51 +0200
 From: Matthias Apitz g...@unixarea.de
 To: freebsd-questions@freebsd.org
 Subject: df(1) and missing space in partition /dev/ada0p2


 Hello,

 I hace setup a fresh 10.0-CURRENT, this time using gpart(8) and I do not 
 understand why the sum of Used and Avail does not equal to the full space 
 of /dev/ada0p2:


A traditional UFS filesstem reserves the last 10% of the disk capacity for 
the exclusive use of the superuser.  'Avail' represents the space that is
available to _any_ user.  Thus, on an absolutely _empty_ filesystem,
'avail' will be only 90% of 'total'.

'man tunefs' and see 'minfree' for  the gory details.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: df(1) and missing space in partition /dev/ada0p2

2012-07-08 Thread Matthias Apitz
El día Sunday, July 08, 2012 a las 02:30:40AM -0500, Robert Bonomi escribió:

  Hello,
 
  I hace setup a fresh 10.0-CURRENT, this time using gpart(8) and I do not 
  understand why the sum of Used and Avail does not equal to the full space 
  of /dev/ada0p2:
 
 
 A traditional UFS filesstem reserves the last 10% of the disk capacity for 
 the exclusive use of the superuser.  'Avail' represents the space that is
 available to _any_ user.  Thus, on an absolutely _empty_ filesystem,
 'avail' will be only 90% of 'total'.
 
 'man tunefs' and see 'minfree' for  the gory details.

You have not answered the question what is causing the diff between both
systems;

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: df(1) and missing space in partition /dev/ada0p2

2012-07-08 Thread Wojciech Puchar

FreeBSD aurora-clone.Sisis.de 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r235646M: 
Thu Jul  5 09:38:00 UTC 2012 
r...@aurora-clone.sisis.de:/usr/obj/usr/src/sys/GENERIC  i386
$ df -k
Filesystem  1024-blocks UsedAvail Capacity  Mounted on
/dev/ada0p274130588 25389436 4281070837%/
devfs 110   100%/dev
linprocfs 440   100%/compat/linux/proc
/dev/md0 126492   24   116352 0%/tmp
$ echo '25389436+42810708' | bc
68200144



only one partition is mounted and created.

I don't have idea what installer do as i don't use it.

I recommend installing manually so you have full control of how partitions 
are laid out and using what partition table format.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

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.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: df(1) and missing space in partition /dev/ada0p2

2012-07-08 Thread Matthias Apitz
El día Sunday, July 08, 2012 a las 09:47:33AM +0200, Wojciech Puchar escribió:

  FreeBSD aurora-clone.Sisis.de 10.0-CURRENT FreeBSD 10.0-CURRENT #2 
  r235646M: Thu Jul  5 09:38:00 UTC 2012 
  r...@aurora-clone.sisis.de:/usr/obj/usr/src/sys/GENERIC  i386
  $ df -k
  Filesystem  1024-blocks UsedAvail Capacity  Mounted on
  /dev/ada0p274130588 25389436 4281070837%/
  devfs 110   100%/dev
  linprocfs 440   100%/compat/linux/proc
  /dev/md0 126492   24   116352 0%/tmp
  $ echo '25389436+42810708' | bc
  68200144
 
 
 only one partition is mounted and created.
 
 I don't have idea what installer do as i don't use it.
 
 I recommend installing manually so you have full control of how partitions 
 are laid out and using what partition table format.

I did the partitioning by hand as:

# gpart destroy -F ada0
# gpart create -s gpt ada0
# gpart add -t freebsd-boot -s 512k ada0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0
# gpart add -t freebsd-ufs -b 1m -s 73G ada0
# gpart add -t freebsd-swap ada0
# newfs /dev/ada0p2
...

which I think it's fine;

and this explains now also where the missing blocks are: I forgot '-m 0'
in newfs(8); thanks to Robert to point me in the correct direction and
sorry for the noise.

Thanks

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sat, 07 Jul 2012 17:45:17 -0400, Thomas Mueller wrote:
 Does a USB flash drive also work as a giant floppy, no partitions? 
 Can you make a flash drive bootable when nonpartitioned and
 formatted that way?

Yes, that's exactly what my advice was aiming to, but let's
try to keep the terminology clean: You cannot do without
partitions. A partition carries a file system.

You _can_ do without slices. A slice holds one or more partitions.
A slice is a DOS primary partition. Omitting it is called
dedicated mode. There may be some circumstances where a
dedicated disk doesn't boot. Personally I haven't met one,
but it's still possible due to BIOSes expecting MS-DOS-alike
structures.

For the file system side, it's just a matter of having
created one partition covering the whole disk, newfs and
tunefs it, and install the boot code. Wojciech Puchar did
already explain how this works and which tools are involved.

However, there _is_ a way to make a giant floppy without a
file system (as you said without partitions, and I'll take
that literally): You can use tar, the universal file system
that isn't a file system to write data to the USB stick.

Writing stuff:

# tar cf /dev/da0 /my/files

Reading stuff:

# tar xf /dev/da0

This works, but it may appear that no other system can read it.
If you consider using it for FreeBSD only, no problem. The big
advantage: You don't need to mount and umount the stick.

I'm assume _that_ construct cannot be booted.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
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, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Carmel
On Sat, 7 Jul 2012 20:36:36 -0600 (MDT)
Warren Block articulated:

 On Sat, 7 Jul 2012, Carmel wrote:
 
  This is probably a dumb question, but does gpart even work on a USB
  flash drive? I have not been able to figure out how to do it. I
  want to erase the entire drive and format it for a FreeBSD UFS2
  file system.
 
 Yes, gpart will work with pretty much any storage device.
 
 If you want the drive to be bootable, it needs boot blocks.  This is 
 easier with GPT than MBR.  For an 8G drive:
 
 # gpart create -s gpt da0
 # gpart add -t freebsd-boot -s 512k da0
 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
 # gpart add -t freebsd-ufs -b 1M -s 7G da0
 # gpart add -t freebsd-swap da0
 # newfs -U /dev/da0p2

Thanks Warren, you win the prize for the most detailed answer.
Polytropon gave me the easiest answer if I just want to use the drive
as a simple storage device; however, if at some point I actually want
to go beyond that your answer is what I would require.

Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.
Perhaps I was just not looking hard enough.

Perhaps, and I know that this will offend some purists, but a nice GUI
that would do what your instructions detail above would be helpful.
There is no way that I am going to remember all of those instructions in
six months time. Just my 2¢.

-- 
Carmel ✌
carmel...@hotmail.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 8 Jul 2012 07:41:59 -0400, Carmel wrote:
 Perhaps, and I know that this will offend some purists, but a nice GUI
 that would do what your instructions detail above would be helpful.
 There is no way that I am going to remember all of those instructions in
 six months time. Just my 2¢.

Why not put the commands into a text file locally?
Try _that_ with a GUI. :-)

I'm almost sure KDE or Gnome offer means to initialize mass
storage, but because those seem to be quite Linux-centric,
it's possible FreeBSD's system tools won't be utilized. So
with using the commands provided by Warren, you will be fine
every time. If you practice them regularly, you will remember
them, and if you do so, you'll surely write a script that
allows you to automate the task so you can forget the commands
again. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Warren Block

On Sun, 8 Jul 2012, Carmel wrote:


Yes, gpart will work with pretty much any storage device.

If you want the drive to be bootable, it needs boot blocks.  This is
easier with GPT than MBR.  For an 8G drive:

# gpart create -s gpt da0
# gpart add -t freebsd-boot -s 512k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -b 1M -s 7G da0
# gpart add -t freebsd-swap da0
# newfs -U /dev/da0p2


Thanks Warren, you win the prize for the most detailed answer.
Polytropon gave me the easiest answer if I just want to use the drive
as a simple storage device; however, if at some point I actually want
to go beyond that your answer is what I would require.

Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.
Perhaps I was just not looking hard enough.


FreeBSD sees no significant difference between a flash drive and a disk 
drive.  They are treated the same.



Perhaps, and I know that this will offend some purists, but a nice GUI
that would do what your instructions detail above would be helpful.
There is no way that I am going to remember all of those instructions in
six months time. Just my 2¢.


bsdinstall(8) has a curses partition editor.  There is probably a trick 
needed to use that outside of an install context.  I find gpart easier.___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar


Interestingly enough, I searched through the man pages and FreeBSD help
but never came across anything that specifically addressed flash drive.


because there is no need to. For freebsd it is just a storage device.

for FreeBSD only i recommend using bsdlabel, not gpart, for multiOS using 
fdisk.


it is simpler and boot0cfg allows you to add boot selector, so you can 
make multisystem pendrive, just as my triple-boot 16GB pendrive holding 
FreeBSD/i386, FreeBSD/amd64, lots of packages, DOS with lots of tools and 
windoze installers.



Perhaps, and I know that this will offend some purists, but a nice GUI


not about purism but (lack of) usability.

GUI interfaces never helps, only hides real things and prevent 
understanding anything. You maybe understand it, maybe not. Most people 
will not.


GUI interfaces are actual a PROBLEM with today software.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

with using the commands provided by Warren, you will be fine
every time. If you practice them regularly, you will remember
them, and if you do so, you'll surely write a script that


after doing

man gpart

he will understand it, so remembering is easy.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Working openvpn/pf configuration broken on upgrade from 8.3 to 9.0

2012-07-08 Thread Jeff Hedges


Hi.

I'm running a small VPN for ~10 office users. Upon upgrading the machine from 
8.3 to 9.0 yesterday, it became
impossible for users to connect to the VPN. I've tried everything I can think 
of to track down the problem and it
seems (although I may be mistaken) to be something to do with pf and a redirect 
rule. Here is the pf.conf on
the machine:

--%--

nic_wan = fxp0
nic_dmz = fxp2
nic_tun = tun0 
# Perform NAT for outgoing connections from the DMZ
nat log on $nic_wan from $nic_dmz:network to any - ($nic_wan)

# Redirect incoming openvpn clients from the WAN to the openvpn server
rdr log on $nic_wan proto udp from any to any port 11940 - 10.2.0.1 port 11940

pass log all

--%--

The fxp0 interface is connected directly so a small DSL modem that simply 
forwards everything
to this machine (no NAT, no filtering, etc). The fxp0 has one address: 1.0.0.2.

The openvpn daemon is listening on 10.2.0.1, which is the only IP bound to the 
fxp2 interface.

Here is where the madness starts:

Running tcpdump on fxp0 and pflog0 shows the following when a remote user 
x.x.x.x connects:

fxp0: 00:00:00.443090 00:50:7f:21:67:94  00:d0:b7:40:4b:31, IPv4, length 96: 
x.x.x.x.11940  10.0.0.2.11940: UDP, length 54
pflog0: 00:00:16.820380 rule 0..16777216/0(match): pass in on fxp0: 
x.x.x.x.11940  10.2.0.1.11940: UDP, length 54 
So, packets come in fxp0 from x.x.x.x and then after the rdr rule, they're sent 
to 1.2.0.1:11940.

However, the openvpn server log shows nothing, even at the highest verbosity 
settings. The connecting
client eventually receives a handshake timed out message and either gives up 
or tries again.

Using nc, it's possible to see that packets *are* getting through:

$ nc -u -vvv example.com 11940
Connection to example.com 11940 port [udp/*] succeeded!

The openvpn server log then shows a TLS handshake error (as expected, as nc 
obviously isn't performing a TLS
handshake).

If I, from inside the DMZ, try to connect an openvpn client to the server, the 
connection immediately
succeeds and everything works correctly. Therefore, I believe that the 'rdr' 
rule in the pf.conf
is probably to blame and that something pretty fundamental has changed between 
8.3 and 9.0. From
the bizarre behaviour (letting packets through but apparently damaged in some 
way), I'm guessing
that this is a bug.

Does anyone have any idea how I can track down what's going on?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 8 Jul 2012 14:16:31 +0200 (CEST), Wojciech Puchar wrote:
  Perhaps, and I know that this will offend some purists, but a nice GUI
 
 not about purism but (lack of) usability.
 
 GUI interfaces never helps, only hides real things and prevent 
 understanding anything. You maybe understand it, maybe not. Most people 
 will not.
 
 GUI interfaces are actual a PROBLEM with today software.

The main problem here is that you have no efficient way of
documentation. What do you want to do? Describe pictures?
And as soon as the GUI changes (e. g. different toolkit
version), things may change, not look the same anymore.

Also GUIs seem to be limited, especially if you want to
apply options that make better use of characteristics of
a flash drive (compared to a regular hard disk). A GUI
disk initializer would have to take _every_ possibility
into mind, everything that might be specific to the OS
it runs on (as for example Linux differs from FreeBSD
filesystem-wise), making things much more complicated
than they need to.

With few routine, tasks are performed more natural using
the desired CLI tools. You don't go Now I have to remember
which command to format the disk, you just format the disk,
which means spaking to newfs. The more often you do it,
the more obvious the tools are, and they won't change in
look and feel (or options). That makes them superior.

I admit that they might be confusing for people who do not
want to read, learn and practice. That's okay. Those should
use GUI tools and live with the (limited) set of selections
they are presented. As there is no real distinction between
user and administrator anymore, this is something we need
to live with.

That being said, CLI tools offer the easier interface to
the more advanced functionality and better flexibility, which
is especially useful in the discussed case: initializing a
USB flash drive that might need different options than what
you could default to for a regular disk drive.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 13:30, Polytropon wrote:

With few routine, tasks are performed more natural using
the desired CLI tools. You don't go Now I have to remember
which command to format the disk, you just format the disk,
which means spaking to newfs. The more often you do it,
the more obvious the tools are, and they won't change in
look and feel (or options). That makes them superior.


How do you format a FAT32 partition? newfs won't work. Is it newfs_vfat, 
newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
instead of FAT12 or FAT16? With a good GUI tool like diskmgmt.msc in 
Windows 2008 you simply right-click the partition and click New Volume 
to create a new partition, or Format to format it - and then follow 
the prompts.  Of course using diskpart is faster if you know the 
commands and parameters, but for an ordinary user adding a new disk 
maybe once a year it's most likely more efficient to just use the GUI.


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Polytropon
On Sun, 08 Jul 2012 14:27:05 +0100, Bruce Cran wrote:
 On 08/07/2012 13:30, Polytropon wrote:
  With few routine, tasks are performed more natural using
  the desired CLI tools. You don't go Now I have to remember
  which command to format the disk, you just format the disk,
  which means spaking to newfs. The more often you do it,
  the more obvious the tools are, and they won't change in
  look and feel (or options). That makes them superior.
 
 How do you format a FAT32 partition? newfs won't work. Is it newfs_vfat, 
 newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
 instead of FAT12 or FAT16?

In such cases, you use the _proper_ CLI tools for that job.
As I said, those are typically specific to the file system
one wants to use, and depending on the file system design,
there may be options that are individual to those tools.
For every fs-related task, there is a system-level tool
that does the job.



 With a good GUI tool like diskmgmt.msc in 
 Windows 2008 you simply right-click the partition and click New Volume 
 to create a new partition, or Format to format it - and then follow 
 the prompts. 

And of course you cannot create UFS partitions that way. :-)

I still remember the initalize disk function from the original
Amiga or Atari ST graphical interfaces. They were bound to those
systems and their supported file systems. Intending to have
something similar (a GUI) for UNIX and Linux would be possible,
but very complicated under the hood, and it would be even more
complicated to make all that power utilizable to a novice user.
In that specific case, reasonable defaults would have to be
provided, which typically fail in edge cases. This is where you
use the power of CLI.

Another advantage: It's less interactive, giving you potential
for automating tasks. Follow the prompts might even be too
complicated for some kinds of users. :-)



 Of course using diskpart is faster if you know the 
 commands and parameters, but for an ordinary user adding a new disk 
 maybe once a year it's most likely more efficient to just use the GUI.

If the GUI takes the considerations about file system and media
type (and their implications) into mind -- no problem. Sadly, I
don't know of a tool yet that exactly works that way.

Especially in trial  error scenarios the CLI is simpler in
use. For example, you compose a newfs command. Then you apply
it. Not happy with the result? Recall the command from the
command line history, change the parameters you want, and then
try again. It's surely harder to do that within a GUI. :-)

On the other hand, a proper tool would efficiently visualize
the content of a disk, showing how slices and partitions are
laid out and what options they have. This is a real benefit
in testing scenarios where you need a quick overview of the
status quo.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Ian Smith
In freebsd-questions Digest, Vol 422, Issue 10, Message: 29
On Sun, 8 Jul 2012 07:41:59 -0400 Carmel carmel...@hotmail.com wrote:
  On Sat, 7 Jul 2012 20:36:36 -0600 (MDT)
  Warren Block articulated:
  
   On Sat, 7 Jul 2012, Carmel wrote:
   
This is probably a dumb question, but does gpart even work on a USB
flash drive? I have not been able to figure out how to do it. I
want to erase the entire drive and format it for a FreeBSD UFS2
file system.
   
   Yes, gpart will work with pretty much any storage device.
   
   If you want the drive to be bootable, it needs boot blocks.  This is 
   easier with GPT than MBR.  For an 8G drive:
   
   # gpart create -s gpt da0
   # gpart add -t freebsd-boot -s 512k da0
   # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
   # gpart add -t freebsd-ufs -b 1M -s 7G da0
   # gpart add -t freebsd-swap da0
   # newfs -U /dev/da0p2
  
  Thanks Warren, you win the prize for the most detailed answer.
  Polytropon gave me the easiest answer if I just want to use the drive
  as a simple storage device; however, if at some point I actually want
  to go beyond that your answer is what I would require.
  
  Interestingly enough, I searched through the man pages and FreeBSD help
  but never came across anything that specifically addressed flash drive.
  Perhaps I was just not looking hard enough.

In general they're not distinct in usage from any other type of disk.

  Perhaps, and I know that this will offend some purists, but a nice GUI
  that would do what your instructions detail above would be helpful.
  There is no way that I am going to remember all of those instructions in
  six months time. Just my 2¢.

Well one of the reasons I'm replying to this is to keep a copy of 
Warren's recipe handy :)  Another is to point out that rumours of the 
death of MBR partitioning, especially on small disks, are premature.

I know your question specified gpart, but the easiest way I know of to 
put UFS filesystems on flash drives is to use sade(8), incorporating the 
fdisk  bsdlabel  newfs functions from sysinstall .. it still works as 
well as ever, however old-fashioned or deprecated some may call it.

sade's GUI at the curses level :) and does all the heavy maths for you, 
both for slicing the disk and partitioning the slice(s).  As mentioned 
in boot0cfg(8), you have to set  # sysctl kern.geom.debugflags=16
before sade (or anything) can write to any GEOM disk's boot sectors.  
Remember to reset it to 0 later.

You might even like to put a small msdosfs slice first, so you can use 
some of that stick to transfer files between UFS and DOS systems.  And 
yes you can multiboot from a memstick if you (or sade) put boot0 on it, 
assuming your computer supports booting from USB drives.

I don't know what the gpart equivalent of boot0 is, if there is one yet? 
Last I heard, seemed you had to use Linux tools to multiboot GPT disks.

There was some muttering about updating sade to handle GPT too .. that 
would be very welcome, maybe restoring some of the lost functionality 
from sysinstall/sade back into bsdinstall, both for GPT and MBR systems.

cheers, Ian___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

nanobsd: UsbDevice broken?

2012-07-08 Thread Reinhard Haller
Hi,

I'm trying to get nanobsd working on an USB-stick.

Encountered the following problem in _.di (tail):

Filesystem  1K-blocks   Used  Avail Capacity iused  ifree %iused  Mounted on
/dev/md0s1a947643 236357 63547527%4712 1176864%  
/usr/obj/nanobsd.NANOBSD/_.mnt
Generating mtree...
Creating /dev/md0s3 with /usr/obj/nanobsd.NANOBSD//_.w/var/empty
(mounting on /usr/obj/nanobsd.NANOBSD//_.mnt)
newfs -b 4096 -f 512 -i 8192 -O1 -U -LNANOs3 /dev/md0s3
/dev/md0s3: 7.8MB (16065 sectors) block size 4096, fragment size 512
using 4 cylinder groups of 1.96MB, 503 blks, 256 inodes.
with soft updates
super-block backups (for fsck -b #) at:
 32, 4056, 8080, 12104
/usr/obj/nanobsd.NANOBSD//_.mnt/.
0 blocks
Filesystem 1K-blocks Used Avail Capacity iused ifree %iused  Mounted on
/dev/md0s3  78401  7212 0%   2  10200%  
/usr/obj/nanobsd.NANOBSD/_.mnt
Writing out _.disk.image...
dd: /dev/md0s1: Input/output error
12559+0 records in
12559+0 records out
823066624 bytes transferred in 58.897047 secs (13974667 bytes/sec)
Running exit trap code
Filesystem  1K-blocksUsed Avail Capacity iusedifree %iused 
Mounted on
/dev/ada0p2 379804760 7180384 342239996 2%  470776 236828222%   /
umount: /usr/obj/nanobsd.NANOBSD//_.mnt: not a file system root directory

Replacing the line

UsbDevice Generic 1000

with

FlashDevice SanDisk 1G

gives

Filesystem  1K-blocks   Used  Avail Capacity iused  ifree %iused  Mounted on
/dev/md0s1a982527 236354 66757026%4712 1225824%  
/usr/obj/nanobsd.NANOBSD/_.mnt
Generating mtree...
Creating /dev/md0s3 with /usr/obj/nanobsd.NANOBSD//_.w/var/empty
(mounting on /usr/obj/nanobsd.NANOBSD//_.mnt)
newfs -b 4096 -f 512 -i 8192 -O1 -U -LNANOs3 /dev/md0s3
/dev/md0s3: 1.5MB (3024 sectors) block size 4096, fragment size 512
using 4 cylinder groups of 0.37MB, 95 blks, 64 inodes.
with soft updates
super-block backups (for fsck -b #) at:
 32, 792, 1552, 2312
/usr/obj/nanobsd.NANOBSD//_.mnt/.
0 blocks
Filesystem 1K-blocks Used Avail Capacity iused ifree %iused  Mounted on
/dev/md0s3  14151  1301 0%   2   2521%  
/usr/obj/nanobsd.NANOBSD/_.mnt
Writing out _.disk.image...
15615+1 records in
15615+1 records out
1023386112 bytes transferred in 22.597459 secs (45287663 bytes/sec)

Any suggestions?

Thanks
Reinhard

nanobsd config:

NANO_NAME=NANOBSD
NANO_PMAKE=make -j 4
NANO_KERNEL=GENERIC
NANO_ARCH=i386
NANO_IMAGES=1
NANO_BOOTLOADER=boot/boot0
NANO_LABEL=NANO

CONF_BUILD='
NO_KLDLOAD=YES
NO_NETGRAPH=YES
NO_PAM=YES
'

CONF_INSTALL='
NO_BLUETOOTH=YES
NO_CVS=YES
NO_FORTRAN=YES
NO_HTML=YES
NO_LPR=YES
NO_MAN=YES
NO_SENDMAIL=YES
NO_SHAREDOCS=YES
NO_EXAMPLES=YES
NO_INSTALLLIB=YES
NO_CALENDAR=YES
NO_MISC=YES
NO_SHARE=YES
'

CONF_WORLD='
NO_MODULES=YES
NO_KERBEROS=YES
NO_GAMES=YES
NO_RESCUE=YES
NO_SYSCONS=YES
NO_INFO=YES
'
#USB Stick
UsbDevice Generic 1000

#FlashDevice SanDisk 1G

# allow root to login via SSH
customize_cmd cust_allow_ssh_root


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: anoncvs password

2012-07-08 Thread perryh
Matthias Apitz g...@unixarea.de wrote:

 ... one should use today better svn, not cvs;

Does svn work for (parts of) the ports collection,
and is there a writeup somewhere on how to use it?
It doesn't seem to have found its way into
http://www.freebsd.org/doc/handbook/mirrors.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


for loops with /bin/sh on command line.

2012-07-08 Thread Vincent Hoffman
I'm sure I'm being dim, but why cant I do a for loop on the command line
using /bin/sh ?
am I suffering from too much use of bash and as such shouldnt expect it
to work?


banshee# for foo in 1 2 3 ; do echo $foo ; done
for: Command not found.
foo: Undefined variable.
banshee# echo 'for foo in 1 2 3; do echo $foo ; done'  bahh.sh
banshee# sh bahh.sh
1
2
3
banshee#



Vince
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: for loops with /bin/sh on command line.

2012-07-08 Thread Wojciech Puchar

am I suffering from too much use of bash and as such shouldnt expect it
to work?


maybe. i actually use bash for script.




banshee# for foo in 1 2 3 ; do echo $foo ; done
for: Command not found.
foo: Undefined variable.
banshee# echo 'for foo in 1 2 3; do echo $foo ; done'  bahh.sh
banshee# sh bahh.sh
1
2
3
banshee#



Vince
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: for loops with /bin/sh on command line.

2012-07-08 Thread Wojciech Puchar



banshee# for foo in 1 2 3 ; do echo $foo ; done
for: Command not found.
foo: Undefined variable.
banshee# echo 'for foo in 1 2 3; do echo $foo ; done'  bahh.sh
banshee# sh bahh.sh
1
2
3
banshee#


echo $SHELL
is it /bin/sh really?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

I know your question specified gpart, but the easiest way I know of to
put UFS filesystems on flash drives is to use sade(8), incorporating the
the easiest way to put UFS filesystem on flash drives is to ... put 
UFS filesystem using newfs command.


You DO NOT NEED any partitioning.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: for loops with /bin/sh on command line.

2012-07-08 Thread Vincent Hoffman
On 08/07/2012 17:51, Wojciech Puchar wrote:


 banshee# for foo in 1 2 3 ; do echo $foo ; done
 for: Command not found.
 foo: Undefined variable.
 banshee# echo 'for foo in 1 2 3; do echo $foo ; done'  bahh.sh
 banshee# sh bahh.sh
 1
 2
 3
 banshee#

 echo $SHELL
 is it /bin/sh really?
Doh, yes that was it. Cant believe I forgot to check. I was running csh
for no good reason.

Thanks,
Vince

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: anoncvs password

2012-07-08 Thread Matthias Apitz
El día Sunday, July 08, 2012 a las 09:21:53AM -0700, per...@pluto.rain.com 
escribió:

 Matthias Apitz g...@unixarea.de wrote:
 
  ... one should use today better svn, not cvs;
 
 Does svn work for (parts of) the ports collection,

As far as I know, the ports will move to SVN soon; there was a thread in
current@ some days ago; IIRC the date was July 14; search for Subject:

[HEADS UP] Ports tree migration to Subversion

 and is there a writeup somewhere on how to use it?
 It doesn't seem to have found its way into
 http://www.freebsd.org/doc/handbook/mirrors.html

see:
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html

HIH

matthias

-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: for loops with /bin/sh on command line.

2012-07-08 Thread Wojciech Puchar

3
banshee#


echo $SHELL
is it /bin/sh really?

Doh, yes that was it. Cant believe I forgot to check. I was running csh
for no good reason.

the reason is that it is default.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 16:06, Ian Smith wrote:

In general they're not distinct in usage from any other type of disk.


The more expensive disks of course support TRIM so you'd want to pass -t 
to newfs to enable it.


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

In general they're not distinct in usage from any other type of disk.


The more expensive disks of course support TRIM so you'd want to pass -t to 
newfs to enable it.

can you give me an example of pendrive that supports TRIM?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


YASSDQ

2012-07-08 Thread Graham Bentley

Hi I have put together a little experimental FreebSD 9.0
box which comprises of ;

http://www.cartft.com/catalog/il/934
http://www.overclockers.co.uk/showproduct.php?prodid=HS-023-ZA
2GB RAM and a Sandisk SDSA3BD-054G 8GB SSD

The idea is a silent system I can tinker on - nothing serious. 
I chose the guided install and accepted the default partition 
/ fs layout. I thought the things where running a bit slow and 
changed from 'native' in the BIOS to 'legacy' SATA and things 
seem a bit quicker now however I am wondering if I am getting 
the bext out of the SDD? I have read a little about 'aligning' and 
4k sectors I think? If its running ok should I leave as is? Or do 
you have tunning advice for me?


Thanks! 
___

freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Bruce Cran

On 08/07/2012 21:51, Wojciech Puchar wrote:

can you give me an example of pendrive that supports TRIM?


LaCie FastKey 
(http://www.tomshardware.co.uk/usb-3.0-thumb-drive-flash-drive,review-32174-5.html).


--
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: qbittorrent freezes, ioctl sign-extension ioctl ffffffff8004667e

2012-07-08 Thread RW
On Sat, 7 Jul 2012 20:52:50 +0200
Jens Schweikhardt wrote:

 hello, world\n
 
 is anybody else seeing this? On a fresh 9-STABLE/amd64 as of July 7,
 with all ports compiled from scratch. Qbittorrent (2.9.11) freezes
 after about 10 to 20 seconds, reacts to mouse clicks only after a
 minute or so; the window isn't redrawn when it was obscured by other
 windows and ...

I tried it a few weeks ago on 8.3. I found that it locks-up just after
the first torrent is added, or if it's started with a torrent already
loaded. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: qbittorrent freezes, ioctl sign-extension ioctl ffffffff8004667e

2012-07-08 Thread Wojciech Puchar



On Sun, 8 Jul 2012, RW wrote:


On Sat, 7 Jul 2012 20:52:50 +0200
Jens Schweikhardt wrote:


hello, world\n

is anybody else seeing this? On a fresh 9-STABLE/amd64 as of July 7,
with all ports compiled from scratch. Qbittorrent (2.9.11) freezes
after about 10 to 20 seconds, reacts to mouse clicks only after a
minute or so; the window isn't redrawn when it was obscured by other
windows and ...


I tried it a few weeks ago on 8.3. I found that it locks-up just after
the first torrent is added, or if it's started with a torrent already
loaded.

mosy probably not FreeBSD related. just a buggy program
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

seems like SSD style controller+USB 3.0 bridge. sizes suggest this.

thanks.

On Sun, 8 Jul 2012, Bruce Cran wrote:


On 08/07/2012 21:51, Wojciech Puchar wrote:

can you give me an example of pendrive that supports TRIM?


LaCie FastKey 
(http://www.tomshardware.co.uk/usb-3.0-thumb-drive-flash-drive,review-32174-5.html).


--
Bruce Cran


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


power failure, boot, and fsck

2012-07-08 Thread Patrick Donnelly
Hi,

After a power failure at home, my FreeBSD server automatically starts
again but fails to mount my UFS /boot disk because it was not properly
unmounted. Here is my fstab:

$ cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/da0s1a  /boot-disk ufsrw  00


I'm using ZFS root with a USB UFS boot device. Anyway, I get an error
that looks like (copied from another thread; devices and mount points
don't match):

UFS: /dev/ad10s3f (/usr)
Automatic file system check failed, help!
error aborting boo (sending sigtem to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode.
enter full pathname of shell or RETURN for /bin/sh:

In single-user mode I just `fsck /dev/da0s1a` and reboot. That fixes
the problem. However, I would like this to be automatic on boot. It
would be annoying if I'm out-of-town and the server cannot recover
without my help. Any tips?

-- 
Patrick Donnelly
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Thomas Mueller
On Sat, 07 Jul 2012 17:45:17 -0400, Thomas Mueller wrote:
 Does a USB flash drive also work as a giant floppy, no partitions?
 Can you make a flash drive bootable when nonpartitioned and
 formatted that way?

Polytropon responded:

 Yes, that's exactly what my advice was aiming to, but let's
 try to keep the terminology clean: You cannot do without
 partitions. A partition carries a file system.

 You _can_ do without slices. A slice holds one or more partitions.
 A slice is a DOS primary partition. Omitting it is called
 dedicated mode. There may be some circumstances where a
 dedicated disk doesn't boot. Personally I haven't met one,
 but it's still possible due to BIOSes expecting MS-DOS-alike
 structures.

 For the file system side, it's just a matter of having
 created one partition covering the whole disk, newfs and
 tunefs it, and install the boot code. Wojciech Puchar did
 already explain how this works and which tools are involved.

 However, there _is_ a way to make a giant floppy without a
 file system (as you said without partitions, and I'll take
 that literally): You can use tar, the universal file system
 that isn't a file system to write data to the USB stick.

 Writing stuff:

 # tar cf /dev/da0 /my/files

 Reading stuff:

 # tar xf /dev/da0

 This works, but it may appear that no other system can read it.
 If you consider using it for FreeBSD only, no problem. The big
 advantage: You don't need to mount and umount the stick.

 I'm assume _that_ construct cannot be booted.

You mean the non-subdivided 1.44 MB or other capacity of a floppy is called a 
partition?

Same question for CDs?

One does not usually think of something that can't be created by subdividing as 
a partition.

Also, a file system can be contained in an image file.  Or is this a virtual 
partition?

Might 
 # tar xf /dev/da0
work in other BSDs or even other (quasi-)Unixes including Linux, using the 
appropriate device name where applicable in place of da0?

While that particular construst could probably not be booted, it is possible to 
boot from a floppy or image file that does not contain a file system.

Some of the disk images on the System Rescue CD (sysresccd.org) are not 
viewable/mountable as file systems.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: YASSDQ

2012-07-08 Thread Warren Block

On Sun, 8 Jul 2012, Graham Bentley wrote:


Hi I have put together a little experimental FreebSD 9.0
box which comprises of ;

http://www.cartft.com/catalog/il/934
http://www.overclockers.co.uk/showproduct.php?prodid=HS-023-ZA
2GB RAM and a Sandisk SDSA3BD-054G 8GB SSD

The idea is a silent system I can tinker on - nothing serious. I chose the 
guided install and accepted the default partition / fs layout. I thought the 
things where running a bit slow and changed from 'native' in the BIOS to 
'legacy' SATA and things seem a bit quicker now however I am wondering if I 
am getting the bext out of the SDD? I have read a little about 'aligning' and 
4k sectors I think? If its running ok should I leave as is? Or do you have 
tunning advice for me?


The default install of 9.0-RELEASE does not align to 4k sectors.
Depending on the SSD, this might cost a little or a lot of performance. 
The example gpart commands I posted in the Format a USB flash drive 
thread create aligned partitions:

http://lists.freebsd.org/pipermail/freebsd-questions/2012-July/243190.html

Notes:

1. SSDs don't necessarily use 4k blocks, some use larger ones. 
Starting the first filesystem partition at 1M works for most of the 
common values.


2. As Bruce Cran pointed out, TRIM can be enabled with UFS.  But make 
sure the SSD supports it first.


3. Swap is tricky with small drives, even trickier if you want to use 
TRIM.  Swap files can be used, and then you get TRIM, but see 
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168544 for a way to 
dismount that swap file before shutdown and an annoying panic.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Jerry McAllister
On Sun, Jul 08, 2012 at 02:27:05PM +0100, Bruce Cran wrote:

 On 08/07/2012 13:30, Polytropon wrote:
 With few routine, tasks are performed more natural using
 the desired CLI tools. You don't go Now I have to remember
 which command to format the disk, you just format the disk,
 which means spaking to newfs. The more often you do it,
 the more obvious the tools are, and they won't change in
 look and feel (or options). That makes them superior.
 
 How do you format a FAT32 partition? 

You don't.  You wipe the FAT32 with fdisk and make a FreeBSD slice on it.
Then you can bsdlabel it with one partition and newfs it.  Or you can 
use the gpart tools with I am not yet familiar.   But, in any case,
the FAT32 is irrelevant.  You just overwrite that with the FreeBSD stuff.

If you have a FAT32 on it and if you want to use it as a FAT32, then you 
leave the FAT32 alone and just mount the thing as type msdosfs.

Make a mount point for it.  I commonly use /stick
Add something like the following in your /etc/fstab

  /dev/da2s1  /stick  msdosfs rw,noauto   0   0

and then do 
  #mount /stick  
on the command line.

You will have to figure out the correct /dev/...  address for it.
Generally you dan find the info in dmesg.

jerry  

newfs won't work. Is it newfs_vfat, 
 newfs_fat32, newfs_msdos etc.? And how do you specify you want FAT32 
 instead of FAT12 or FAT16? With a good GUI tool like diskmgmt.msc in 
 Windows 2008 you simply right-click the partition and click New Volume 
 to create a new partition, or Format to format it - and then follow 
 the prompts.  Of course using diskpart is faster if you know the 
 commands and parameters, but for an ordinary user adding a new disk 
 maybe once a year it's most likely more efficient to just use the GUI.
 
 -- 
 Bruce Cran
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

You don't.  You wipe the FAT32 with fdisk and make a FreeBSD slice on it.
Then you can bsdlabel it with one partition and newfs it.  Or you can


repeat 100 times more that you have to make fdisk and bsdlabel. you 
don't, and it doesn't make sense

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Format a USB flash drive using gpart

2012-07-08 Thread Wojciech Puchar

file system (as you said without partitions, and I'll take
that literally): You can use tar, the universal file system
that isn't a file system to write data to the USB stick.




which is best in USB pendrive wear and speed point of view.

pendrive's flash translation layers are just awful, only linear writes 
works well.



Writing stuff:



# tar cf /dev/da0 /my/files


i would recomment

tar -b 128 -cf /dev/da0 /my/files


Might
# tar xf /dev/da0
work in other BSDs or even other (quasi-)Unixes including Linux, using the 
appropriate device name where applicable in place of da0?


yes it will run fine under linux, openbsd, netbsd, slowlaris etc.



While that particular construst could probably not be booted, it is possible to 
boot from a floppy or image file that does not contain a file system.


If you need bootable pendrive then you have to use disklabel and make 
filesystem.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org