Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2013 19:22:20 +0700
From:      Erich Dollansky <erichsfreebsdlist@alogt.com>
To:        freebsd-questions@FreeBSD.org
Subject:   gpart, glabel and newfs --> what am I doing wrong
Message-ID:  <20130112192220.617e28b6@X220.ovitrap.com>

next in thread | raw e-mail | index | archive | help
Hi,

in general, I try to create the partitions with gpart, add a label with
glabel and put a filesystem. I think that I am doing something very
simple the wrong way but I cannot see the error.

I try to do it in the following way:

# gpart destroy -F da0
# gpart create -s GPT da0
# gpart add -t freebsd-boot -s 64k da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
# gpart add -t freebsd-ufs -s 512m -a 4k -l Toshiba16GB2boot da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2root da0
# gpart add -t freebsd-swap -s 10m -a 4k -l Toshiba16GB2swap da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2var da0
# gpart add -t freebsd-ufs -s 10m -a 4k -l Toshiba16GB2tmp da0
# gpart add -t freebsd-ufs -a 4k -l Toshiba16GB2usr da0

Label the partitions:

# glabel label Toshiba16GB2boot /dev/da0p2
# glabel label Toshiba16GB2root /dev/da0p3
# glabel label Toshiba16GB2swap /dev/da0p4
# glabel label Toshiba16GB2var /dev/da0p5
# glabel label Toshiba16GB2tmp /dev/da0p6
# glabel label Toshiba16GB2usr /dev/da0p7

And put a file system onto the partitions.

# newfs /dev/label/Toshiba16GB2boo
# newfs /dev/label/Toshiba16GB2roo
# newfs /dev/label/Toshiba16GB2var
# newfs /dev/label/Toshiba16GB2tmp
# newfs /dev/label/Toshiba16GB2usr

But newfs on the first partition results in this:

Filesystem size 15 < minimum size of 48

When I ran the newfs directly on the device, I get this:

[X220]/home/erich (root) > newfs /dev/da0p2
/dev/da0p2: 512.0MB (1048576 sectors) block size 32768, fragment size
4096 using 4 cylinder groups of 128.03MB, 4097 blks, 16512 inodes.
super-block backups (for fsck -b #) at:
 192, 262400, 524608, 786816

Of course, this is what I expect.

I believe that it is something simple but I am not able to see my
mistake.

Erich



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