[solved] how to run /etc/crypttab

I've created an /etc/crypttab file, now how do I run it? What is the equivalent of typing `mount -a` to activate /etc/fstab but to activate /etc/crypttab?
Thanks
Last edited by spotshot6544 (2013-08-03 18:58:04)

I can open the drive with
cryptsetup open /dev/sdb1 driveName --key-file myKeyfile
and `crypttab status driveName` reports:
/dev/mapper/driveName is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
device: /dev/sdb1
offset: 4096 sectors
size: 5860526080 sectors
mode: read/write
And then I could certainly mount it with `mount /dev/mapper/driveName /mnt` but I'd prefer to have this setup to happen at boot (before login). I suppose I could add these commands to a custom systemd script, but that doesn't seem the proper way to go.
I tried `pacman -S systemd` and was told that it would be reinstalling.
The problem I might be having is that I am not familiar with systemd, and I have only recently moved to Arch.
(Note, "myKeyfile" exists on my system drive which is encrypted too (with a passphrase), so, for my goals, there is no passphrase and that is fine)

Similar Messages

  • [SOLVED]how to run sdlmame?

    I've been googling for like 2 years on how to run a mame game with no results.  I've got the ninja gaiden rom, I've got sdlmame installed.  How do I run it?
    Last edited by actionM (2009-07-06 03:25:30)

    Oh my god, never mind.  I can't believe I waited this long to ask, and then I figure it out while waiting.  I looked at the mame.ini file and noticed the rom path, so I moved my rom to that path and typed sdlmame instead of sdlmame <game>.

  • [solved] How to run a script on logout?

    I've just migrated from ubuntu and so far I'm really happy with Arch. GNU/Linux really is easier to 'get' with Arch. I've been able to overcome all problems so far with reading previous posts or searching for it by other means, yet this obviously elementary broblem still defies solution.
    - How do I run a script on logout?
    What I want to do on logout is to run 'fusermount -u ~/mounted-dir/', where 'mounted-dir' holds media from my account on another host. I have it set up so that /etc/profile runs ~/.login which in turn runs 'sshfs [email protected]:~/media/ ~/mounted-dir/ -o sshfs_sync -o reconnect'.
    - Is this a reasonable way of Getting Things Done?
    I suspect (as I always do) that there might be a way these things are supposed to be done, this not being it.
    Last edited by pooflinger (2007-10-05 10:05:29)

    pooflinger wrote:
    _adam_ wrote:
    the problem with .bash_logout is it will run whenever you exit a bash instance.
    are you using a desktop environment? do you just want this to happen prior to shutdown? or when you actually log out?
    I pretty sure that .bash_logout only runs if $SHELL is /bin/bash when you log out. I want this to happen when I actually log out.
    yeah, sorry, i forgot its only executed when a login shell is used.

  • [solved]how to stop /etc/resolv.conf keeps being overwritten ???

    no matter how many times to change the content, it keeps like that:
    # Generated by dhcpcd from eth0
    # /etc/resolv.conf.head can replace this line
    nameserver 192.168.8.1
    # /etc/resolv.conf.tail can replace this line
    so i can't add nameserver in it
    Last edited by tempo (2010-01-14 15:01:35)

    The clue is in the message, use a file called resolv.conf.head to add a nameserver to the top and resolv.conf.tail to add it to the bottom.
    It's being overwritten because you are using dhcpcd to auto configure your network settings.
    Last edited by Meyithi (2010-01-14 13:03:43)

  • [SOLVED] HOW TO: run command(s) as root at startup ?

    Hello,
    Can anyone explain or at least point me to a noob-friendly source as to how this is done ?
    Thanks in advance.
    Last edited by Crow1991 (2013-10-14 09:24:13)

    How can I make a script start during the boot process?
    https://wiki.archlinux.org/index.php/Sy … process.3F

  • [SOLVED] How to run commands during logoff?

    Hi there,
    Am trying to run the command "alsactl store" upon logoff so my volume levels are stored when I LOGOFF (which I assume will also apply to restarts and shutdowns too???). But I can't seem to find the necessary rc file...
    Any help would be great!
    Cheers,
    KC
    Last edited by killercow (2008-08-30 00:46:01)

    If you are talking abt. logging off from bash/konsole, there is no file [in my head ] that we can insert our own commands into.
    Logging out of a DE session should 've their config files, but I don't know them

  • [SOLVED] How to install and run (on debian) a separate, downlevel version of firefox for the F5/firepass VPN?

    (Note: my problem is similar to [https://support.mozilla.org/en-US/questions/931534?e=es&as=aaq another current problem] except that
    * OP is running windows (I'm running a debian linux)
    * OP is asking a more general question (how to fix?) while I'm asking for details on a proposed fix)
    I'm currently running
    $ lsb_release -ds
    Linux Mint Debian Edition
    $ cat /etc/debian_version
    wheezy/sid
    $ uname -rv
    3.2.0-2-amd64 #1 SMP Sun Mar 4 22:48:17 UTC 2012
    $ iceweasel --version
    Mozilla Iceweasel 13.0.1
    I'd like to continue running an uplevel iceweasel ([http://en.wikipedia.org/wiki/Mozilla_Corporation_software_rebranded_by_the_Debian_project which is firefox]) but apparently need to run a downlevel version in order to run a particular vendor-supplied plugin. How best to do that (i.e., with minimal performance degradation, and without affecting my package management)? Or is there another way to solve the general problem (running the F5 Network Access Plugin)? Why I ask:
    My employer is giving me remote access via a SecurID token and the F5 Network Access Plugin (F5NAP). The latter is in fact a browser plugin, which seems to me an odd way to implement a VPN, but it's the only offered option. Unfortunately,
    * the only browsers supported for linux are Firefox 3 and Firefox 8 (per [http://support.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm_compatibility_matrix_10_2_1.html this]--scroll to "Linux Operating Systems")
    * my primary laptop runs LMDE (see above) with Iceweasel 13 (from the mozilla.debian.net repository), which I want to keep. (It's the uplevel browser, dammit !-)
    So I first tried to install the F5NAP on my iceweasel, hoping it was sufficiently like the listed versions. I browsed to my employer's site, logged in using the token, and followed the link to install the plugin. Unfortunately, that failed: the xpi began running, but then quit with the message
    > F5 Network Access Plugin could not be installed because it is not compatible with Iceweasel 13.0.1
    Hoping for a simple workaround, I told the often-useful User Agent Switcher plugin to emulate Firefox 8, but no fix. Hence it seems like I will hafta
    * install Firefox 3 or Firefox 8
    * run that downlevel browser whenever I want remote access
    * run the uplevel browser for everything else
    This definitely seems like a kludge, so I am open to alternatives. Meanwhile I'm wondering:
    # Which of the F5-supported downlevel browsers (Firefox 3 or Firefox 8) has the smaller memory footprint?
    # How to install the downlevel browser so that it does not interfere with my uplevel browser's configuration, operation, and updating via debian package management?
    # How to run the downlevel browser so that its operation does not interfere with my uplevel browser? I know firefox typically wants to run singleton.

    @[https://support.mozilla.org/en-US/user/160087 verdi]: thanks for your helpful suggestions. The "fix" (actually a kludge, but I gotta work with what F5 and my employer give me) was:
    # Install/run latest Firefox 3 (despite there being [https://support.mozilla.org/en-US/questions/932269 no 64-bit version for linux]) using [https://docs.google.com/open?id=0BzDAFHgIxRzKbmJDUGZqTzhfbDg this bash scriptlet].
    # Create a [https://docs.google.com/open?id=0BzDAFHgIxRzKQjRyQndqUTJpRXM run script] to start firefox so that one can
    #* choose the appropriate profile (I was unable to set it from the script without startup error)
    #* run multiple instances (I don't want 3.x firefox touching my uplevel profile)
    # Run Firefox 3.x with the runner, then point it to my employer's site to install the [http://support.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm_compatibility_matrix_10_2_1.html F5 Network Access Plugin] (restarting firefox as required).
    The gnome-terminal tab from which I invoke the runner spews a bazillion "wrong ELF class: ELFCLASS64" errors, but the plugin runs, and I can SSH normally (though more slowly) to servers on the VLAN from another terminal tab.

  • How to run group solve with the batch manager

    I'd like to know if it is possible (and how) to run group solve defined in OFA with the batch manager.
    Thank you
    Luigi Polverini
    Synesis s.r.l.

    OFA uses its Task Processor rather than Batch Manager to run tasks in batch. Group solves can be scheduled this way by submitting the group solve task to the TP, and then rescheduling it in the Task Queue window.
    null

  • Hello i have been trying to install i tunes 10 on to my pc but as i get to the end of installation it comes up with the message windows installer package failed contact support or vendor how do i solve this im running vista of an acer laptop many thanks

    hello i have been trying to install i tunes 10 on to my pc but as i get to the end of installation it comes up with the message windows installer package failed contact support or vendor how do i solve this im running vista of an acer laptop many thanks

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • [SOLVED] filesystem package: list by label in /etc/crypttab

    Reading about Persistent Device Naming, using labels in /etc/fstab rather than UUIDs has some advantages.  But /etc/crypttab seems to support only /dev/sdXY and UUID notation.  Since flesystem is listed as an Arch Linux package, is there any chance of adding support for naming devices with labels in /etc/crypttab?
    Last edited by Konkorde (2014-12-15 01:28:42)

    falconindy wrote:You cannot identify an encrypted filesystem by LABEL, because the label itself is a property of the unencrypted filesystem. You're asking to solve a chicken/egg problem.
    I apologize for misspeaking: I want to identify a partition containing an encrypted filesystem by label in /etc/crypttab.  While /dev/disk/sdXY works, /dev/disk/by-label/foo did not work.
    falconindy wrote:You can identify an encrypted filesystem by its PARTLABEL (or PARTUUID), assuming you've partitioned your disks with GPT. I added support, implicitly, for this to /etc/crypttab 2 years ago.
    Thanks Dave: I am using GPT and although I'm new to PARTLABEL, I'll look into it.  Looking at the code you linked, though, I think I probably just want to use the
    if (startswith(p, "LABEL="))
    branch, rather than
    /dev/disk/by-label
    Last edited by Konkorde (2014-11-16 16:26:39)

  • After running /etc/rc.d/alsa stop there is still sound why? [SOLVED]

    Because of the way I want my install to behave instead of appending alsa to the end of the daemons line in /etc/rc.conf I opt to start alsa manually when/if needed with
    /etc/rc.d/alsa start
    It works well but after I go
    /etc/rc.d/alsa stop
    and some time later
    aplay /usr/share/sounds/alsa/Front_Center.wav
    I still hear sound? Why?
    By the way if it helps any after running
    /etc/rc.d/alsa stop
    the output is
    ::Saving ALSA Levels
    See I looked at the script and even though my knowledge of bash is sadly limited I saw in the stop) case somehow if something else goes right it should say "Stopping Alsa". Thus I think that is supposed to happen why isn't it? What's going on? How do I fix this?
    Last edited by hiushoz (2011-01-05 16:37:51)

    Tomk what you say is somewhat true. However the wiki doesn't quite explain what I want to know or if it does it explains it in a way I don't understand. I'm trying my best to learn this stuff but being relatively inexperienced there are limits to what I can do thus I ask a question here in the hopes of learning and being given the information in a form that I understand.
    schmmd while I could certainly mute the volume that's not what I want. This may sound strange but what I want is a system that boots up to the command line in a very minimal fashion. I don't automatically want an internet connection. I don't automatically want a GUI. I don't automatically want sound. If I want any of these things I want to be able to start and stop them manually. Like if I want to connect to the internet I go
    /etc/rc.d/network start
    and when I want to disconnect I go
    /etc/rc.d/network stop
    It all works as expected. However sound doesn't. It starts when I want it but it doesn't stop when I want it. Perhaps I don't know how to use the script. When I go start it works as expected. When I go stop it still makes sounds.
    I don't understand what's happening. Can you guys please help me?

  • [solved]How to unlock LUKS using keyfile on usbdrive during boot?

    Hi all,
    I would like some advise for booting encrypted partitions using kefiles on a flashdrive. I'm setting up a Intel Atom based homeserver, and and want my data to be encrypted in case the server gets stolen. To save some encryption overhead I prefer to leave root unencrypted and only encrypt /home, and if this works, later on /var, /tmp and swap as well. My plan is to have a keyfile on a flash thumbdrive, and only have the thumbdrive plugged in while booting.
    I have read the dm-crypt wiki page, but it assumes an encrypted root, and this approach won't work in my situation, where only non-root mountpoints are encrypted. If i put 'ASK' in /etc/crypttab I get prompted for the passphrase and the LUKS container unlocks and mounts fine. I can also unlock the LUKS container manually using the keyfile that I created. However when I put the path to the keyfile in /etc/crypttab instead of 'ASK', and let the usbdrive automount using an udev rule the unlock at boot fails. It seems that my udev rule is only executed when I plug in a drive after booting, not when it is already plugged in during boot. How would I accomplish this? Mount it with fstab and automatically unmount it after booting, or some entirely different way?
    my /etc/fstab:
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/sda1 / ext4 defaults 0 1
    /dev/sda2 swap swap defaults 0 0
    /dev/mapper/home /home ext4 defaults 0 1
    /etc/crypttab:
    home /dev/sda3 /media/usbhd-sdc1/keyfiles/arch_server_-_home.key
    /etc/udev/rules.d/01.usbdrive_automount.rules (sdb is a second, currently unused harddisk):
    KERNEL=="sd[b-z]", NAME:="%k", SYMLINK+="usbhd-%k", GROUP:="users", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usbhd-%k", GROUP:="users", NAME:="%k"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", PROGRAM=="/sbin/blkid -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,dirsync,noexec,nodev,noatime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
    ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
    <edit>
    Okay I have found a solution. The trick was to make sure the usbstick gets mounted first, so the keyfile is available for the unlocking/mounting during boot. To do so I have added 'usb' to the hooks line in /etc/mkinitcpio.conf and recompiled the initramfs as described in the wiki link above.
    Next I changed my /etc/udev/rules.d/01.usbdrive_automount.rules a little so that the mountpoint of the usbdrive stays after unplugging it:
    KERNEL=="sd[b-z]", NAME:="%k", SYMLINK+="usbhd-%k", GROUP:="users", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usbhd-%k", GROUP:="users", NAME:="%k"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", PROGRAM=="/sbin/blkid -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,dirsync,noexec,nodev,noatime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k", OPTIONS="last_rule"
    #ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
    #ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
    /etc/fstab:
    The usbdrive is put above the encrypted partition to make it get mounted first:
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/sdc1 /media/usbhd-sdc1 ext2 defaults 0 0
    /dev/sda1 / ext4 defaults 0 1
    /dev/sda2 swap swap defaults 0 0
    /dev/mapper/home /home ext4 defaults 0 1
    /etc/crypttab:
    home /dev/sda3 /media/usbhd-sdc1/keyfiles/arch_server_-_luks.key
    So now I plug in the flashdrive, turn on the server, unplug the flashdrive and udev automatically unmounts the flashdrive while leaving the mountpoint /media/usbhd-sdc1 for the next boot.
    </edit>
    Last edited by rwd (2009-12-04 19:36:14)

    graysky wrote:@ratcheer - You can try now if it's a major pain in the balls by enabling [testing] and using the updated linux package.
    If you do enable testing make sure you aren't like myself: I'm not competent enough to enable testing..
    Edit:
    To elaborate a bit.  If you enable testing and then just do a "pacman -Syu" then you are going to pull in all sorts of packages you may not want and it may be complicated to get rid of later.  To avoid this I would enable testing, do this:
    sudo pacman -Syy
    sudo pacman -S testing/linux
    So it would pull in the absolute minimum that I wanted from testing.  Then I would disable the testing repository and pacman -Syy again.  That would convert the new linux package and packages it requires to manual packages.  E.g. they would be shown under "pacman -Qm"
    Because once you start pulling packages in from testing it is almost a one-way street.  As I instructed above, that is my gross understanding.  I don't use testing at all, it is supposed to be used if you are actively testing Arch and providing feedback while doing so.
    Last edited by headkase (2012-10-03 01:51:51)

  • While browsing Firefox, display another htm*file by double-clicking it in Windows Explorer and not getting the erro message "Firefox is already running (etc) "

    While browsing the Web with Firefox, I often want to view an htm (or html etc) file that is recorded on my computer, by double-clicking it in my Windows Explorer, hoping it will open automatically a new tab.
    When I try this now, I get the error message "Firefox is already running (etc)" .
    In my current setup, Firefox is associated with the htm and html file name extensions.
    If, instead of double-clicking the filename in the Explorer, I choose the Firefox menu item "Open a file", this works OK.
    In old versions of Firefox, double-clicking a filename in the Windows Explorer or File Manager caused Firefox to open a new window every time which was ok.
    I have the same problem with Thunderbird, which I have associated with the "eml" file name extension. How can I view a series of recorded ".eml" files with Thunderbird when Thunderbird is already running ? Thank you.

    The target field of the desktop shortcut is "D:\C_Mozilla Firefox\firefox.exe" (no switch)
    The system/environment variable MOZ_nO_REMOTE is now 0, changed from 1, but I can see no difference. Maybe I need to restart the system to get a change ?
    Thank you.

  • How to run D2k 32 bit Application on Windows 7 64 Bit

    Dear Friends
    How to run D2k 32 bit Application on Windows 7 64 Bit, Presently I am having a Application developed in D2k 32 Bit, and it is running smooth on Windows Visa and Windows Xp. but now OUr company are going for new Laptops having Windows 7 64 Bit.
    Is there any way to Solve this Problem, or I have to upgrade D2k , which will be a 6 month job.
    sandy

    Since Forms 6 was never certified on Vista, I will assume you don't care about using Oracle Support. If that's the case, getting Forms 6 to work on Win 7 would likey require similar steps as you took to getting it to work on Vista.
    At minimum, you would need to do the following:
    1. Start with Forms/Reports 6.0.8.11 (6i Release 2)
    2. Install the latest (last) patch (#17), bring the version to 6.0.8.26
    3. It may be necessary to relax or disable Windows UAC
    4. To run the executables, you have to right click on them and select Run As Administrator in order for them to work properly.
    THE ABOVE IS NOT A SUPPORTED CONFIGURATION
    Forms 6.x was desupported years ago. If you have not already begun to do so, you should probably be working on a migration plan in order to get you to a supported version. The latest version is 11.1.1.3, so you are far behind. All versions newer than 6.x are entirely web based. This means that you will no longer be able to use the Forms runtime on the client machines. Client machines will require an Oracle certified browser and JRE in order to run Forms. Certification information for Fusion Middleware 11 (includes Forms 11) can be found here:
    http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
    FMw Product information can be found here:
    http://www.oracle.com/us/products/middleware/index.html
    Forms 11 information can be found here:
    http://www.oracle.com/us/products/tools/oracle-forms-161771.html
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html

  • How to run Java Application in Weblogic 8.1

    Hi,
    I'm new to Weblogic 8.1. I just deployed a EJB with WebLogic 8.1 Server and I
    don't know how to run my Java Application against the EJB I deployed earlier.
    I tried to run "java Client_1" in a console window. It gives me the following
    message:
    C:\temp\WebLogic\new>java Client_1
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassNotFoundException:
    we
    blogic.jndi.WLInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:217)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
    a:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    49)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at Client_1.getInitialContext(Client_1.java:55)
    at Client_1.main(Client_1.java:14)
    C:\temp\WebLogic\new>

    hi,
    i solve this one after check bea documnetaion.
    with regards
    jp

Maybe you are looking for

  • Regarding BADI's in ABAP

    Hi, Can anybody tell me What is meant BY <b>BADI's</b>! Also what are the main diffrences between <b>User-Exits and BADI's</b>! Can anybody explain me wether any diffrent types of <b>BADI's</b> are available! Can anybody provide me documentation with

  • Background job output

    I schedule a job in backgroung proces(smartform). Whwn i click on the spool  to see the output ,  there is  error  "NO FRONTEND AVAILABALE" . how can i see my output of the back ground  job (smartforms). i am executing the process  like  1. tcode run

  • Cannot access web-streaming site

    Windows 7 Home Premium 64-bit/SP1 OS...cannot access ANY cahnnels on "FreedoCast" web-streaming site (http://www.freedocast.com)...despite having latest Flash installed (version 11,6,602,180 installed).  Probably not a browser issue as this occurs on

  • Problems starting managed server via nodemanager

    Hello, I have a WebLogic 6.1 SP2 installation on two Solaris 8 maschines. One hosts the admin server and the seconds hosts a managed server. I installed the nodemanager on both maschines. They seems to run normally. I configured the "Remot Start" for

  • T4i battery recharge

    I purchased a reconditioned T4i almost 2 years ago and love it. My only complaint is the noise form the autofocus during video, but that wasn't why I bought it; I wanted to take good pictures of the dogs, and our exploits with them. This may seem lik