Re: resize crypted partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Friday 12 Jul 2002 21:31, Christoph Kaminski wrote:
> (Sorry for my English but I hope you can understand what I mean)

Viel besser als mein deutsch! :-)

> How can I make this encrypted partition smaller ? (I have created it
> with SUSE 8.0 Yast , it's a blow_fish encrypted partition on Ext3)
> Can I do it with GNU Parted ?

I'm assuming it's set up something like:

hda -> hda1 -> cryptoloop -> ext3

ie. the whole of hda1 is encrypted (device-backed loop), rather than having a 
filesystem on hda1 holding an encrypted file containing a filesystem 
(file-backed loop).

You probably can do it with Parted. I've never used it, though, so I'm only 
guessing.

Obviously, back up anything important before starting to mess around with the 
partition.

You'll need to resize the ext3 filesystem in the loop device first. losetup 
the device, but don't mount it. Then use resize2fs on the loop device to 
reduce the size as required. (You might want to use fdisk or parted or 
whatever to find out the correct size to aim for - reduce the partition's 
size and see what it says the size will be, then exit _without_ saving the 
changes.) After resizing the FS, losetup -d the loop device. Then adjust the 
partition's size and create the swap partition. Then you just need to run 
mkswap and add the swap partition to fstab.

I hope this has been some help to you...

Regards,
Stephen
-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux