The time now is Thu 23 May 2013, 22:13
All times are UTC - 4 |
| Author |
Message |
Karl Godt

Joined: 20 Jun 2010 Posts: 2677 Location: Kiel,Germany
|
Posted: Sun 23 Oct 2011, 21:22 Post subject:
creating and mounting of encrypted savefiles in ext3 + ext4 |
|
I am not the fastest and the brightest , but it seems that i got it working to run on aes heavy encrypted savefiles .
[edit=2011-10-27]
TARBALL deleted due to the BUG in POST #2
ACTUAL TARBALL @ POST #3
The tarball is modified to create also ext4 savefiles and to create both ext3 and ext4 savefiles in both encryptions : '-E 1' and '-e aes' at shutdown from PUPMODE=5 .
and to mount these correctly at boot .
[/edit]
rc.shutdown and init are from DISTRO_NAME='Drake Puppy' DISTRO_VERSION=0.3 from summer this year -- so not the newest !!
I have only tested it several boots for an aes encrypted ext3 savefile today and it works .
I still have to test the three other possibilities aes|ext4 cryptoloop|ext3|ext4 and of course would need on ext2 again also .
Bug reports welcome !
Last edited by Karl Godt on Thu 27 Oct 2011, 14:40; edited 1 time in total
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2677 Location: Kiel,Germany
|
Posted: Mon 24 Oct 2011, 07:35 Post subject:
|
|
BUG for ext4 :
The saving to the save file did not work due to the default definitions in the PUPMODE=128 case :
| Code: | @@ -883,11 +939,13 @@ case $PUPMODE in
echo "Saving session to $SAVEFILE file on $SAVEPART partition..." >/dev/console
mkdir /tmp/save1stpup
echo -n "Mounting ${SAVEFILE}..."
- FILEFS="ext3"
+ FILEFS="ext4"
+ [ ! "`echo -n "$SAVEFILE" | grep "3fs"`" = "" ] && FILEFS="ext3"
[ ! "`echo -n "$SAVEFILE" | grep "2fs"`" = "" ] && FILEFS="ext2"
if [ "$CRYPTO" = "" ];then
|
The line numbers 883/939 may not be correct , due to other added lines by me .
I just add this short notice for preventing disappointments
I now know how it is to boot an empty save-file with the
^update feature of /etc/rc.d/rc.update ^ :
no wallpaper because rox refuses to work with .jpg , only few icons in /usr/local/lib/X11/pixmaps , only few icons show in /usr/share/applications ...
NeverTheLess :
/dev/loop1 on /initrd/pup_rw type ext4 (rw,noatime,user_xattr,barrier=1,data=ordered)
PREVUNIONRECORD=''
LASTUNIONRECORD='drakesave_crypta-ext4_II.4fs puppy_drake_0.3.sfs'
EXTRASFSLIST='devx_drake_0.3.sfs'
[edit=2011-10-27]
Newer Tarball in Post #3 below
[/edit]
Last edited by Karl Godt on Thu 27 Oct 2011, 14:43; edited 1 time in total
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2677 Location: Kiel,Germany
|
Posted: Wed 26 Oct 2011, 12:24 Post subject:
|
|
So far everything sorks :
Booted an one year old puppy-luma-001
PREVUNIONRECORD='lumasave_cryptx-ext3_x_I.3fs puppy_luma_0.0.1.sfs'
LASTUNIONRECORD='lumasave_cryptx-ext3_x_I.3fs puppy_luma_0.0.1.sfs'
/dev/loop1 on /initrd/pup_rw type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
The namings had changed in the DISTRO_SPECS file and it took me some time to figure it out .
What I can tell is , that the cryptx file gets mounted , even if no cryptoloop.ko inserted ( /etc/modules/DOTconfig-k2.6.33.2-27MAY2010-LUPU-SMP-TICKLESS ) . I could `ls` the files in the cryptx save-file with no problems from the pfix=rdsh ( used the drake-initrd.gz without adjusting the modules )
After I changed the kernel to the drake kernel :
# lsmod
Module Size Used by
cryptoloop 1523 0
fuse 47824 0
aufs 120713 33
squashfs 19321 1
floppy 42115 0
# mount
rootfs on / type rootfs (rw,relatime)
/dev/sda1 on /initrd/mnt/dev_save type ext2 (rw,noatime,errors=continue)
/dev/loop1 on /initrd/pup_rw type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
unionfs on / type aufs (rw,relatime,si=4c078e37)
tmpfs on /tmp type tmpfs (rw,relatime,size=622264k)
none on /proc type proc (rw,relatime)
none on /dev/pts type devpts (rw,relatime,gid=2,mode=620)
none on /sys type sysfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,relatime,size=107716k)
it booted to desktop
below the fixed files needed for all this , will delete the two attachments in the posts above tomorrow
 |
| Description |
tar -tjf /root/Encrypted_files-FIXED-II.tar.bz2 | sort -d | cut -f 2 -d '/ init init.FIXED-II.diff init-orig rc.shutdown rc.shutdown.FIXED-II.diff rc.shutdown-orig
|

Download |
| Filename |
Encrypted_files-FIXED-II.tar.bz2 |
| Filesize |
47 KB |
| Downloaded |
118 Time(s) |
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|