OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Partitioning process
PostPosted: Sun Jul 17, 2016 11:39 am 
Offline

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

Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Sun Jul 17, 2016 11:54 am 
Offline
Member
Member

Joined: Wed Jun 17, 2015 9:40 am
Posts: 501
Location: Athens, Greece
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


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Sun Jul 17, 2016 12:33 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
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


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Sun Jul 17, 2016 10:06 pm 
Offline

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


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Sun Jul 17, 2016 11:04 pm 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8561
Location: At his keyboard!
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.


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Sun Jul 17, 2016 11:35 pm 
Offline
Member
Member

Joined: Sat Nov 07, 2015 3:12 pm
Posts: 145
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


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Mon Jul 18, 2016 5:14 am 
Offline

Joined: Sat Jul 16, 2016 3:01 am
Posts: 11
My gts(green tea super) will contain an mbr because other os need to find. By the way , my os is xeneva


Top
 Profile  
 
 Post subject: Re: Partitioning process
PostPosted: Mon Jul 18, 2016 5:36 am 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
What are the advantages of your Partition descriptor over a gpt or mbr?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group