nickdu088 / SharpExt4

A .Net library to provide full access (read/write) to Linux ext2/ext3/ext4 filesystem
https://www.nickdu.com/?p=890
42 stars 9 forks source link

GPT partition #8

Closed wisper-sabrina closed 1 year ago

wisper-sabrina commented 2 years ago

Hello,

I want to mount a ext4 partition GPT, is it possible ?

Regards.

nickdu088 commented 2 years ago

No. Currently it only supports MBR.

wisper-sabrina commented 2 years ago

would it be possible to mount an ext4.img image on an ext4 gpt partition ?

nickdu088 commented 2 years ago

would it be possible to mount an ext4.img image on an ext4 gpt partition ?

Internally, it all goes through the same function call. Once GPT disk supports, GPT image will automatically be supported.

wisper-sabrina commented 2 years ago

do you plan to implement it soon ?

Thanks for your answers.

nickdu088 commented 2 years ago

No. I am busy with my own work. Can someone from the community implement GPT support?

kuttikrishnan commented 8 months ago

@nickdu088 ,

Thanks for your help and support which you provided in the past .

Please let me know if there are any way I can read from a GPT partition. Currently I am able to read from a MBR partition. Now I have a SSD which have GPT partition.

It will be great if you are able to help me on this.

Thanks and Regards, Kutti

nickdu088 commented 8 months ago

From wiki: https://en.wikipedia.org/wiki/GUID_Partition_Table It shouldn't hard to work on GPT but to jump to the EXT4 partition. You can take a look this: https://github.com/nickdu088/SharpExt4/blob/main/SharpExt4/ExtDisk.cpp#L59

I don't have time to work on GPT right now or you can extend GPT support?

kuttikrishnan commented 8 months ago

Hi @nickdu088 ,

Thanks for your response. I am not an expertise in C/C++. I normally work with Microsoft Technology stack (C#,Dotnet Core,SQLAzure...). So, I am not sure about implementing the GPT implementation.

It will be really helpful if you have any other references or code.

Regards, Kuttikrishnan.P

nickdu088 commented 1 month ago

Just added GPT disk support.

kuttikrishnan commented 4 weeks ago

@nickdu088

Thank you very much for adding GPT disk support. This is very helpful.

I have checked the [ code samples] (https://github.com/nickdu088/SharpExt4/blob/main/Sample/Program.cs) to call MBR/GPT. How can I programmatically (through C#) determine whether to open a GPT or MBR disk based on the type of USB drive?

Regards, @kuttikrishnan

nickdu088 commented 4 weeks ago

You should know your disk type? Otherwise try to read MBR/GPT first. If it fails, then try another one. I haven't tried this way.