Code: Select all
head -c 15 /dev/urandom | uuencode -m - | head -2 | tail -1Code: Select all
echo "zZEomoTvDgFTfRz+o7RN" | /sbin/losetup -e AES256 -p 0 -S djYFGvsKuiMIJkerw3H8 /dev/loop4 /dev/hdb5
Code: Select all
dd if=/dev/hdb5 of=/dev/loop4 bs=64k conv=notruncCode: Select all
#!/sbin/runscript
depend() {
before modules
}
start() {
ebegin "Starting loop setup for /usr/local"
echo "zZEomoTvDgFTfRz+o7RN" | /sbin/losetup -e AES256 -p 0 -S djYFGvsKuiMIJkerw3H8 /dev/loop4 /dev/hdb5
eend $? "Failed to start loop setup!"
}
Code: Select all
chmod 700 /etc/init.d/loopsetupCode: Select all
rc-update add loopsetup boot
Code: Select all
/dev/loop4 /usr/local ext3 noauto,noatime 0 0
Code: Select all
/bin/mount /usr/local
Code: Select all
loop: loaded (max 8 devices)
Encrypted file system, please supply correct password to continue
Password:Code: Select all
EXT3-fs: unsupported inode size: 14776
Looks like you didn't say the magic word. Mounting /dev/loop/5 failed
Encrypted file system, please supply the correct password to continue
Password:Code: Select all
VFS: Can't find ext3 filesystem on dev loop(7,5).
Looks like you didn't say the magic word. Mounting /dev/loop/5 failed
Encrypted file system, please supply the correct password to continue
Password:Code: Select all
boot=/dev/hdcCode: Select all
lilo -b /dev/hda

I don't know about anyone else but I encrypted my drive (laptop) so if it gets nicked, I know nobody will be able to see what I have on there* - eg my companies accounts!TinheadNed wrote:A second problem (if you live in the UK), is that encrypting your drive is completely pointless, unless it is hiding evidence of crimes that carry sentences of greater than 3 years in prison, as failing to hand over a password to encrypted data when instructed by a representative of the Home Office is itself now a crime, courtesy of the RIP Act. And you have to prove you don't have the key, innocence is not assumed (which controvenes other laws I hope). And it's illegal to tell anybody if they ask you for the key too, IIRC.
Yeah, it will let you enter in anything when you losetup...but you should enter the password you used. If you don't enter that password, it won't decrypt correctly, and if you try to dd if=/dev/loop5 of=/dev/sda1 or whatever, it's gonna fuck up the system, and there's nothing you can do.barlad wrote:Well, I just crashed another patition by trying to encrypt the system, although that time I didn't lose anything since it was a stage1 install. Anyway I think I narrowed down a bit better the problem and I have a question everyone who made this working should be able to answer.
When you first use the losetup program, it asks you for a password. After that you encrypt the system with dd if/of.
Now when you use again losetup to mount your encrypted partition (be it to decrypt it or to mount it), it asks for a password. You MUST enter the password that you entered the FIRST TIME right? and if you enter something else... it fails, right? Seems quite logical... The problem is after I encrypt my partition, if I want to mount it using losetup, it asks again for a password. But I can enter whatever I want, like if it had not been encrypted the first time.
Basically, I think that the encryption process fucks up somewhere and that then the partition cannot be recognized, either as a reiserfs system or as a crypted system. Thus losetup always thinks it's a "decrypted" partition.
Any though please? and has anyone read/heard about a problem with encrypthing scsi disks? I started looking into mailing-list but haven't found anything yet.
Anyway... off to the reinstall again!

Some may want to keep people off it (brothers, sisters, government!), personaly, I have my laptop encrypted as I do alot of my work on there. If somebody steals it, I can be as sure as I can be that they can't boot the system / view my files.mihochan wrote:Don't want to throw cold water on this idea, but why would you want to encrypt your ENTIRE filesystem?
An intruder can't get a 'copy of ls' of an encrypted system / partition / file, you misunderstand how this encryption works. Check out Chadders first post or the loopAES README file for an overview.mihochan wrote:Anybody can get a copy of 'ls', they don't have to steal one.
Which, leads to a second point. Probably, encrypting the entire filesystem is actually less secure than just encrypting you own personal data. After all, it is much easier to crack encryption if you have some idea of what is encrypted. A hacker would simply need to compare your encrypted copy of some common config file to their unencrypted one. This would give them a hand hold to break into the system.