[Bug 180861] gpart(8): gpart backup/restore doesn't restore labels
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Oct 17 13:34:21 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=180861
Harald Schmalzbauer <bugzilla.freebsd at omnilan.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla.freebsd at omnilan.de
--- Comment #5 from Harald Schmalzbauer <bugzilla.freebsd at 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 post
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 fix
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=ada0
file="${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
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list