Partitioning process

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Technoguy
Posts: 11
Joined: Sat Jul 16, 2016 3:01 am

Partitioning process

Post 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.
Last edited by Technoguy on Sun Jul 17, 2016 11:54 am, edited 1 time in total.
glauxosdever
Member
Member
Posts: 501
Joined: Wed Jun 17, 2015 9:40 am
Libera.chat IRC: glauxosdever
Location: Athens, Greece

Re: Partitioning process

Post 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
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: Partitioning process

Post 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
Technoguy
Posts: 11
Joined: Sat Jul 16, 2016 3:01 am

Re: Partitioning process

Post 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?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Partitioning process

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Boris
Member
Member
Posts: 145
Joined: Sat Nov 07, 2015 3:12 pm

Re: Partitioning process

Post 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
Technoguy
Posts: 11
Joined: Sat Jul 16, 2016 3:01 am

Re: Partitioning process

Post by Technoguy »

My gts(green tea super) will contain an mbr because other os need to find. By the way , my os is xeneva
Techel
Member
Member
Posts: 215
Joined: Fri Jan 30, 2015 4:57 pm
Location: Germany
Contact:

Re: Partitioning process

Post by Techel »

What are the advantages of your Partition descriptor over a gpt or mbr?
Post Reply