Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2014 19:34:49 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Mark Felder <feld@FreeBSD.org>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: "deep" gpart backup?
Message-ID:  <EA1339E1-B1D7-464B-B0EF-C3E6C53DA47C@xcllnt.net>
In-Reply-To: <FC3C2BBA-9268-421D-8F28-B9E034A7010B@FreeBSD.org>
References:  <1023566295.20140105015301@serebryakov.spb.ru> <1389461267.16576.69479689.0A3D893A@webmail.messagingengine.com> <F0F3FBB0-348F-4F20-AE06-449A9A7B7E5E@xcllnt.net> <FC3C2BBA-9268-421D-8F28-B9E034A7010B@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_66F899E5-F6C7-42C1-8905-B22460CAB990
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


On Jan 13, 2014, at 5:57 PM, Mark Felder <feld@FreeBSD.org> wrote:
>=20
>> gpart is an inherently low-level utility and what you want
>> is intended (i.e. by design) to be handled at an application
>> layer above gpart.
>>=20
>=20
> It's pretty low level, but it does seem to be missing some features I =
would expect in such a low level utility such as the ability to create =
partitions with custom IDs.

You can. While gpart provides common aliases that make it easier
to work on different schemes without having to know too many
details, you can still use the scheme-specific partition types
if you know them. For example:

	ns1% sudo gpart create -s mbr md0
	md0 created
	ns1% gpart show md0
	=3D>   1  2047  md0  MBR  (1.0M)
	     1  2047       - free -  (1.0M)

New let's create a NetBSD slice:

	ns1% sudo gpart add -t netbsd -s 1023 md0
	gpart: Invalid argument

Uh, ok. No alias know. Raw value it is...

	ns1% sudo gpart add -t \!0xa9 -s 1023 md0
	md0s1 added
	ns1% gpart show md0
	=3D>   1  2047  md0  MBR  (1.0M)
	     1  1023    1  !169  (512K)
	  1024  1024       - free -  (512K)

HTH,

--=20
Marcel Moolenaar
marcel@xcllnt.net



--Apple-Mail=_66F899E5-F6C7-42C1-8905-B22460CAB990
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAlLUsFkACgkQpgWlLWHuifa1gwCfW+lpd27SIuWuwBADW11A0N5o
9u4An3o3tce56nJ4v7Aq4a6o387+cdPE
=KTut
-----END PGP SIGNATURE-----

--Apple-Mail=_66F899E5-F6C7-42C1-8905-B22460CAB990--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EA1339E1-B1D7-464B-B0EF-C3E6C53DA47C>