Subject: Re: mbrlabel, disklabel, and MSDOS drives with extended partitions
To: Laine Stump <lainestump@rcn.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 07/27/2001 17:47:07
On Thu, Jul 26, 2001 at 05:08:46PM -0400, Laine Stump wrote:
> lainestump@rcn.com (Laine Stump) writes:
>
> > Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> >
> > > Well, not all kernels are 4MB large :)
> >
> > Then maybe mount_msdos should automatically try to run mbrlabel before
> > mounting (or when someone asks to mount a partition that doesn't show
> > up in the disklabel)?
> >
> > I wrote:
> > > > No joy, see below - mbrlabel says that it has updated the in-core
> > > > disklabel with the other partitions, but disklabel still just shows
> > > > the one partition, and mount can't find the others either:
> > >
> > > Maybe it's because the label is lost when all devices are closed.
> > > Could you run a 'sleep 3600 < /dev/rwd0d' in background before running
> > > mbrlabel ?
> >
> > Nope. Didn't help. I guess I'll update, rebuild, and try it again (I'm
> > running stuff that's a little over a month old right now). I'll report
> > back after that.
>
> Either I accidentally typed the wrong command when I tried this, or
> something has changed in the last month. Your supposition *IS* correct
> - the in-core disklabel manufactured by mbrlabel is properly in place
> if I first run the sleep 3600 command to keep a file descriptor open
> on the disk device. And it does get lost once all descriptors on the
> device in question are closed. As soon as I kill the "sleep 3600
> </dev/wd0d", the disklabel reverts to its previous state.
>
> Should I file a PR?
Please do. It looks like mbrlabel should issue a DIOCKLABEL ioctl, so that
the label is keept after last close.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--