Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can successfully mount and write on that volume.
When I dismount this volume and try to remont, I got this error:
Quote:
mount: wrong fs type, bad option, bad superblock on /dev/mapper/secret,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
and in dmesg:
Quote:
[ 6372.799527] EXT3-fs error (device dm-0): ext3_check_descriptors: Block bitmap for group 0 not in group (block 1752694931)!
[ 6372.801126] EXT3-fs (dm-0): error: group descriptors corrupted
[ 9285.574341] EXT3-fs: barriers not enabled
[ 9285.574464] kjournald starting. Commit interval 5 seconds
[ 9285.574580] EXT3-fs (dm-0): using internal journal
[ 9285.574588] EXT3-fs (dm-0): mounted filesystem with ordered data mode
[ 9408.511844] EXT3-fs error (device dm-0): ext3_check_descriptors: Block bitmap for group 0 not in group (block 1752694931)!
[ 9408.513412] EXT3-fs (dm-0): error: group descriptors corrupted
I've already used the same commands on my older OS (Linux Mint 9).
Now I'm on Linux Mint 10.
The only difference is that now I've an ext4 root partition (/).
This can be a problem?
What commands are you using to remount after the initial file creation? It has been a while since I have done this, but I recall the commands are slightly different.
I have attached a couple of script files to this post, one for mount and unmount that work with ext4. You will at least need to change the name of the volume, which in my case is disk.img and double check the name of the names of the underlying files. In the script, it creates a /dev/usbkey and mounts the file system to /media/encrypted.
Note, these scripts are modified versions of one originally found on an Ubuntu wiki for creating encrypted volumes. The wiki page might have some helpful information.
What commands are you using to remount after the initial file creation? It has been a while since I have done this, but I recall the commands are slightly different.
Maybe you forgot the command to create the filesystem?
Anyway, I've followed your commands:
Quote:
#modprobe aes_generic
#mkdir -p /media/encrypted
#dd if=/dev/urandom of=/root/test bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 33.0241 s, 3.2 MB/s
#losetup /dev/loop0 /root/test
#cryptsetup -c aes -s 256 -h sha256 create test /dev/loop0
Enter passphrase:
#mount -t ext4 /dev/mapper/test /media/encrypted/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/test,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I am not sure I fully understand your reply. The scripts that I attached were just to mount and unmount an existing ecryptfs volume, not to create one. Here is the link that I followed initially. It is based upon the idea that you want to store GPG keys in an encrypted volume on a USB stick, but the technique followed should be the same.
I am not sure I fully understand your reply. The scripts that I attached were just to mount and unmount an existing ecryptfs volume, not to create one. Here is the link that I followed initially. It is based upon the idea that you want to store GPG keys in an encrypted volume on a USB stick, but the technique followed should be the same.
My fault. I was omitting the "-c aes" cryptsetup parameter when mounting the loop device.
Thankyou
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.