Closed Rampftl closed 2 years ago
Hi Mic,
Best regards,
Nick
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
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
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?
I have a laptop and will try this.
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:
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
I haven't tested for Linux on gpt disk. You can try a USB flash drives with Linux partition.
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 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?
Hi,
i am testing your lib with an external ext4 disk on a usb hard disk. Under Windows 10 I plugged in the usb disk. Then I used diskpart to determine the disk number (in my case 8). I changed the Sample code to:
Sample.exe returns an exception:
Interesting is, that the disk seems to contain four partitions, but the usb disk just has one partition on it. So I assume, that the physical Disk number may not be the one which diskPart is showing me. I checked with wmic as well. The disk index für the usb disk is 8.
Do you have an idea what goes wrong?
Best Mic