You are not logged in.

#1 2013-07-08 18:30:02

shell
New member
Registered: 2011-03-28
Posts: 8

mount second crypted harddisk on boot

Hello everyone,

i'm having some problems with my second harddrive. The first harddrive is full encrypted:

One boot partition (unecrypted)
One VG with swap and root partiton (crypted)

Now my second harddisc:

1 partition full encrypted

This should be mounted on every boot to /mnt/sdb (for example...)

The key for this drive is /root/keyfile

I've added this line to my /etc/conf.d/dmcrypt:

target=sdb
source=/dev/sdb1
key=/root/keyfile

This is the correspondig line in my fstab:

/dev/mapper/sdb         /dev/sdb            ext4            noatime         0 1

Now it tries to first mount /dev/mapper/sdb and after that the dmcrypt service start?!? Is this normal or is there any missconfiguration?

Offline

#2 2013-07-08 21:19:34

rh1
_Member
From: Eastern Shore, VA
Registered: 2010-10-08
Posts: 388

Re: mount second crypted harddisk on boot

Your fstab entry is wrong for a start. The second item should be /mnt/sdb or whereever you want it mounted.

Offline

#3 2013-07-08 21:32:27

shell
New member
Registered: 2011-03-28
Posts: 8

Re: mount second crypted harddisk on boot

Ups, sorry wrong paste. This is the right entry:

/dev/mapper/sdb         /mnt/sdb            ext4            noatime         0 1

Offline

#4 2013-07-09 00:09:06

rh1
_Member
From: Eastern Shore, VA
Registered: 2010-10-08
Posts: 388

Re: mount second crypted harddisk on boot

Looking at the init script , it should decrypt them before the file system check , and after it should remount everything and then mount any local file systems. Could you please provide your rc.log?
It should be located at /var/log/rc.log. You may have to enable it in /etc/rc.conf if you haven't already and then reboot in order to generate it.

Offline

#5 2013-07-09 05:59:19

shell
New member
Registered: 2011-03-28
Posts: 8

Re: mount second crypted harddisk on boot

These are the last entries:

http://bpaste.net/show/112967/

Offline

#6 2013-07-09 11:23:04

rh1
_Member
From: Eastern Shore, VA
Registered: 2010-10-08
Posts: 388

Re: mount second crypted harddisk on boot

Well that doesn't look right. Let me play with it and see if i can reproduce.

Offline

#7 2013-07-14 18:54:59

shell
New member
Registered: 2011-03-28
Posts: 8

Re: mount second crypted harddisk on boot

And? Any idea?

Offline

#8 2013-07-16 01:10:22

rh1
_Member
From: Eastern Shore, VA
Registered: 2010-10-08
Posts: 388

Re: mount second crypted harddisk on boot

Sorry , got busy on other stuff

Try adding 'rc_localmount_after="dmcrypt"' to /etc/rc.conf

Offline

#9 2013-07-17 07:00:47

shell
New member
Registered: 2011-03-28
Posts: 8

Re: mount second crypted harddisk on boot

Hm, it seems that this is totaly ignored. dmcrypt is started after localmount.

Offline

#10 2013-07-17 14:15:43

rh1
_Member
From: Eastern Shore, VA
Registered: 2010-10-08
Posts: 388

Re: mount second crypted harddisk on boot

Open a bug at bugs.funtoo.org so others can look at. I'm having trouble testing as I switch most things to ZFS recently

Offline

Board footer

Powered by FluxBB