Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2008 09:19:40 -0500 (CDT)
From:      Scott Bennett <bennett@cs.niu.edu>
To:        jerrymc@msu.edu
Cc:        freebsd-questions@freebsd.org
Subject:   Re: looking for a disk partition ("slice") editor
Message-ID:  <200809211419.m8LEJe3Y026683@mp.cs.niu.edu>

next in thread | raw e-mail | index | archive | help
     On Sun, 21 Sep 2008 09:25:19 -0400 Jerry McAllister <jerrymc@msu.edu>
wrote:
>On Sun, Sep 21, 2008 at 07:00:39AM -0500, Scott Bennett wrote:
>
>>      I would like to find a disk partition ("slice" in FreeBSD nomenclature)
>> editor that runs under FreeBSD that is able to deal properly with logical
>> partition entries chained from an extended partition entry in the Master Boot
>> Record.  fdisk(8) appears to be too primitive to understand logical partitions.
>
>I am not clear about what you are trying to do, but fdisk should not 
>be mucking with so-called logical partitions.   FreeBSD does not 

     As I wrote already, I do know that fdisk(8) does not understand
logical partitions, so forget fdisk.  I'm looking for something that
does understand them.

>really deal with 'logical' partitions'.    Anyway, they are more akin

     It certainly does.  I've been using them since I first installed
FreeBSD 5.2.1 in 2005, and FreeBSD understands them just fine.  The
FreeBSD boot loader is another matter, but it's probably not big enough
to be that smart.

>to FreeBSD partitions than slices.   Slices are the primary division

     No, they are not.  They exist because the design for the Master Boot
Record only has four entries, which originally limited one to having no
more than four disk partitions.  If one needs more partitions than four,
then one must use one of the four MBR entries as an entry for the Extended
Partition, which anchors a chain of small descriptors that each contain
a) a logical partition entry and b) a pointer to the next descriptor in
the chain.  A disk partition that has a type of 165 (IIRC) is a FreeBSD
slice.  It matters not whether that partition is a primary partition or a
logical partition.  The kernel is smart enough to understand the logical
partition chain.

>and partitions are the subdivisions.    fdisk handles creating slices 

     A FreeBSD partition is a subdivision of a FreeBSD slice, which is
just a disk partition, either primary or logical, of type 165.

>and MBRs.  For partitions you use bsdlabel and it handles the boot
>record that the MBR hands control off to.

     Yes, yes.  So what?  I need something smarter than fdisk, so that
I don't have to shut down the system in order to rearrange disk partitions
on a disk that does have a logical partition chain.  fdisk will wipe out
the chain, rather than giving me any way to change the contents of the
chain.  Part of that chain contains several partitions holding images of
another system that I do not wish to lose at this point.
>
>>      Until now I have gotten by with a stand-alone partition editor, but I now
>> need to be able to do such operations without shutting down my FreeBSD system
>> to do them.  If anyone knows of such a utiility for use in FreeBSD, please
>> let me know.  (Please Cc: me on any replies, too.)
>
>Generally, you don't want to mess with slices or in MS terminology "primary
>partitions" with the system running - even if you can find a way.
>
     Ah, but I do.  My current problem is a case in point.  I have a drive
that I'm not currently using, but that has stuff on it I don't want to lose
(e.g., the images of another system).  I want to set it up for use.  I do not
want to shut everything down just so that I can set it up for use.  Right now
the nine or ten partitions on it include three or four (I don't remember
right now) FreeBSD slices.  (The FreeBSD slices are further subdivided into
FreeBSD partitions, but that is irrelevant because I intend to wipe out
their contents anyway.)  With the exception of the partitions holding
backup images of another system, nothing is arranged on that drive the way
I want it arranged now, so I need to be able to rearrange it without
disturbing everything else currently running on the system.  There are other
situations, too, that arise from time to time that I would like to be able
to deal with and not have to shut down FreeBSD to do that.
     Anyway, back to my original question for anyone who can help:  does
anyone know of a disk partition editor that will allow me to manipulate
the logical partitions, as well as the primary partitions, and that runs
under FreeBSD?


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:       bennett at cs.niu.edu                              *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



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