Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2018 13:34:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 180861] gpart(8): gpart backup/restore doesn't restore labels
Message-ID:  <bug-180861-227-ojiVHFRW5L@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-180861-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-180861-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D180861

Harald Schmalzbauer <bugzilla.freebsd@omnilan.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla.freebsd@omnilan.de

--- Comment #5 from Harald Schmalzbauer <bugzilla.freebsd@omnilan.de> ---
As of 12.0-ALPHA9, gpart does partial label restore in case of GPT labels, =
when
user is specifying -l flag and label contains whitespace(s).  Everything po=
st
1st whitespace gets lost.
E.g. MS-Windows Setups set labels with whitespaces.

Parsing to the end of line instead of whatever [^[:alnum:]] might be in use
should do the trick, but haven't had a look into the code and the trivial f=
ix
isn't as trivial for me as it should be ;-)

If /dev/ada0 has a GPT with labels containing whitespaces, you can falsify =
with
disk=3Dada0
file=3D"${TMP:-/tmp}"/${disk}.gpart.txt
/sbin/gpart backup ${disk} > "${file}"
/bin/cat "${file}" | /sbin/gpart restore -Fl ${disk}

If you look at $file, there's something like "Basic data partition", which
became "Basic" during restore.

-harry

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-180861-227-ojiVHFRW5L>