View Single Post
  #5   (View Single Post)  
Old 10th September 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I've been able to recreate this on a test system. The cause is clear: the bootloader decrypts only the boot drive.

My test system had /home on the second drive. And I had thought a solution would be to set the fstab(5) /home entry to include the noauto option, then issue a bioctl(8) and mount(8) from an rc.local(5) script.

However, rc(8) still attempts and fails to mount the /home mount point. The reason is as yet unclear to me, as noauto works fine when issuing # mount -a or # mount -A manually.

Removing the fstab(5) entry permits rc(8) to complete processing and pass control to rc.local(8), where bioctl(8) and mount(8) commands can be executed. You will want to test the bioctl(8) results, so that in the event of an incorrect passphrase, bioctl can be retried.

EDIT:

Here is an example rc.local(5) script that permits three attempts to enter the correct passphrase before mounting the partition.
Code:
for tries in 1 2 3; do
   bioctl -c C -l /dev/sd1a softraid0
   if [ $? -eq 0 ] ; then
      break
   fi
done
mount 5435133273012c81.a /home

Last edited by jggimi; 10th September 2017 at 02:46 PM. Reason: added example rc.local script
Reply With Quote