Results 1 to 7 of 7

Thread: swap trouble

  1. #1
    Join Date
    Apr 2011
    Location
    Ohio
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Unhappy swap trouble

    Hey all! When booting after a fresh install I now seem to get this message at boot:

    "The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present"

    What is this exactly? Is my swap not being found? Any help would be greatly appreciated!

  2. #2
    Join Date
    Sep 2007
    Location
    EU
    Beans
    224
    Distro
    Ubuntu Development Release

    Re: swap trouble

    Very strange. Why should swap be crypted? Did you coose to encrypt entire disk?

  3. #3
    Join Date
    Apr 2011
    Location
    Ohio
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: swap trouble

    No, not the entire disk. I chose to encrypt my /home during install and upon reboot this message appears.

    I've tried sudo swapon /dev/mapper/cryptswap1 but it tells me the device is busy. Strange indeed.

    I do get an option to try manual recovery at the prompt, I guess I'll try that! Thanks!

  4. #4
    Join Date
    Sep 2007
    Location
    EU
    Beans
    224
    Distro
    Ubuntu Development Release

    Re: swap trouble

    You can try it, mount all devices and resume normal boot.

  5. #5
    Join Date
    Dec 2011
    Beans
    132

    Re: swap trouble

    /dev/mapper/cryptswap1 is the encrypted swap space, I believe. Since it would be possible to recover files off of unencrypted swap, swap is encrypted when you choose to encrypt anything on your disk.

    I don't think there's actually an issue as long as the computer boots normally. I got that all the time on my encrypted 11.10, just delays the boot by a few seconds, which is expected when stuff is encrypted

  6. #6
    Join Date
    Apr 2011
    Location
    Ohio
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: swap trouble

    Yes, its not an issue. I chose the manual option and booted that way, saw that all was as it should be, then rebooted normally and voila! no message. Maybe sudo swapon /dev/mapper/cryptswap1 did the trick. Thanks for all your help! Another positive learning experience.

  7. #7
    Join Date
    Jan 2012
    Beans
    342

    Re: swap trouble

    Quote Originally Posted by pedja_portugalac View Post
    Very strange. Why should swap be crypted? Did you coose to encrypt entire disk?
    For much the same reason you might encypt the HD, data written to swap can be read off it just the same way you might recover data from a failing HD. Encypting swap is actualy quite easy to do as there need be no pass and the whole thing can be scrubbed at boot.

    Quote Originally Posted by Allavona View Post
    No, not the entire disk. I chose to encrypt my /home during install and upon reboot this message appears.
    hhmmm ... "cryptswap1" is what must have been passed as '--target', so, if this is not your username (unlikely) then the installer also attempted to setup swap as a dm-crypt device. This is either a feature, or something you selected to do (was there an option "encrypt swap"?)

    Quote Originally Posted by Allavona View Post
    I've tried sudo swapon /dev/mapper/cryptswap1 but it tells me the device is busy. Strange indeed.
    Its not really that strange, they are not really devices until they are 'un-mapped', that is dm-crypt has converted it from a 'locked' and un-readable section of your disk into a mountable 'partition' that you can write to (they are like 'loop' devices in that regard). You can't 'swapon' because essentially its not a swap until its been mapped to correspond to a device, and for this to happen dm-crypt needs to be provided with either the pass and/or information about device mappings. How Ubuntu does this I'm not sure, generally its something your prompted for early in the boot process (for user home directories, etc) or, if swap, the boot process uses a random pass and then runs cryptsetup, mkswap, and swapon.

    Where things are going wrong I'm not sure, but hopefully the above gives you some idea of how encrytpted partitions work. For a "manual recover" I think it simply means mounting via 'crytpsetup luksOpen /path' but as this not a map you will have a passphrase for you probably won't have any luck with it.

    One question though, if you selected to have your home encypted, is it? Does 'cryptsetup status <name>' (where I assume '<name>' would be your user name) show it as mapped?

    HTH in some way ... khay
    Last edited by Khayyam; February 29th, 2012 at 02:08 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •