Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Oct 2016 01:44:59 -0700
From:      perryh@pluto.rain.com (Perry Hutchison)
To:        wblock@wonkity.com, smithi@nimnet.asn.au
Cc:        dpchrist@holgerdanske.com, freebsd-questions@freebsd.org
Subject:   Re: FreeBSD-10.3-RELEASE-i386-memstick.img installer changes contents of USB flash drive
Message-ID:  <57f0c90b.o0Ro%2Bn5Fmlq48GpP%perryh@pluto.rain.com>
In-Reply-To: <alpine.BSF.2.20.1610011120520.32958@wonkity.com>
References:  <mailman.4241.1475049553.1479.freebsd-questions@freebsd.org> <20160929014801.W6806@sola.nimnet.asn.au> <alpine.BSF.2.20.1609290658280.7457@wonkity.com> <20161001235138.N6806@sola.nimnet.asn.au> <alpine.BSF.2.20.1610011120520.32958@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Warren Block <wblock@wonkity.com> wrote:
> On Sun, 2 Oct 2016, Ian Smith wrote:
> > And then Perry Hutchinson (cc'd) is having the 'opposite' problem of
> > wanting to update the 10.3 i386 memstick he'd booted off with gpart
> > recover and gpart add for another partition, apparently successfully
> > according to gpart show, only to have the updates disappear on reboot?
>
> Pretty sure that's an unrelated problem I've seen myself:
> http://www.wonkity.com/~wblock/docs/html/labels.html
>
> If you change partition labels (or something) and then mount them, that 
> information is lost.  If you reboot first, something works right.

What I'm seeing does not fit that pattern.  The sequence is:

1.  dd the memstick image file to a 4GB flash drive.
2.  Boot memstick in single-user mode, which mounts the root partition
    read-only and complains about a missing secondary GPT.
3.  # gpart recover da0
4.  Reboot, again in single-user mode, which mounts the root partition 
    read-only.  No GPT complaints this time.
5.  # gpart show da0
    This shows 3 partitions and 3.1 GB of free space.
6.  # gpart add -t freebsd-ufs da0
7.  # gpart show da0
    This shows 4 partitions and no free space, as expected.
8.  Reboot, again in single-user mode, which mounts the root partition 
    read-only.  No GPT complaints.
9.  # gpart show da0
    This shows 3 partitions and 3.1 GB of free space.  WTF?????

Note that nothing got mounted between steps 6 and 8.

I can do 'gpart modify -l' to add labels to the 3 original
partitions before or after step 6, and those labels survive
the step 8 reboot although the result of 'gpart add' does not.
I tried setting kern.geom.debugflags to 16 (the foot-shooting
flag) before the 'gpart add' and it made no difference.  And
no, it is not a case of an orderly shutdown having written out
an old in-memory instance of the GPT:  I went so far as to yank
the stick out of the USB port after step 7, and then power-cycle
the machine, and the new partition *still* was gone after the
reboot.



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