essentially I would like to make sure I mount an encrypted drive after each reboot of my ubuntu server. Since this obviously requires me to type in my password, there are two ways I can imagine this to work:
Is either of the two possible at all and/or is there another (possibly more elegant) way to achieve this?
Thanks a ton for your advice!
Best,
J
See suggestion below for the first step toward a working solution. Basically, here's what I ended up doing:
mount | grep -c mapper/[device mapper] # this returns 1 if mounted, 0 if not
You could run a script on startup via cron
.
Simply run crontab -e
to create a cron-table. (It will create an empty one if you don't already have one.)
To run your script on startup, use
@reboot /home/user/script_at_reboot.sh
.
Further documentation in the ubuntu wiki.