Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X porting #1

Open
ilovezfs opened this issue Nov 28, 2015 · 3 comments
Open

OS X porting #1

ilovezfs opened this issue Nov 28, 2015 · 3 comments
Assignees
Labels

Comments

@ilovezfs
Copy link

Just a heads up that I ported your ddrescue-verify to OS X.

Maybe these changes could be upstreamed with an operating system check?

https://github.com/ilovezfs/ddrescue-verify/tree/osx_porting
https://github.com/ilovezfs/tinolib/tree/osx_porting

It seems to work:

$ mkfile 256m testfile.img
$ hdid -nomount testfile.img 
/dev/disk2                                              
$ diskutil partitionDisk disk2 1 GPTFormat hfs+ testddrescueverify 100%
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for the disks to reappear
Formatting disk2s1 as Mac OS Extended with name testddrescueverify
Initialized /dev/rdisk2s1 as a 256 MB HFS Plus volume
Mounting disk
Finished partitioning on disk2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *268.4 MB   disk2
   1:                  Apple_HFS testddrescueverify      268.4 MB   disk2s1
$ cp ~/Downloads/Finder_360.spindump.txt /Volumes/testddrescueverify/
$ cp ~/Downloads/Kernel_Debug_Kit_10.11.1_Build_15B42.dmg /Volumes/testddrescueverify/
$ ddrescue /dev/disk2 drive.img drive.map
GNU ddrescue 1.20
Press Ctrl-C to interrupt
rescued:   268435 kB,   errsize:         0 B,    current rate:  56229 kB/s
   ipos:   268435 kB,    errors:         0,      average rate:  67108 kB/s
   opos:   268435 kB,  run time:          4s,  remaining time:         n/a
time since last successful read:          0s
Finished                                     
$ ./ddrescue-verify drive.img drive.map > drive.check
$ ./ddrescue-verify -i /dev/disk2 drive.check > drive.verify
0:00:02 116.84MiB 00000116 58.42MiB/s 0x000007400000-0x000007400000 58.424MiB/s
$ dd if=/dev/urandom of=/dev/disk2 bs=512 count=100
100+0 records in
100+0 records out
51200 bytes transferred in 0.010688 secs (4790389 bytes/sec)
$ ./ddrescue-verify -i /dev/disk2 drive.check > drive.verify2
error: /dev/disk2 at 0(100000): md5sum mismatch: wanted=963ce3ab3748d7bf98ef302a8a140ad7 got=7e7ae2022f3071938aaad43a93f4139e
0:00:02 111.12MiB 00000111 55.56MiB/s 0x000006f00000-0x000006e00000 55.563MiB/s
$ ddrescue -f drive.img /dev/disk2 drive.restore
GNU ddrescue 1.20
Press Ctrl-C to interrupt
rescued:   268435 kB,   errsize:         0 B,    current rate:  30146 kB/s
   ipos:   268369 kB,    errors:         0,      average rate:  33554 kB/s
   opos:   268369 kB,  run time:          8s,  remaining time:         n/a
time since last successful read:          0s
Finished
$ ./ddrescue-verify -i /dev/disk2 drive.check > drive.verify3
0:00:06 223.80MiB 00000223 37.30MiB/s 0x00000df00000-0x00000df00000 37.300MiB/s
@hilbix hilbix added the bug label Nov 28, 2015
@hilbix hilbix self-assigned this Nov 28, 2015
@hilbix
Copy link
Owner

hilbix commented Nov 28, 2015

Thanks for the report. I try to assemble an updated version of tinolib which hopefully fixes your issues. Unfortunately I do not have OS-X, so I cannot test it myself.

@hilbix
Copy link
Owner

hilbix commented Nov 28, 2015

The thing around posix_memalign not yet solved

@hilbix
Copy link
Owner

hilbix commented Dec 6, 2015

Again updated version pushed, still I am not completely sure how to fix posix_memalign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants