[Solved] Mount LUKS encrypted hard drive at boot

Hi,
This is driving me nuts. I'm getting angry to be honest.
I encrypted my brand new WD portable hard drive with LUKS + dm-crypt and I can now normally map and mount it with the following commands:
sudo cryptsetup luksOpen /dev/sdc1 WesternDigital
[Enter Passphrase]
sudo mount /dev/mapper/WesternDigital /media/WesternDigital
I would like to map and mount it at boot time (where I should be prompted for the passphrase), so I edited:
/etc/crypttab
WesternDigital /dev/sdc1 none luks
and:
/etc/fstab
/dev/mapper/WesternDigital /media/WesternDigital ext4 defaults,noauto,noatime 0 0
During boot I get some errors regarding the decrypting or mapping of WesternDigital that fails but it's too fast to note down something (and, as you probably know, there's no known way to log boot messages on Arch...)
After boot if I try to manually mount /media/WesternDigital I get a message saying /dev/mapper/WesternDigital does not exist.
So I guess the problem is in the mapping phase and thus in the /etc/crypttab file.
I can't find anything in the internet but maybe I'm missing something very basic (a daemon, a module?).
Any help is indeed very appreciated, thank you.
Last edited by rent0n (2010-09-24 15:27:16)

Ok, it's solved. I tried many different configurations of /etc/crypttab, /etc/fstab, /etc/mkinitcpio.conf /etc/rc.conf /boot/grub/menu.lst and I finally found the right setup.
I'm not sure of what was wrong in the first place so I'll just post my current working configs for future reference.
/boot/grub/menu.lst
Doesn't need to be edited at all (ignore the above post).
/etc/rc.conf
You don't need to add any module here because the dm-crypt and dm-mod modules are loaded thanks to the encrypt hook.
/etc/mkinitcpio.conf
The HOOKS line should include usb, usbinput (probably) and encrypt. usb must precede encrypt that must precede filesystems:
HOOKS="base udev autodetect pata scsi sata usb usbinput keymap encrypt filesystems resume"
/etc/crypttab
WesternDigital /dev/sdX ASK
Do not insert 'luks', 'retry=X' or other kind of options (you can find this kind of options in many tutorials and howtos). That was one of my problems I guess.
/etc/fstab
/dev/mapper/WesternDigital /media/WesternDigital auto defaults,noatime 0 0
Note
I'm not sure if this has been helpful or not... however I was able to get it to work after following the advice found here.
Cheers,

Similar Messages

  • How do I mount my internal hard drive?

    Can anyone tell me how to mount my internal hard drive?  I have a macbook air late 2010 model.  128gb flash storage.  I was having problems because it would freeze on me after sleep.  I ran disk utility and repair disk.  It says everything is fine.  But it is unmounted.  Clicking on mount didn't do it.  I already backed it up  before it was unmounted.  I did the hardware test too.  It said there were no hardware issues.  I see the apple brand hd but the "macintosh Hd" is grayed out.  Please help!

    Try doing this:
    Drive Preparation
    1.  Boot from your Snow Leopard Installer flash drive. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    When formatting has completed quit DU and return to the installer.  Complete the OS X installation.

  • Mounting a usb hard drive in single user mode

    I've gotten as far as connecting the hard drive at boot, but I don't know how to figure out which dev is the hard drive, and which arguments to use with the mount command. I can't do much when I login, and I'm trying to cp files from my hard drive to my external hard drive through single user mode.
    Any help is greatly appreciated. Thanks.

    Hi leung wai,
       I wouldn't mind knowing the answer myself. I think the problem with doing it in the manner you attempted is that the device tree hasn't been created yet so the mount command is certainly not going to work. I assume that the answer is to start up enough of the system to have the device tree created. Unfortunately, I don't know where in the startup process that occurs. You could try the following command after making the boot volume writable:
    /usr/libexec/registermach_bootstrapservers /etc/mach_init.d
    Then check to see if the /dev virtual filesystem has been created. Of course it wouldn't surprise me if that didn't also mount your disks. If not, try the following:
    /sbin/SystemStarter
    It should have been created after that because at that point almost the whole system has started.
    Gary
    ~~~~
       You've been telling me to relax all the way here, and
       now you're telling me just to be myself?
             -- The Return of the Secaucus Seven

  • Mount an external hard drive in single user mode

    Do any know how to mount an external hard drive in single user mode:
    I've issue the following command:
    /sbin/mount -uw /
    mkdir /Volumes/ex1
    /sbin/mount_hfs /dev/disk2s3 /Volumes/ex1
    (I've checked my external hard drive using df -k showing the device is disk2s3)
    Result:
    Permission denied

    Hi leung wai,
       I wouldn't mind knowing the answer myself. I think the problem with doing it in the manner you attempted is that the device tree hasn't been created yet so the mount command is certainly not going to work. I assume that the answer is to start up enough of the system to have the device tree created. Unfortunately, I don't know where in the startup process that occurs. You could try the following command after making the boot volume writable:
    /usr/libexec/registermach_bootstrapservers /etc/mach_init.d
    Then check to see if the /dev virtual filesystem has been created. Of course it wouldn't surprise me if that didn't also mount your disks. If not, try the following:
    /sbin/SystemStarter
    It should have been created after that because at that point almost the whole system has started.
    Gary
    ~~~~
       You've been telling me to relax all the way here, and
       now you're telling me just to be myself?
             -- The Return of the Secaucus Seven

  • HP Protecttools encrypted hard drive - data recovery

     I have an HP Probook 4530s.  It got dropped and the mother board was damaged.  The computer does not even load the boot screen.  The hard drive is un-damaged.   I would like to recover the data from the hard drive, but the data is encrypted with HP Protecttools Security Encryption.  I found this thread:http://h30434.www3.hp.com/t5/Notebook-Operating-Systems-and-Software/ProtectTools-issue-Decrypting-an-encrypted-ProtectTools-HDD/td-p/3362403 It details how to recover data using Disktech2011, a bootable recovery iso image from CD. I followed the directions, but when I get to the step 6, selecting the recovery key...I get an error.  (I do have the original recovery key that was created when I first set up the encryption).  This is the error that I get:  I believe the problem is that the Disktech software cannot find the USB drive that I have the encrypted drive plugged in to (I have the encrypted hard drive from my damaged laptop plugged into a separate computer via a SATA to USB adapter plug). I googled the error and found this https://kc.mcafee.com/corporate/index?page=content&id=KB79409 It details setting the boot disk , which basically tells the software which drive to look at.  However, this is a McAfee error/solution (because the HP protecttools is a McAfee product).  I cant figure out how to set the boot disk in the HP Disktech2011 software.  Does anyone know how to get the Disktech software to recognize my encrypted drive in the USB? Or any other solutions if I am not doing this correctly??? Please help.  I have videos on there that the wife would kill me if I lost.  Thanks.

    I don't know about this particular product, but I've found that lots of disk utilities don't work well, or even at  all, when the drive is connected through a USB cable.  In some cases, a drive connected via a USB cable, even if you're using a docking port, is considered "external" -- and some utilities simply won't work with external drives. If you're using a desktop, what you will probably have to do is open the case and connect the drive to one of the drive cables in the case -- and then reboot.

  • Can I install windows 7 on a potable Hard Drive using boot camp? or any other way to do so?? need help for college please

    I need to use windows in order to use Visual C++ for college but I don't have enough space in my internal Hard Drive so I want to install windows 7using boot camp or any other method on a portable hard drive and boot from it.
    Please help I need it as soon as possible for school. Thanks

    You can't boot Windows natively except on internal drives.
    You can use a VM and put the VM image (VHD) anywhere any drive you want.
    You are way too low on disk space, seriously so. And no room - even Windows and Mac OS should be warning and balking already.
    "emulator" is an old-school term, even true, running a Guest OS under Mac's as a virtual machine, shared resources (RAM, processor) is easier but not the same performance level as running natively.
    Comparison of VMware Fusion Parallels VirtualBox
    This just posted, an FAQ for Lion and Boot Camp 4.0
    Boot Camp 4.0, OS X Lion: Frequently asked questions

  • My MacBook Pro won't let me mount my external Hard Drive. Just trying to restore my iTunes library.

    My MacBook Pro, less than a year old, started acting weird. I backed everything up, took it in to Best Buy, who sent it out to Apple Repair and they put in a new motherboard.
    It's running on Mac OS X Version 10.7.4
    Now I am trying to put everything back on the computer from my external Maxtor 80GB Hard Drive. MacBook Pro won't recognize the external drive.
    I tried Disk Utility. I can see the external drive, and did a repair disk and verify disk. Several times. Each time it says "This partition map seems to be ok."
    However, I am not able to mount it, as that option is greyed out and i can't select it.
    Also, under the Icon for the external hard drive, it has the Macintosh HD Icon (essentially my computer). I tried to restore this way, didn't work.
    I need this to mount, as it has all of my itunes stuff on it; dozens of my sons movies, and my entire iTunes library.
    PLEASE HEEEEELP!! HOW CAN I MOUNT THIS EXTERNAL HARD DRIVE? Thank you in advance

    Try things in this USB/Firewire faq.
    DALE

  • Laptop no longer can mount my external hard drive

    After updating to Mavericks, my laptop no longer can mount my external hard drive. What on earth is going on here and how can I fix this?

    The drive is spinning and I was using it the night before I updated my macbook. It is viewable in disk utility but not in finder, and attempts to mount it are thwarted. The problem is literally coincident with updating the mavericks. When I click verify it didn't appear to have any problems but I will retry when I am back at home and report the findings.
    It is a Toshiba 1GB external hard drive and has adequate power. Lights are on, etc.
    I have not checked on another computer as do not have one available, but that will be my next step.

  • Help with using external hard drive to boot windows on PC

    Hi,
    I'm not sure if this is in the right place, so apologies in advance if not. I've looked around the internet for a good while now, and I haven't found anyone in my exact position.
    My PC's hard drive (running Windows 7) recently died; long story short, I am attempting to reinstall windows. The only other computer I have is this MacBook Pro, on which I have an .iso file of Windows 7. So I want to use my external hard drive (WD 500GB "MyBook") as a boot device so that I can install Windows onto my new internal hard drive.
    The problem I am having is that, well, nothing seems to be working. Every time I try to load the .iso onto my external hard drive and boot my PC with it, either a blank screen appears or it says "missing operating system".
    I have made sure that the BIOS is running the external hard drive as its boot priority.
    I have tried using Disk Utility to partition the external drive, then using 'Restore' to load the .iso onto the partition, to no avail.
    I have tried simply dropping the extracted .iso files onto the hard drive, this doesn't work.
    I have also tried changing the file system of the external hard drive using the 'Erase' feature (NTFS-3G (using an addon), FAT32, exFAT, all of the others), but I notice that whenever I use Restore after doing this, the file system seems to return to Mac OS Extended, which might be why it isn't booting up on my PC. Is there any way I can succesfully partition the external hard drive in a format that will allow Windows 7 to boot (such as NTFS?), and is Disk Utility even the right program to do this?
    If you want any more information from me, please let me know and I'll do my best to provide it - I'm not the most advanced mac user in the world, but I've spent days trying to fix this problem and nothing, no combination of anything, seems to work at all. So any help will be greatly appreciated!
    Thanks

    Here is a quick suggestion for you:
    Download Virtual Box (free PC Emulator for Mac) and install Windows 7 on your Mac (don't worry about activating it yet, as you don't need to keep it more than a few hours).  You can tell Virtual Box to use the ISO file as the DVD drive for your virtual Windows computer, so no need to burn a disk.
    Search Google for creating a bootable USB installer for Windows 7.  I found a link that gave good instructions on how to do this using DiskPart.
    Follow the instructions to make the bootable USB stick for installing Windows 7 using your virtual machine you created above.
    Use the USB stick to install Windows on your new PC.
    Remove the virtual Windows machine from your Mac.
    Remove Virtual Box from your Mac.
    I found a set of instructions and built an installable USB stick last night that worked great for installing Windows 7 Pro (64 bit) onto my older ThinkPad I had sitting at home.  The USB installer also installs in about half the time as a DVD install.  The only reason I have you create the virtual Windows PC is that all of the instructions for makeing the Windows install USB stick are written assuming that you already have access to a running Windows PC.  By doing this install, you have up to 3 days before you would need to activate it and you can build the installer USB stick and remove teh virtual computer long before that.

  • I mounted my external hard drive to a pc and now I don't have edit or write permissions on my Mac (read only). How do I get them back without erasing the drive?

    Hello all, I am a photographer and have my portfolio, edited and raw images backed up on a Seagate Free Agent External Hardrive. I mounted my external hard drive to a pc recently and now I don't have edit or write permissions to it on my Mac (read only). How do I get them back without erasing the drive and loosing my valuable work?

    If you re-format it you will lose all the data on it!!!!! So make sure you have backed up the drive or moved all the data on it to another external HD or the internal HD on your iMac.
    Below is an Apple Advice letter that explains how to format an external HD, it's written for Aperture but you can use the instructions to formate any external HD.
    http://support.apple.com/kb/HT3509

  • Is it possible to install windows 7 on my macbook from a removable hard drive using boot camp? How would I do this?

    Is it possible to install windows 7 on my macbook from a removable hard drive using boot camp?
    How would I do this?

    If you have Lion installed, and run Boot Camp, it will create the boot flash for you, just followe the tutorial on screen. As far as I remember, this was not possible prior to Lion.

  • Can I install SuSE on an external hard drive and boot to that OS?

    Hi,
    I'd like to figure out and maybe even keep up with what a friend is doing with linux on a pc.
    Can I install SuSE 10.1 on an external Lacie hard drive and boot to that OS by holding down option during start-up?
    Thanks,
    Garrett

    Hi,
    I'm an OS X fan who was totally engrossed in the terminal a few years back but became side-tracked into structural and sculptural stuff instead of the computer.
    The Mac mini forum mentioned putting OS X on external hard drives to supe up the mini so it made me wonder about other Operating Systems.
    Now I'm mostly interested in being a little familiar with the SuSE OS because I heared the Chinese have adopted Linux; my impression is China and Europe are the cultural future and vanguard.
    U.S. is the only place on Earth using inches, farenheit, gallons, and pounds, for example. I'm anxious to use software that will come from Europe in the next year or two and China in the next four or five. Most American corps, except Apple, seem to have peaked, to me.
    I'm just curious as to what's out there. Anyplace not gone metric yet is SO yesterday. I'll feel way cool when I send my PC friend a screen shot of Linux on my Mac using the external Lacie hard drive instead of an internal partition.
    Garrett

  • G5 mounted as firewire hard drive

    Regarding a G5 PowerPC mounted as a hard drive.
    I would like to gain access to off board gear that is connected to a G5's  PCIe slots from another computer, say my intel based MacBook Pro w/ current software.  Since I've mounted the G5 as a hard drive, will it act as a PCIe bridge as well?  Will the off board gear be apparent to the MacBook Pro?
    I'm wanting to access PCIe based MOTU I/O with logic 9.1 which won't run on the G5 but will on my MacBook Pro. Will this work?

    I'd repost in the PowerMac forum instead.
    https://discussions.apple.com/community/desktop_computers/power_mac?view=discuss ions

  • Does macbook have to have internal hard drive to boot?!

    As i'm having partition problems with the aftermarket hard drive installed in my macbook, I am resigned to re-partitioning it to install SL and restoring from time machine.
    However, the old stock hard drive I have is in a caddy, I kept it as a backup incase anything ever goes wrong, then I can just boot straight back into a copy of OSX 10.5, last night I managed to install SL on this drive etc,
    So i'm wondering is it possible to boot the macbook from the USB Snow Leopard drive, then at the same time in a seperate caddie, re-partition the other hard drive so I can perform a fresh installation?
    Complicated I know, but i've looked into other areas and it appears this is going to be the only way!
    Comments, advice and suggestions welcome

    I can confirm that the macbook does not need a internal hard drive to boot, I booted using the factory hard drive in a USB caddie, and then installed Snow Leopard via another USB caddie
    thanks for the help Matt

  • Mount iphone as hard drive on a mac?

    All -
    Wonder if you can view the contents of iphone when plugged into an imac (running OS X) the same way the iphone mounts as a hard drive when plugged as a PC and can be viewed in my computer? Let me know when you can...thanks

    No the iPhone does not show like a hard drive would. You need to start iTunes 10.7 on your Mac and connect your iPhone. Select your iPhone in the left column of iTunes and you'll be able to find which apps, photos, books, PDFs, movies, music and photos are on your iPhone. Learn how to sync and transfer documents via file sharing with iTunes.

Maybe you are looking for

  • [SOLVED]Xorg crash with some applications when using double screen

    Hi, I have a TV that I often use to watch dvd from my computer, and to do that I've set it up as a second screen in my xorg.conf, but on a daily basis I use a xorg.conf file with only my main screen. Up until last week I was able to use my second scr

  • Question on Bins

    I have a state dashboard prompt and a report with state and %revenue measure. Users want to compare state to state or state to national comparison. In order to do that i tried to bin all the states and named it as national and tried to use the case s

  • Cisco social miner

    Hi team My client would like to implement social miner CCX 9.x but their concerns are that the server sits on the internet facing zone DMZ and the data base that house the transcript for web chat resides in the DMZ instead of the secured zone. Any su

  • How to check Internet usage userwise in Active Directory ?

    How to check Internet usage userwise in Active Directory ? Without third party software is it possible ? Thanks & Regards, Amol . Amol Dhaygude

  • How i can print the Stacktrace

    hii.. i want to print the stacktrace for my program below.. package Langpack; import java.io.*; import java.sql.*; import java.util.*; public class LanguageFunctions extends Databaseclass      public LanguageFunctions()      super();      LanguageDet