Opened 14 years ago

Closed 14 years ago

#3546 closed enhancement (fixed)

Information regarding DriveSetup implementation

Reported by: mmadia Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/DriveSetup Version:
Keywords: Cc: pieter@…
Blocked By: Blocking:
Platform: All


This ticket is to help consolidate details of implementing missing features in DriveSetup.

Partitioning support in Alpha/1 from [haiku-development] This entire thread should be read.

boot manager error from [haiku-development]

No you didn't miss anything, Create and Delete and still showing as (not implemented).

Correct. It's not only DriveSetup, the problem is the unfinished disk device add-ons (with regard to write support). There are two add-ons, one for "Intel Partition Map", which handles (the four) primary partitions and "Intel Extended Partition", which handles "logical partitions" when one of the primary is an extended partition. The later is unfinished and the former could use some work as well. Initially, I was on the wrong track with regards to representing the options in DriveSetup. For example, there is no such thing as a "logical partition" in the on disk structures. There is multiple conventions for partition layout, different operating systems support different stuff, a great potential for screw ups here. So I didn't explore this any further for the time being, I have a pile of uncommited changes that I did before realizing there are no "logical partitions" (as a type). When a partition is created, it is actually created with the type of the file system, I thought one could create a partition and then decide on the file system, wrong. Need to get back to that sometimes...

misc thread from [haiku]: I've looked into this before and some of the stuff which is missing in the kernel is really not obvious. I tried to start with a clean drive, but there is already a problem, the Haiku kernel does not assign a disk system (Intel Partition Map?, EFI GUID?, Amiga Disk System?) to that. But most operations, like even getting the list of available disk systems in a user program, require a valid object hierarchy in the kernel. Personally, I don't regard it as critical for Alpha1 but it would be nice if someone finally tackled this for real. It must be done sometimes... :-) Maybe Ingo and I could both mentor this.

Another reply, from the same thread from [haiku]

How do you initialise a partition as BFS?

The disk system has to be already established. Ie it needs to be Intel Partition Map, and the partition needs to exist. At least DriveSetup allows you to initializes whole drives, but then there is no disk system. The file system in this case starts at offset 0. No MBR or anything like that. Why initializing doesn't work in your particular case, I do not know.

Change History (4)

comment:1 by PieterPanman, 14 years ago

Cc: pieter@… added

Is it an idea to use libparted and ntfsprogs/libntfs as the backend for file system manipulations? It is well maintained and heavily tested. You even get NTFS resize functionality with libntfs. I know I've resized several NTFS volumes with it, successfully. I guess there are two options:

1) Make the unfinished disk device add-ons use libparted and libntfs, and let drivesetup use the disk device add-ons. (preferred I guess)

2) Let drivesetup be like GParted, which directly uses libparted and libntfs. (not really in line of what Haiku is doing now)

I'm not quite sure about licensing issues, but if you just use the library, you don't have to GPL your own code, right?

in reply to:  1 comment:2 by korli, 14 years ago

I'm not quite sure about licensing issues, but if you just use the library, you don't have to GPL your own code, right?

Err, no, this would only be right with LGPL.

comment:3 by PieterPanman, 14 years ago

Ah, shoot, I forgot about that, thanks for the refresher:

Can we write a wrapper around it to make it a standalone program/service, publish that as GPL, and connect with the wrapper through messages/ports/whatever? It would be such a shame to have to write all this functionality over again.

In it states: "However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program."

comment:4 by mmadia, 14 years ago

Resolution: fixed
Status: newclosed

Seeing as Bryce Groff has been progressing quite well with his GSoC project to implement this, closing-->fixed

Note: See TracTickets for help on using tickets.