#23 sdcreate uses size of wrong partition when creating containe

closed-fixed
None
5
2009-08-20
2009-08-06
No

Despite trying both with the GUI and command line, sdcreate insists on using the size of the second partition when creating the volume on the 3rd one.

I have used gparted to partition my 100 GB drive as follows:

Number Start End Size Type File system Flags
1 32.3kB 75.5GB 75.5GB primary ext4
2 75.5GB 76.0GB 535MB primary linux-swap
3 76.0GB 100GB 24.0GB primary

My intent is to use the last partition as an encrypted container. I have attempted to do this a number of times, both with the GUI, and via command line, with the same result. When I use the GUI, the size displayed during the creation process is around 21-24 GB. Once everything has run, and I mount the encrypted volume, its size is that of the second partition on the drive. I've gotten this result both when I've partitioned it with a half GB swap partition, and with a whole GB swap partition.

Here is the command I was running:
sudo sdcreate -c /dev/sda3 -format truecrypt6 -digest sha512 -cipher aes -gb 23.5

I'm running scramdisk via a full Ubuntu 9.04 install on an external USB hard disk. sda is my internal hard disk. I was later planning on installing ubuntu on the first partition, with the second as the swap, but my first priority is to set up the last partition as an encrypted volume

Discussion

  • Ignofibininious

    Ignofibininious - 2009-08-07

    Apparenty I was wrong. Scramdisk is simply refusing to use the third partition, and is actually using the second.

     
  • Ignofibininious

    Ignofibininious - 2009-08-07

    Actually, I take that back. It really is using the third partition, but the size of the second partition. I originally got around this by temporarily making the second partition the same size as the third, yet for some reason, once I resized the second partition, and installed Ubuntu on the HD, with the second partition as the swap drive, I was no longer able to decrypt the third. If I knew the first thing about programming, I'd try and help. >_>

     
  • Ignofibininious

    Ignofibininious - 2009-08-08
    • priority: 5 --> 8
     
  • Hans-Ulrich Juettner

    • assigned_to: nobody --> huj
     
  • Hans-Ulrich Juettner

    This is strange. I assume you are using Scramdisk for Linux 2.0.
    Would you please run
    sudo sfdisk -l
    and, when the container on /dev/sda3 is mounted,
    sdmount -i
    and post the output of both commands.

     
  • Ignofibininious

    Ignofibininious - 2009-08-12

    I have already put that drive to use and am using truecrypt on it for the time being. However, once I get some free time, perhaps this weekend, I'll see if I can duplicate the issue on a spare drive.

     
  • Ignofibininious

    Ignofibininious - 2009-08-16

    I was able to reproduce the issue on a 10GB drive using the following steps:
    1. Download, Install ScramDisk_2.0-0_Ubuntu-9.04_2.6.28_i386.deb
    2. Connect 12GB IDE drive to computer via USB adapter
    3. Create partition table as follows using gparted:
    7.81GB Ext4 (/dev/sdb1)
    502.03MB swap (/dev/sdb2)
    3.82GB Unformatted(/dev/sdb3)(to be used for encrypted volume)
    ------
    output of sudo sfdisk -l
    Disk /dev/sdb: 1583 cylinders, 255 heads, 63 sectors/track
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sdb1 0+ 1019 1020- 8193118+ 83 Linux
    /dev/sdb2 1020 1083 64 514080 82 Linux swap / Solaris
    /dev/sdb3 1084 1582 499 4008217+ 83 Linux
    /dev/sdb4 0 - 0 0 0 Empty
    ------
    4. Start scramdisk
    5. Create> Truecrypt 6 container>selected /dev/sdb3>yes I want to continue>use defaults(ripemd,AES,ext3, with size at 3914 MB)>test123 as passphrase>
    6. Wait for "Encrypting and writing container file
    7. After that finishes, check "default mount points", and click mount
    8. Truecrypt GUI shows /dev/sdb3 mounted at /media/scramdisk01, format truecrypt 6 with AES, ripemd160, FS ext3, Size: 501 MB
    Output of sudo sdmount -i
    lucas@lucas-desktop:~$ sudo sdmount -i
    Device Owner Container MountPoint Format Cipher Digest FS Timeout Mode Size VolumeSize EncrypionOffset EncryptionSize Created
    ================================================================================================================================================================================
    /dev/scramdisk/vol01 root /dev/sdb3 /media/scramdisk01 TC6 AES Ripemd160 ext3 - rw 501 MB 3914 MB 131072 B 4104152064 B Sun Aug 16 16:45:34 2009
    /dev/scramdisk/vol02 - not mounted
    ...and so on till
    /dev/scramdisk/vol15 - not mounted

     
  • Hans-Ulrich Juettner

    • status: open --> closed-fixed
     
  • Hans-Ulrich Juettner

    The kernel driver got the size information for the wrong partition.
    This bug only affects kernel 2.6.28 or higher.
    The bug was fixed in release 2.0-1.
    New file releases were published for Ubuntu 9.04 and Fedora 11
    only since only these distributions have kernels 2.6.28 or higher.
    Thanks for the bug report.

     
  • Hans-Ulrich Juettner

    • priority: 8 --> 5
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks