You are not logged in.

#1 2011-09-27 12:56:38

ds2011
Member
Registered: 2011-07-29
Posts: 9

How to access unused space on a harddisk ? crypt this without part.

Hello,
i try to use unused space on a harddisk without a device-file.

My harddisk:

/dev/sda1    /boot
/dev/sda2   SWAP
/dev/sda5   /

and the free/unused space after this partitions i like to use for cryptsetup luksFomat
but i dont know how to access this.

i dont like create a partition (like /dev/sda6) to hide the crypt space, i think a unused partition is treasonously.
i can crypt /dev/sda an create LVM on sda, but then the harddisk looks like empty thats treasonously too.

thanks

Offline

#2 2011-09-27 16:04:51

PaulBx1
Member
Registered: 2008-10-18
Posts: 142

Re: How to access unused space on a harddisk ? crypt this without part.

Wow, you must live in a tough place.

One might get a microSD card and plug it into your card reader when you need it, hiding it otherwise. These are very tiny cards and easy to hide.

Truecrypt.org might have some ideas for you. But if you are arrested and trying to prove you have nothing "subversive" on your computer, you are already in a very bad situation no matter how good the technical means you have to hide things on your disk and anyway having truecrypt on your computer is incriminating. Can torture be ruled out? It can't even in the US any more (look up the phrase "extraordinary rendition"). It may be better to take Solzhenitsyn's advice:

"And how we burned in the camps later, thinking: What would things have been like if every Security operative, when he went out at night to make an arrest, had been uncertain whether he would return alive and had to say good-bye to his family? Or if, during periods of mass arrests, as for example in Leningrad, when they arrested a quarter of the entire city, people had not simply sat there in their lairs, paling with terror at every bang of the downstairs door and at every step on the staircase, but had understood they had nothing left to lose and had boldly set up in the downstairs hall an ambush of half a dozen people with axes, hammers, pokers, or whatever else was at hand? . . ."

Last edited by PaulBx1 (2011-09-27 16:13:49)

Offline

#3 2011-09-28 16:36:39

jpk
Member
Registered: 2011-09-27
Posts: 13

Re: How to access unused space on a harddisk ? crypt this without part.

Have you tried creating an encrypted file image and using dd to copy the file there?

dd if=encrypted-image.dd of=/dev/sda seek=<offset>

Please note, by default dd uses a bs=512, so seek is a multiple of it. for the crypted image you should create a loop device.
losetup also provides an offset parameter, you can directly address the image at the end of the partition.

Offline

#4 2011-09-28 16:55:14

jakobm
Member
Registered: 2008-03-24
Posts: 132

Re: How to access unused space on a harddisk ? crypt this without part.

Yes, this is possible with losetup. You just need to know the partition beginnings and sizes.

Sample invocation:

losetup --offset 2100000K --sizelimit 500M -f /dev/sdx

You can then make a filesystem on /dev/sdx and mount it.

Please be sure not to overwrite any important data on the disk, offset/size calculation is essential here.

Last edited by jakobm (2011-09-28 16:55:25)

Offline

#5 2011-10-10 08:15:21

ds2011
Member
Registered: 2011-07-29
Posts: 9

Re: How to access unused space on a harddisk ? crypt this without part.

thanks jakobm
it works very good!

but how to boot from the hidden system with grub ?

i have a iso file with keyfile

kernel /boot/vmlinuz-linux cryptdevice=/dev/loop0:myvg root=/dev/mapper/myvg-root ro cryptkey=/dev/sr0:iso9660:/keyfile vga=795
initrd /boot/initramfs-linux.img

but the losetup-funktion from busybox do not support "--offset 2100000K --sizelimit 500M -f /dev/sdx"

Offline

#6 2011-10-10 10:11:44

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: How to access unused space on a harddisk ? crypt this without part.

Quite simple -- don't use the losetup binary from busybox. Add /sbin/losetup to BINARIES in /etc/mkinitcpio.conf and regenerate.

Offline

Board footer

Powered by FluxBB