You are not logged in.

#1 2008-05-24 15:24:18

Olli
Member
Registered: 2004-04-01
Posts: 57

PCMCIA CF Reader mounting CF card with prio

Hey all,

It's been a while since I've been toying with Arch, but I have managed to get myself in trouble again.
On my laptop I'm trying to run Arch partially encrypted. Everything works out fine, encryption (dmcrypt/luks) works as expected.
Now the part I'm having troubles with:

I map my encrypted partitions with a keyfile, which I want to store on a CF (Compact Flash) card in a PCMCIA cardreader. This means if the card is not present some of my partitions cannot be mounted. The flash card is recognized out of the box and is assigned /dev/sdb1 (which I mounted ro at /mnt/flash), so I thought I could get away with just putting my keyfile on the card, adjust my crypttab and go with it. Problem is, the flash drive is mounted later than the rest of my partitions, which means my encrypted partitions will fail to mount.

How can I prioritise the mounting of my cf card so I can get my encrypted partitions to mount properly? I've toyed with the order in the fstab file and lowered the number of the PCMCIA stuff in udev, but so far no luck. Anybody any tips?

Cheers.

Last edited by Olli (2008-05-24 15:25:56)


DIY: Doom-It-Yourself

Offline

#2 2008-05-24 15:43:10

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: PCMCIA CF Reader mounting CF card with prio

man 5 fstab wrote:

The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.

But have a look at /etc/rc.sysinit: Crypttab is processed before any mounting is done (even before / is remounted rw), so I think if you want to use the CFcard you need to edit rc.sysinit to get it mounted before crypttab is processed.

Offline

#3 2008-05-24 15:57:25

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: PCMCIA CF Reader mounting CF card with prio

Ah yes, nice one, well spotted, works like a charm now smile


DIY: Doom-It-Yourself

Offline

#4 2008-05-24 16:07:53

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: PCMCIA CF Reader mounting CF card with prio

Just a quick note: upgrading initscript will (of course) overwrite rc.sysinit.

Offline

Board footer

Powered by FluxBB