Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Sep 2016 00:28:26 +0300
From:      Alaksiej <ac@belngo.info>
Cc:        freebsd-geom <freebsd-geom@freebsd.org>
Subject:   Re: new partition on 10.3 i386 memstick disappearing on reboot
Message-ID:  <CAHsZcQFv7oydOAqECs7BuA8=1ZwS5vG7W14fd5FKxZ0hs6tm=A@mail.gmail.com>
In-Reply-To: <57ddefcf.jk4kZ2Kp%2BEcHfcFr%perryh@pluto.rain.com>
References:  <57ddefcf.jk4kZ2Kp%2BEcHfcFr%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Wait, why do you use 'recover' to resize?

On Sun, Sep 18, 2016 at 4:37 AM, Perry Hutchison <perryh@pluto.rain.com>
wrote:

> 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".
> _______________________________________________
> freebsd-geom@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-geom
> To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHsZcQFv7oydOAqECs7BuA8=1ZwS5vG7W14fd5FKxZ0hs6tm=A>