Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Nov 2000 13:38:30 -0700
From:      Warner Losh <imp@village.org>
To:        Randell Jesup <rjesup@wgate.com>
Cc:        Matt Dillon <dillon@earth.backplane.com>, obrien@FreeBSD.ORG, arch@FreeBSD.ORG
Subject:   Re: Like to commit my diskprep 
Message-ID:  <200011012038.NAA98734@harmony.village.org>
In-Reply-To: Your message of "01 Nov 2000 15:24:52 EST." <ybuk8anigob.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> 
References:  <ybuk8anigob.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net>  <200011011753.eA1HrCV29435@earth.backplane.com> <ybuy9z3iom7.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> <20001031132945.B28476@dragon.nuxi.com> <200010311747.KAA80353@harmony.village.org> <200011010341.eA13fCV42009@billy-club.village.org> <200011011735.KAA54300@harmony.village.org> <200011011812.LAA97417@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <ybuk8anigob.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> Randell Jesup writes:
:         I want the equivalent of the solbourne tool (along with Matt's
: mods), though from your example its UI still leaves a lot to be desired.
: I'd like to be able to specify this sort of thing using disklabel.  I'd
: like to dump disktab and make disklabel smarter about laying out
: partitions on "unknown" (read all but floppy nowadays) disks.

The UI in the Solbourne tool was good.  My example was way stripped
down.

:         Not to mention that (as best I can tell from the manpage) the
: 'auto' option to disklabel can only be used if you want it to be written
: to the disk - you can't just see what disklabel would do unless you have
: a partition to trash.  Perhaps there's a way to avoid that by ^C'ing it
: before it writes - but I DON'T trust it not to write a new label, at least
: not from the man page.

Looking at the changes, all this seems to do is to make it possible to
get the hoked up disk label.  disklabel da0s1 should already report
that.

:         I'm not against better user-level tools.  I'm against not fixing
: problems/holes in the lower-level tools.

The problem is making sure that things get fixed in the right way.
Matt's changes are a little gross, but get things fixed for now.  The
grossness comes from the hardwiring some defaults and from not using
other sources of information about the disk, but it does have the
advantage of being in -current and working as far as I can tell.  One
could just as easily construct this using DIOCGSLICEINFO and digging
around in there for the whole disk slice.

What concerns me about the patch is that it uses the whole disk slice
rather than the slice of the disk requested.  fdisk -I makes a slice
that is, typically, 63 secotors smaller than whole disk.  What also
concerns me about his patch is that he didn't use the already extant
clone_label to make sure that all of the fields were filled in
correctly.  The only "problem" with using it is that it mallocs the
new label, but a free in the code would solve that problem.  It looks
like there might be a bug with clone_label at the moment in that it
doesn't set the p_offset for the lp1->d_partions[RAW_PART] and assumes
that it is set to 0.  This should be true almost always, which is
likely why no one else has seen the problem. :-)

Now, where did I put that current box for testing...

Warner



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011012038.NAA98734>