Code Monkey home page Code Monkey logo

Comments (9)

nickdu088 avatar nickdu088 commented on June 27, 2024

Hi Mic,

  1. Did you follow these steps? You have to ensure the admin permission.
  2. Did you use the correct disk number? From the error, it seems not EXT4 file system. Disk number "8" seems not correct. Normally, PC has 4 SATA ports and few USB ports. Are you sure you have 8 physical disks installed?

Best regards,

Nick

from sharpext4.

Rampftl avatar Rampftl commented on June 27, 2024

Hi Nick,

its correct, I have 8 Disks on my machine (XEON Workstation with 10 Sata Ports) I admit this is not a mainstream computer :)
I did the steps you mentioned in 1), but it seems that I have a PlatformToolset issue. V142 is missing on my computer. I found this after abandoning Visual Studio and starting Jetbrains Rider. The error messages there are far more understandable.

I will try to fix this and come back to you with the result asap.

Best regards
Mic

from sharpext4.

Rampftl avatar Rampftl commented on June 27, 2024

Hi Nick,
sorry not replying for so long. I was absorbed by other parts of my project. Now I am back on the Linux issue.
I guess my problem is, how i compile. When compiling the lwext4 lib a lot of conversion warnings arrise with lots of "possible loss of data".
My properties in VS2019:
Windows SDK Version 10.0
Platform Toolset Visual Studio 2019 (v142)
C++ Language Standard ISO C++ 14
C Language Standard Legacy MSVC

How are your settings when compining and building the Sample App?

Best
Mic

from sharpext4.

nickdu088 avatar nickdu088 commented on June 27, 2024

Hi Nick, sorry not replying for so long. I was absorbed by other parts of my project. Now I am back on the Linux issue. I guess my problem is, how i compile. When compiling the lwext4 lib a lot of conversion warnings arrise with lots of "possible loss of data". My properties in VS2019: Windows SDK Version 10.0 Platform Toolset Visual Studio 2019 (v142) C++ Language Standard ISO C++ 14 C Language Standard Legacy MSVC

How are your settings when compining and building the Sample App?

Best Mic

It shouldn't be a problem. Can you try another PC with fewer disks or follow the steps earlier?

from sharpext4.

Rampftl avatar Rampftl commented on June 27, 2024

I have a laptop and will try this.

from sharpext4.

Rampftl avatar Rampftl commented on June 27, 2024

Hi Nick,
finally I managed to run the Sample on my laptop. For that I modified the Sample Program.cs to access a physical disk:

Program.cs.txt

My laptop has a gpt formatted disk 0 with partitions for Windows and linux and a mbr formatted disk 1 with one windows partition on it.

Calling the sample.exe for disk 0 I get:

C:\Users\Mic\RiderProjects\SharpExt4\Sample\bin\Debug>Sample.exe 0 1 Partition 0 : SharpExt4.Partition EXCEPTION: Could not mount partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition.

Only four partitions are found, but the disk contains more partitions:
`DISKPART> sel disk 0

Datenträger 0 ist jetzt der gewählte Datenträger.

DISKPART> list part

Partition ### Typ Größe Offset


Partition 1 System 190 MB 1024 KB
Partition 2 Reserviert 128 MB 191 MB
Partition 3 Primär 156 GB 319 MB
Partition 4 Primär 67 GB 156 GB
Partition 5 Unbekannt 1907 MB 223 GB
Partition 6 Unbekannt 119 GB 225 GB
Partition 7 Unbekannt 119 GB 345 GB
Partition 8 Unbekannt 238 GB 464 GB
Partition 9 Primär 230 GB 702 GB
Partition 10 Wiederherstellun 990 MB 933 GB
Partition 11 Wiederherstellun 18 GB 933 GB
Partition 12 Wiederherstellun 1644 MB 952 GB`

Partition 10,11 and 12 are from the Laptop Manufacturer.
Partition 5,6,7,8 are the Linux partitions which I want to mount
Partition 3,4,9 are the Windows partitions (Windows 10)

So the question is:
Is there a problem when building the lib and the exe (when compiling I got a lot of conversion warnings)?
Do I access the disk in a wrong way?

Best
Mic

from sharpext4.

nickdu088 avatar nickdu088 commented on June 27, 2024

I haven't tested for Linux on gpt disk. You can try a USB flash drives with Linux partition.

from sharpext4.

Rampftl avatar Rampftl commented on June 27, 2024

I created an MBR formatted USB stick with one ext4 partition on it with my linux system.
Then I booted Windows again and plugged in the stick. Using the Sample.exe gives:
C:\Users\Mic\RiderProjects\SharpExt4\Sample\bin\Debug>Sample.exe 2 1 Partition 61529391104 : SharpExt4.Partition EXCEPTION: Could not mount partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition.

Now I can see the size of the partition, but again it lists me 4 partition even if there is only one on the disk.
And a mount is not working: "EXCEPTION: Could not mount partition"

from sharpext4.

nickdu088 avatar nickdu088 commented on June 27, 2024

I created an MBR formatted USB stick with one ext4 partition on it with my linux system. Then I booted Windows again and plugged in the stick. Using the Sample.exe gives: C:\Users\Mic\RiderProjects\SharpExt4\Sample\bin\Debug>Sample.exe 2 1 Partition 61529391104 : SharpExt4.Partition EXCEPTION: Could not mount partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition. Partition 0 : SharpExt4.Partition EXCEPTION: Could not register partition.

Now I can see the size of the partition, but again it lists me 4 partition even if there is only one on the disk. And a mount is not working: "EXCEPTION: Could not mount partition"

I don't know how you make the USB. Can you download the Raspberry Pi image and burn to USB?

from sharpext4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.