Comments (2)
I'm a bit at a loss here. Can you try with the following patch and tell me what it says?
Oh boy, that makes no sense, my patch. not my day. Here is an updated one:
diff --git i/io.c w/io.c
index a862422..998d9d7 100644
--- i/io.c
+++ w/io.c
@@ -294,6 +294,8 @@ get_disk_info(const char *dev, disksz_t *blocks, size_t *bsize)
*blocks = (disksz_t)(nbytes / blocksz);
*bsize = (size_t)(blocksz);
+ printf("dev: %s, nbytes: %ju, blocksz: %d, blocks: %ju\n", dev, nbytes, blocksz, (uint64_t)*blocks);
+
close(fd);
return 0;
}
from tc-play.
It appears this bug is not present in the latest sources. I downloaded the .zip from github and compiled it with your printf, and that version does the right thing.
I also noticed that tcplay v1.1 from the Debian repo states it will "Completely erase EVERYTHING on /dev/sdb1" when -z is specified; the locally compiled tcplay does not.
Closing this bug.
root@dmz1:~/bin# fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
81 heads, 63 sectors/track, 191411 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000098ec
Device Boot Start End Blocks Id System
/dev/sdb1 2048 976773167 488385560 83 Linux
root@dmz1:~/bin# ./tcplay -c -d /dev/sdb1 -z
dev: /dev/sdb1, nbytes: 500106813440, blocksz: 512, blocks: 976771120
Passphrase:
Repeat passphrase:
Summary of actions:
-
Create volume on /dev/sdb1
Are you sure you want to proceed? (y/n) y
Creating volume headers...
Depending on your system, this process may take a few minutes as it uses true random data which might take a while to refill
Writing volume headers to disk...
All done!
root@dmz1:~/bin# tcplay -i -d /dev/sdb1
Passphrase:
Device: /dev/sdb1
PBKDF2 PRF: RIPEMD160
PBKDF2 iterations: 2000
Cipher: AES-256-XTS
Key Length: 512 bits
CRC Key Data: 0x6c0e771b
Sector size: 512
Volume size: 976770608 sectors
IV offset: 256
Block offset: 256
root@dmz1:~/bin# /usr/sbin/tcplay -c -d /dev/sdb1 -z
Passphrase:
Repeat passphrase:
Summary of actions:
-
Completely erase EVERYTHING on /dev/sdb1
-
Create volume on /dev/sdb1
Are you sure you want to proceed? (y/n) y
Creating volume headers...
Depending on your system, this process may take a few minutes as it uses true random data which might take a while to refill
Writing volume headers to disk...
All done!
root@dmz1:/bin# tcplay -i -d /dev/sdb1/bin# /usr/sbin/tcplay --version
Passphrase:
Device: /dev/sdb1
PBKDF2 PRF: RIPEMD160
PBKDF2 iterations: 2000
Cipher: AES-256-XTS
Key Length: 512 bits
CRC Key Data: 0xf7458bf9
Sector size: 512
Volume size: 3692080 sectors
IV offset: 256
Block offset: 256
root@dmz1:
tcplay v1.1
root@dmz1:~/bin# ./tcplay --version
tcplay v2.0
from tc-play.
Related Issues (20)
- Mac OS X support HOT 3
- Error opening /dev/sdb1 HOT 2
- segmentation fault with NULL as second argument to tc_api_task_set() HOT 1
- Invalid cipher: AES-256-XTS,TWOFISH-256-XTS HOT 1
- Memory leak? HOT 3
- ability to mount truecrypt containers without root privileges HOT 2
- Cannot allocate more than 4GB for hidden volume on 5GB disk HOT 1
- tc-play-2.0/tcplay.c:187: bad loop HOT 1
- Some memory issues HOT 1
- can't mount volume - invalid name HOT 2
- Grey screen not move HOT 1
- tcplay hangs at the device mapper stage HOT 6
- Is this project abandoned? HOT 5
- Open container arch hangs HOT 10
- [Feature request] Add support for VeraCrypt PIM
- Added key + PW functionality not working on armv7h
- Arch Wiki Documentation
- tcplay -c hangs after some GB HOT 3
- Weird (old ?) volume not supported HOT 4
- Please add read Password from file or from stanadard in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tc-play.