Page 1 of 1

Partitioning process

Posted: Sun Jul 17, 2016 11:39 am
by Technoguy
What is the right way to to partition the hard disk. How can i do that in my os without using partitioning tool like fdisk or other.

Re: Partitioning process

Posted: Sun Jul 17, 2016 11:54 am
by glauxosdever
Hi,


Welcome to the forums!

Anyway, I think you should read about different partitioning schemes, like MBR and/or GPT. Then you implement a program that writes to the raw disk according to the partitioning scheme you have chosen.


Regards,
glauxosdever

Re: Partitioning process

Posted: Sun Jul 17, 2016 12:33 pm
by BenLunt
This is the enjoyment of OS development. You can do anything you wish, though you have one question to ask yourself. "Do you want to allow other software to read from the partition(s)?"

If you answer yes, then you must follow one of the already used and well known partitioning schemes. However, if you don't, and in my opinion, this is the enjoyment of what we do, you can make any partition scheme you wish.

For example, I made one a while back called the eMBR. It allows for very large disks. It is fairly easy to implement and boot from.

You can make just about anything you wish. The disk is simply a set of consecutive sectors. You decide how to allocate them...

Ben
http://www.fysnet.net/the_system_core.htm

Re: Partitioning process

Posted: Sun Jul 17, 2016 10:06 pm
by Technoguy
I like inovation, so i think i can change the total structure of mbr or gpt. In my os the fsys is GTFS(Green tea fs) my own so i will change mbr or gpt to GTS (green tea super). Is it right?

Re: Partitioning process

Posted: Sun Jul 17, 2016 11:04 pm
by Brendan
Hi,
Technoguy wrote:I like inovation, so i think i can change the total structure of mbr or gpt. In my os the fsys is GTFS(Green tea fs) my own so i will change mbr or gpt to GTS (green tea super). Is it right?
If it's not compatible with "MBR partitioning" or "GPT partitioning", then every other OS will assume the disk is unformatted and tell the user there's no partitions, and the user will probably just wipe your OS off the disk because there's "nothing" on the disk.

It'd be much smarter to retain compatibility while still doing your own thing (if you have to). Even GPT does this - it has a "protective MBR partition table" so that older software that doesn't understand GPT doesn't break everything. For a simple example; you could have a massive (MBR or GPT) partition that other OSs understand; and then sub-divide that massive partition with any scheme you like.

Of course I'd wonder why you'd want to do this at all, and why you don't just use GPT.

Note that (for my own project) there's is almost nothing that I'm not planning to break compatibility with - I'm full of "Not invented here, burn it all down and redesign the world!". Even I wouldn't consider breaking compatibility with established partitioning schemes.


Cheers,

Brendan

Re: Partitioning process

Posted: Sun Jul 17, 2016 11:35 pm
by Boris
Hi,
Remember to be nice and keep a partition that your bootloader still understands. If you use a classic bootloader and/or UEFi, you will have things to keep standard

Re: Partitioning process

Posted: Mon Jul 18, 2016 5:14 am
by Technoguy
My gts(green tea super) will contain an mbr because other os need to find. By the way , my os is xeneva

Re: Partitioning process

Posted: Mon Jul 18, 2016 5:36 am
by Techel
What are the advantages of your Partition descriptor over a gpt or mbr?