Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mcollier on May 26, 2011, 02:54:52 PM
-
Hello, I've successfully created an ecrypted file system using these instruction (http://ubuntu-tutorials.com/2007/08/17/7-steps-to-an-encrypted-partition-local-or-removable-disk/). Everything works fine if I manually mount the partition using these commands:
mkdir /home/tc/vault
sudo cryptsetup luksOpen /dev/sda4 vault
I'm prompted for the password
sudo mount -t ext2 /dev/mapper/vault /home/tc/vault
I can access the partition as expected at /home/tc/vault
I need to get the partition to mount at boot. Can anyone point me in the right direction?
Thank you,
Matt
-
The link to these instructions does not work, so it is not clear what you have done.
To run commands at start up, put them in /opt/bootlocal.sh
-
Sorry, fixed the link, and here it is again: http://ubuntu-tutorials.com/2007/08/17/7-steps-to-an-encrypted-partition-local-or-removable-disk/
-
It looks to me like I need to put my command : /usr/local/sbin/cryptsetup luksOpen /dev/sda4 vault in the /etc/init.d/rcS file before the if nofstab section.
I've tried this, and added 'etc/init.d/rcS' to my /opt/.filetool.lst file, but apparently the rcS file does not get included in the backup.
Am I on the right track, and if so, what do I do to customize my rcS file?
-
Are you aware of this?
http://wiki.tinycorelinux.net/wiki:encrypted_backup
It just works. You don't need to change anything.
-
rcS runs before the restore.
You need to put your commands in /opt/bootlocal.sh
-
@guy, If I can't get the encrypted file system working, I may fall back on the encrypted backup.
@gerald_clark, I have tried adding the following commands to /opt/bootlocal.sh, but that doesn't work.
sudo /usr/local/sbin/cryptsetup luksOpen /dev/sda4 vault
sudo mount -t ext2 /dev/mapper/vault /home/tc/vault
-
bootlocal.sh runs as root.
Do not use sudo.
-
Good information, corrected, but still doesn't work. I'm expecting to be prompted for a password after the /usr/local/sbin/cryptsetup luksOpen /dev/sda4 vault
command.
If there are any errors thrown during the boot process, how would I go about seeing those?
-
You could try /opt/bootsync.sh. It runs early in the boot process. bootlocal.sh runs later in the boot process.
-
bootlocal.sh runs without a terminal.
edit bootsync.sh
remove the '&' from the end of the line that reads
/opt/bootlocal.sh &
Then add your commands to the endof bootsync.sh.
-
That did the trick! Thank you both very much!
-
Now put the '&' back in bootsync.sh.
Normally bootlocal.sh runs in background.
With the '&'removed, it may never return and the boot may hang.
I don't think there is anything in bootlocal.sh that needs to complete before your lines in bootsync.sh.
My suggestion to remove the '&' may have been a bad idea.
-
OK, made that adjustment. Still working great. Thanks again.