Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2010 22:06:46 +0000
From:      Krzysztof Dajka <alteriks@gmail.com>
To:        stable@freebsd.org, marcel@freebsd.org
Subject:   Problem creating mbr partition with gpart
Message-ID:  <AANLkTi=wuqPyx=-WrM0KnouTtgY0LjPe4vRwwTjWpVTZ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi
Today I had problem with creating mbr partition on my pendrive.
I tried using gpart as I am most familiar with this tool. On clean device I did:

[~] #  gpart create -s mbr da1
da1 created
[~] #  gpart add  -t mbr da1
gpart: Invalid argument

What the heck? In gpart(8) under partition types I can see 'The
symbolic names currently understood are: [...] mbr'
Oh well I tried:

[~] #  gpart add  -t fat da1
gpart: Invalid argument
[~] #  gpart add  -t vfat da1
gpart: Invalid argument
[~] #  gpart add  -t fat32 da1
gpart: Invalid argument
[~] #  gpart add -t msdosfs da1
gpart: Invalid argument

As I was in a little hurry I used sysinstall to create msdosfs
[~] #  /sbin/newfs_msdos /dev/da1s1
Did the thing.

Few moments ago I discovered that I can easily create ntfs partition
[~] #  gpart add -t ntfs da1
da1s1 added

Using decimal values for partition types which isn't mentioned in
gpart(8) is also supported:
[~] #  gpart add -t \!11 da1
da1s1 added

Gpart(8) is unprecise especially itemising in partition types mbr
which is partition scheme.
Remembering decimal values for each partition types is inpractical,
maybe most common should have theirs symbolic name.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=wuqPyx=-WrM0KnouTtgY0LjPe4vRwwTjWpVTZ>