Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firewire cryptoloop udev dm-crypt
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
byns
n00b
n00b


Joined: 01 May 2003
Posts: 29

PostPosted: Thu Aug 12, 2004 4:34 pm    Post subject: Firewire cryptoloop udev dm-crypt Reply with quote

I'd like to do a migration to udev and dm-crypt:

My setup:
DELL Inspiron 8100 Notebook
External 250GB Firewire Harddrive (multiple partitions)
Kernel 2.6.7 (gentoo flavored)

Where I once was:
kernel 2.4.something no devfs
a symlink in my home directory points to a autofs controlled mount
autofs tries to mount /dev/loop0

to use the loop you click a desktop icon which runs the suid wrapper in a terminal
the suid wrapper starts the rescan-scsi-bus.sh script, asks for the cryptoloop password and tries to mount sda0 as cryptoloop under /dev/loop0

when I turn of the harddrive and turn it back on everything kept working

for devfs I had to change the rescan-scsi-bus script slightly and for the kernel 2.6 I reencrypted the partition (twofish by the way)

from now on turning the external disc on and of created sdb instead of sda and if you turned it off and on again it created sdc etc. so the loop didn't work anymore

I heard udev could resolve that problem,so I migrated, but the drive's letter was still not constant on restart of the device. At least the hotplugging finally works so I don't need the rescan-scsi-bus script anymore

now I heard cryptoloop support is to stop soon (and the later 2.6 kernels' cryptoloop support was screwed up anyways even producing oopses) so I wan't to migrate to dm-crypt, hoping that I don't have to reencrypt my partitions.

So my questions are:
- How do I write an adecuate udev rule for my drive to get it mounted as sda every time and other fire wire devices as something else?

ls /sys/bus/ieee1394/devices shows 5 long hex numbers (directories) which I suspect to be the partitions of the drive and "fw-host0"

- How do I use my partitions with dm-crypt?

If anyone can help me, with one of the two problems, would like some of the scripts (wich were all stolen from other places on the web) or has a suggestion how to do all of that more elegantly with the gentoo crypto init stuff. Pls feel free to reply.
_________________
-----------------------------------------
It's easier to get forgiveness for being wrong than forgiveness for being
right.
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu Aug 12, 2004 10:19 pm    Post subject: Reply with quote

for writing udev rules, search the forum as there have been a lot of threads on that

for starters
man udevinfo

also try searching for
decibal's udev primer

http://www.google.com/search?&q=writing%20udev%20rules
this should also help you

and I believe that dm-crypt can migrate cryptoloop things, but I don't remember how.

-Nate
Back to top
View user's profile Send private message
oumpah-pah
Guru
Guru


Joined: 18 Jul 2004
Posts: 575
Location: Lausanne, Switzerland

PostPosted: Fri Aug 13, 2004 12:32 am    Post subject: Reply with quote

The best udev-rules-writing reference is writing udev rules by Daniel Drake. You'll sure find what you're looking for.
Back to top
View user's profile Send private message
byns
n00b
n00b


Joined: 01 May 2003
Posts: 29

PostPosted: Fri Aug 13, 2004 3:02 pm    Post subject: Reply with quote

I already had a quick glimpse at both sides, but it doesn't really make clear to me what to do. Damn! I guess I'm back to "trial and error"-ing
_________________
-----------------------------------------
It's easier to get forgiveness for being wrong than forgiveness for being
right.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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