Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: how to mount .aes persistent file

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    7

    how to mount .aes persistent file

    Hello All,

    I am new to Linux and to Knoppix.

    I installed Knoppix 7.0.4 on my usb stick (ext3), and I also created
    a .img persistent file which is not encrypted.
    I worked on it for few days, installed some stuff here and there, and life were good.
    I later realized I want to create an encrypted .aes persistent file,
    so I moved the knoppix-data.img file to another partition on my usb stick,
    I changed its name to "nocrypt-persist.img", and I restarted Knoppix (booted from the usb stick).
    Sure enough I got the option to create a new persistent file and I created
    a .aes file which is named knoppix-data.aes and is located in the KNOPPIX folder.

    I now want to transfer all the saved configurations form the old .img file
    to the new .aes file .

    I booted my Ubuntu laptop and connected my usb stick, with the intention
    to mount the .img file and the .aes file, and transfer data between them.

    The .img file was mounted with the command:
    sudo mount /media/sdb1/nocrypt-persist.img /media/nocrypt -o loop

    And it works like a charm. I am able to navigate into it and see its content.

    I got stuck when I tried to do the same for the .aes file .
    I tried to mount it with the command:

    sudo mount /media/sdb1/KNOPPIX/knoppix-data.aes /media/aes -o loop,encryption=aes
    It ask me for the ubuntu password (due to the "sudo") and I type it - ok .
    It then ask me for the aes password, I type it but it gives the following message:

    ioctl: LOOP_SET_STATUS: Invalid argument

    I don't want to redo everything. I want to do it the smart way
    and I want to learn to mount a .aes file .
    I exhausted google, and also exhausted Knoppix knowledge base.
    I also tried all kinds of encryption options in the mount command:
    256, aes256, but it just keeps giving the same "ioctl:...." message .

    As I mentioned above - I am stuck .

    Well, I thought it might be helpful if I add my mtab file, so here it is:

    /dev/sda5 / ext4 rw,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    none /sys sysfs rw,noexec,nosuid,nodev 0 0
    none /sys/fs/fuse/connections fusectl rw 0 0
    none /sys/kernel/debug debugfs rw 0 0
    none /sys/kernel/security securityfs rw 0 0
    none /dev devtmpfs rw,mode=0755 0 0
    none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
    none /dev/shm tmpfs rw,nosuid,nodev 0 0
    none /var/run tmpfs rw,nosuid,mode=0755 0 0
    none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
    none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
    binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
    gvfs-fuse-daemon /home/chitti/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=chitti 0 0
    /dev/sdb2 /media/Knoppix_7_on_Bla ext3 rw,nosuid,nodev,uhelper=udisks 0 0
    /dev/sdb1 /media/0AEB94CE78177026 fuseblk rw,nosuid,nodev,allow_other,blksize=4096,default_p ermissions 0 0
    /dev/sdb1 /media/sdb1 fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
    /dev/sdb2 /media/sdb2 ext3 rw 0 0
    /dev/loop0 /media/nocrypt ext2 rw 0 0


    Any assistance appreciated.

    Thank you,

    nopics.

  2. #2
    Moderator Moderator
    Join Date
    Nov 2010
    Location
    Germany/ Dietzenbach
    Posts
    1,124
    Look at:
    http://www.wp-schulz.de/summary/summary-backup.html
    http://www.wp-schulz.de/scripte/backup-script.html

    First time boot Knoppix with the not encrypted .img file and create a backup
    Second time boot Knoppix with the encrypted .aes file and restore the backup.

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    Thank you.
    I will try the backup and restore method,
    and I will post the results.
    However, can you assist with the proper way to mount an independent .aes file ?

    Thank you,

    nopics

  4. #4
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93

    A simple way

    I think you can try this:

    - Start Knoppix 7.0.4 with your new knoppix-data.aes
    - Open the root terminal an use the command:
    Code:
    mkdir /ramdisk/copy
    mount -o loop=/dev/loop6 /media/sdb1/nocrypt-persist.img /ramdisk/copy
    rsync -ax /ramdisk/copy /KNOPPIX-DATA/
    - Restart Knoppix

    Note: size of .aes >= .img
    Last edited by Blacksimon; 12-15-2012 at 11:23 PM.

  5. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    Hello All, I am still stuck. 8-(

    1. Schulz suggested backing up the .img file and then restoring it to the .aes file.

    I assumed there is a Knoppix backup tool and I looked for it in the menu but I didn't find such tool. I searched google for such a tool but didn't find anything that worked on my Knoppix 7 .

    2. I also tried to mount the .aes file - to no avail. I searched this forum, and the internet, and I realized a .aes file has to be mounted in a different way.

    I booted Knoppix without mounting any persistent file, and tried the command:
    Code:
    losetup -e aes -p 0 /dev/loop6 /path/to/my/aes
    but I got the error:
    Code:
    Cannot allocate memory, couldn't lock into memory, exiting
    I also tried to mount the .aes file from my memory stick to my Ubuntu intallation, with the comand:
    Code:
    sudo mount /path/to/aes /media/aes -o encryption=aes,keybits=256,loop
    but I got the error:
    Code:
    ioctl:LOOP_SET_STATUS:Invalid argument
    3. Blacksimon suggested something with "ramdisk" and "rsync", but I am not going to try anything I don't understand, so I didn't try it. I will appreciate any assistance with tutorial about Blacksimon suggestion.

    Thanks in advance for all who are trying to assist. nopics.

    ------------------------------------
    Please use the "Go Advanced" button to have more abilities to format the posting; before sending your posting use "Preview" to see how it looks like.
    WPS
    Last edited by Werner P. Schulz; 12-26-2012 at 12:03 PM. Reason: formatted by moderator

  6. #6
    Moderator Moderator
    Join Date
    Nov 2010
    Location
    Germany/ Dietzenbach
    Posts
    1,124
    Why didn't you follow the links I told you?

  7. #7
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    I forgot to mention that I did try the links you posted. When I switch to: /mnt-system/KNOPPIX and run the command: ./kn-backup.sh I get the message: "You have no flash disk installation". But I do have flash disk installation. I am actually booted from my flash disk installation when I activate this script. The only Knoppix installation I have is a flash disk installation. So I am still stuck. nopics.

  8. #8
    Member Blacksimon's Avatar
    Join Date
    Oct 2011
    Location
    Italy
    Posts
    93
    Hi nopics,
    there is no tutorial to follow. Mine is just one of the possible methods to copy data from a knoppix-data.img to a knoppix-data.aes

    - Boot Knoppix without mounting any persistent file
    - Open Root terminal
    - preparing the working directory where mount knoppix-data.img, you can do it wherever you want. I use the ramdisk so I do not mind having to delete when I'm done. Turn off the computer and the ram clears
    Code:
    mkdir /ramdisk/img
    - mount your knoppix-data.img in /ramdisk/img
    Code:
    mount -o loop=/dev/loop6 /path to/knoppix-data.img /ramdisk/img
    - preparing the working directory where mount knoppix-data.aes
    Code:
    mkdir /ramdisk/aes
    - mount your knoppix-data.aes in /ramdisk/aes
    Code:
    mount -t ext2 /path to/knoppix-data.aes /ramdisk/aes -o encryption=aes,keybits=256,loop
    - insert correct knoppix-data.aes password
    - copy from /ramdisk/img to /ramdisk/aes using rsync (is a file transfer program)
    Code:
    rsync -ax /ramdisk/img/* /ramdisk/aes

  9. #9
    Moderator Moderator
    Join Date
    Nov 2010
    Location
    Germany/ Dietzenbach
    Posts
    1,124
    When I switch to: /mnt-system/KNOPPIX and run the command: ./kn-backup.sh I get the message: "You have no flash disk installation".
    If you did the Knoppix flash disk installation, you'll have the file "ldlinux.sys" at "/mnt-system/" and my script kn-backup.sh test for existence of this file at this position. If you get an error message, you don't have the typical Knoppix installation.

  10. #10
    Junior Member
    Join Date
    Dec 2012
    Posts
    7
    Blacksimon:

    Thank you so much for your assistance.
    I got somewhat intimidated by your "ramdisk" mount point.
    I didn't realize it is just a simple mount point.

    I also found some explanations in this link:

    http://csulb.pnguyen.net/loopbackDev.html


    I then managed to mount the .aes file in the following way:

    losetup -e aes /dev/loop3 /mnt-system/KNOPPIX/name/of/knoppix/aes/file.aes
    mount -t ext2 /dev/loop3 /media/aes -o loop

    I also mounted the knoppix .img (non-encrypted) file with the command:
    mount -o loop /img/file/name.img /media/nocrypt

    And I was able to see the content of these 2 files and to copy files between them.

    I then unmounted the .aes file with the commands:
    umount /media/aes
    losetup -d /dev/loop3




    Schultz :


    Thank you so much for your explanation.

    You wrote:

    "If you get an error message, you don't have the typical Knoppix installation."



    and it got me thinking.
    I installed my Knoppix with unetbootin

    ( http://unetbootin.sourceforge.net/ ) ,
    so perhaps unetbootin is doing its installation
    different than the way knoppix
    is doing it.
    I want my knoppix to copy itself to the RAM, and run from the RAM,

    and I want it to only update the flash disk during shutdown,
    in order to limit flash disk write cycles.
    I also wanted to install my Knoppix to an ext2 partition
    on my usb stick, without deleting the ntfs partition on the same stick.
    Unetbootin did all that.


    Anyway, I searched for "ldlinux.sys" with the "find" command and I did not find
    this file, so I guess you are correct.

    How can I get this file ?

    I mounted the Knoppix .iso file on my usb stick
    but the file ldlinux.sys
    is not there.



    I do want to use your backup utility.



    Thank you,

    nopics.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Western Digital 1TB WD Blue PC Desktop 3.5'' Internal CMR Hard Drive - WD10EARZ picture

Western Digital 1TB WD Blue PC Desktop 3.5'' Internal CMR Hard Drive - WD10EARZ

$44.99



Western Digital 1TB WD Gold Enterprise Class SATA Internal HDD - WD1005FBYZ picture

Western Digital 1TB WD Gold Enterprise Class SATA Internal HDD - WD1005FBYZ

$84.99



Western Digital 1TB WD Blue SA510 SATA SSD Internal 2.5”/7mm Cased - WDS100T3B0A picture

Western Digital 1TB WD Blue SA510 SATA SSD Internal 2.5”/7mm Cased - WDS100T3B0A

$79.99



WD_BLACK 1TB SN850X NVMe SSD, Internal Gaming Solid State Drive - WDS100T2X0E picture

WD_BLACK 1TB SN850X NVMe SSD, Internal Gaming Solid State Drive - WDS100T2X0E

$99.99



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$19.99



Samsung - 980 PRO 1TB Internal Gaming SSD PCIe Gen 4 x4 NVMe picture

Samsung - 980 PRO 1TB Internal Gaming SSD PCIe Gen 4 x4 NVMe

$109.99



Samsung - Geek Squad Certified Refurbished 870 EVO 1TB SATA Solid State Drive picture

Samsung - Geek Squad Certified Refurbished 870 EVO 1TB SATA Solid State Drive

$67.99



2 PACK  Seagate ST1000LM035 Mobile HDD 1TB 2.5

2 PACK Seagate ST1000LM035 Mobile HDD 1TB 2.5" SATA III Laptop Hard Drive

$26.89



1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage lot picture

1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage lot

$580.99



Apple 1TB Solid State Drive for Apple MacBook Pro picture

Apple 1TB Solid State Drive for Apple MacBook Pro

$80.00