DragonFly users List (threaded) for 2008-12
DragonFly BSD
DragonFly users List (threaded) for 2008-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: fdisk implementation

From: Jeremy Chadwick <jdc@xxxxxxxxxxxx>
Date: Wed, 17 Dec 2008 01:03:04 -0800

On Tue, Dec 16, 2008 at 10:20:53PM +0100, Jost Tobias Springenberg wrote:
> Ok, 
> after two months of using hammer (which does all of the work that I want it to in a nice and decent way :)).
> The point of no return is closing in and I am planning to switch 3 backup machines to hammer in the long run.
> Therefore this project also made its way to my working pile, as it is something I want to have. 
> I have done some research on various partitioning tools and here is what I think:
> Linux based partition programs:
> -------------------------------
> The linux cfdisk has a quite nice interface and seems to produce good partition tables.
> 	- it does not handle fitting in a partition in between two others nicely 
> 	  (aligning og the new partition)
> The linux fdisk seems to be a bit weird and at least once produced a wrong partition table
> for me.
> 	+ it can interact with BSD disk labels
> The linux sfdisk also seems to have a lot of well working features to it,
> but the user interface is even worse than the one we have in dfly.
> Parted is probably the nices program around but imho its scope is too wide to
> be useful as the standard partitioning tool. 
> BSD based tools:
> ----------------
> OpenBSD fdisk works similiar to our fdisk, although the interactive mode is a bit better
> structured.
> The FreeBSD sfdisk implementation is easy to understand, but has extreme limitations 
> and seems to also not be the best friend of FreeBSD developers.
> As for the OpenBSD fdisk I have however not really looked at the code here.
> After taking a look at these implementations I realized that the best way to tackle this 
> problem might be to take the fdisk we have right now, keep its basic functionality for 
> the users, audit the code and replace the interactive mode completely by a ncurses based version.
> In the process of this replacement it would also be useful to add the following features:
> 	+ make it easier for unexperienced users to specifying partition size / start- and endpoints 
> 	+ basic support for disklabels (maybe it is possible to simply interact with the disklabel tool here)
> 	+ add something like a "magic key" that aligns the partition with the next/previous
> 	  partition automatically (as it appears in minix)
> I have started to review the code and will begin to implement this after one more week of
> other work to be done. Usually I am not a big fan of announcing such a simple project before it is done
> but I imagine some of you might have their objections / additions to the list I compiled here.
> If you happen to be such a someone feel free to reply to this post.
> Thank you,
> 	Tobias


FreeBSD has a tool called sade(8), which is commonly known as the
"partitioning/slicing and labelling piece of the FreeBSD installer".
Most people are familiar with this.  It's curses (and dialog?)-based.
There's also a "Wizard" mode in sade which I've looked at, but never
tried using.

There are things about sade I dislike.  If you want a list of them, I
can spend some time making a list.  There are two I have on my mind
right now -- lack of ability to move or shift slices around, and the
descriptions used for non-BSD slices.

Linux cfdisk addresses some of the qualms I have with sade, but Linux
cfdisk in general is disgusting.  It does make a mess of terminals in
some circumstances (depends on what you're doing).  I can spend some
time providing you a list of problems with cfdisk as well, if you want.

That said, I've never liked FreeBSD fdisk -- I'm assuming DFBSD uses the
same fdisk as FreeBSD.  I will admit that it's incredibly useful for
very low-level situations.  I've never liked it because the format of
the data it outputs is "cryptic", meaning it's hard on the eyes.

As for OpenBSD fdisk -- assuming it's the tool you get thrown into
during an install of OpenBSD -- I hate it.  The main reason is that it's
begging the user to make mistakes; using single-character commands is
asking for trouble; highly error-prone.

Keep something in mind when it comes to this stuff:

Even skilled administrators will often choose tools which diminish the
amount of effort required.  For example, I'm very familiar with
bsdlabel, fdisk, and boot0cfg on FreeBSD -- but I use sade for almost
everything.  I'm familiar enough with the low-level tools that I
feel justified in using the easier ones, if that makes any sense...

| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]