Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Sep 2016 18:37:19 -0700
From:      perryh@pluto.rain.com (Perry Hutchison)
To:        freebsd-geom@freebsd.org
Subject:   new partition on 10.3 i386 memstick disappearing on reboot
Message-ID:  <57ddefcf.jk4kZ2Kp%2BEcHfcFr%perryh@pluto.rain.com>

next in thread | raw e-mail | index | archive | help
Trying here after not finding a solution on questions@

I dd'd FreeBSD-10.3-RELEASE-i386-memstick.img to a 4GB flash drive,
and booted it into single-user mode where it appeared as da0.  Then,
to resize the GPT to the media:

# gpart show da0
# gpart recover da0
# gpart show da0

which appeared to work:  the second "gpart show" showed more free
space than the first following the partitions.  Subsequently:

# gpart show da0  # showed 3 partitions and about 3GB of free space
# gpart add -t freebsd-ufs da0	# reported "da0p4 added" (or similar)
# gpart show da0  # showed 4 partitions including the new one, and
                  # no free space
# shutdown -r now

after rebooting:

# gpart show da0  # showed 3 partitions and about 3GB of free space,
                  # the same as before the "gpart add" operation

i.e. the new partition is no longer there.

I tried several times, sometimes allowing the "gpart add" to do the
operation immediately and other times specifying "-f x" followed by
"gpart commit", and the new partition never survived a reboot.

It is not a matter of the GPT somehow being silently read-only:
I also created or modified labels on the 3 original partitions,
sometimes before "gpart add" and sometimes between the add and
the reboot.  The label operations always survived the reboot, but
the partition creation never did.

There is pretty clearly a bug of some sort here:  if partition
creation is somehow forbidden in this situation I should be getting
an error message rather than having the operation appear to succeed
-- on one occasion I even (successfully) ran newfs on it -- only to
see the new partition disappear at reboot.

How do I create a partition, that will survive reboot, in the free
space at the end of the i386 memstick?

BTW I also discovered in the course of this that "gpart commit" with
no pending operations misleadingly says "Operation not permitted"
rather than "Nothing to commit" or "No pending operations".



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57ddefcf.jk4kZ2Kp%2BEcHfcFr%perryh>