Posted by: Wildan Maulana | August 19, 2007

dm-crypt :: ngw100 issues

1.
# ldd /sbin/dmsetup
ldd: can’t open cache ‘/etc/ld-uClibc.so.cache’
libdevmapper.so.1.02 => /lib/libdevmapper.so.1.02 (0x2aab2000)
libc.so.0 => /lib/libc.so.0 (0x2aac0000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaab000)

Solution :
Just run #ldconfig

2.
~ # cryptsetup -y create rahasia /dev/loop
Enter passphrase:
Verify passphrase:
Command failed: Key processing error: No hash backend found

Solution :
Try using hash=plain backend:
#cryptsetup -y hash=plain create rahasia /dev/loop0

3.
~ # cryptsetup -y –hash=plain create rahasia /dev/loop0
Enter passphrase:
Verify passphrase:

~ # mkfs.ext2 /dev/mapper/rahasia
mke2fs 1.37 (21-Mar-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
7680 inodes, 30720 blocks
1536 blocks (5.00%) reserved for the super user
First data block=1
4 block groups
8192 blocks per group, 8192 fragments per group
1920 inodes per group
Superblock backups stored on blocks:
8193, 24577
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override

~ # mount -t ext2 /dev/mapper/rahasia /mnt/rahasia/
VFS: Can’t find an ext2 filesystem on dev dm-0.
mount: Mounting /dev/mapper/rahasia on /mnt/rahasia failed: Invalid argument

On Ubuntu box :
root@netherland:~# file /dev/mapper/tesaja
/dev/mapper/tesaja: block special (254/0)

On NGW Board :
# file /dev/mapper/rahasia
/dev/mapper/rahasia: block special (254/0)

4. After reboot, when i mount /dev/mapper/rahasia on ngw, i get this error :

# mount /dev/mapper/rahasia /mnt/rahasia/
mount: Mounting /dev/mapper/rahasia on /mnt/rahasia failed: No such device or address

5. When making filesystem on the file on ngw board, it seems mke2fs didn’t successfully creating filesystem on it :

# mke2fs rahasia
mke2fs 1.37 (21-Mar-2005)
rahasia is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
5136 inodes, 20480 blocks
1024 blocks (5.00%) reserved for the super user
First data block=1
3 block groups
8192 blocks per group, 8192 fragments per group
1712 inodes per group
Superblock backups stored on blocks:
8193

Writing inode tables: 0/3 done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mount -o loop rahasia /mnt/rahasia
VFS: Can’t find an ext2 filesystem on dev loop0.
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or other error
In some cases useful info is found in syslog – try
dmesg | tail or so

But .., if i creating the filesystem on the ubuntu box, it can be mounted to the loop device, both on ubuntu and on ngw :

On Ubuntu :

root@netherland:/media/sdb1# mke2fs rahasia
mke2fs 1.40-WIP (14-Nov-2006)
rahasia is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
5136 inodes, 20480 blocks
1024 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=20971520
3 block groups
8192 blocks per group, 8192 fragments per group
1712 inodes per group
Superblock backups stored on blocks:
8193

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

root@netherland:/media/sdb1# mount -o loop -t ext2 rahasia /mnt/rahasia/
root@netherland:/media/sdb1# echo “Created on Ubuntu Box” > /mnt/rahasia/testfile.txt

Hah …,😀 , when reinserted the sdcard to the ngw, i can mount the file rahasia, so the problem is relies on mke2fs utility, i have to update it to the newer version :

#mount -o loop rahasia /mnt/rahasia
# cat /mnt/rahasia/testfile.txt
Created on Ubuntu Box

Solution :

Replace the mke2fs utility with mke2fs on e2fsprog package (http://e2fsprogs.sourceforge.net./)

Issue no. 3 still cannot be solve … )-:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: