/dev/mapper/ubuntu--vg-swap_1 is not ready or not present

25

Solution 1

I don't know. I made a new one:

  • Boot into recovery mode
  • Select Drop to root shell prompt
  • mount drive in read-write mode: mount -o remount, rw /

Make a swap file:

fallocate -l 512m /swapfile1.swp

Format the new swapfile

$ mkswap /swapfile1.swp

Change the permissions:

$ chown root:root /swapfile1.swp

$ chmod 0600 /swapfile1swp

Edit /etc/fstab and Comment out the mapper:

#/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0
/swapfile1 swap swap defaults 0 0

Reboot.

Press CTRL-ALT-T

Was the swap file allocated to swap by fstab? We should have 512MB:

$ free
Swap:       524280      17148     507132

Solution 2

To get the moose, format the linear virtual block device:

  • Boot into recovery mode
  • Select Drop to root shell prompt
  • mount drive in read-write mode: mount -o remount, rw /

Check it:

$ dmsetup -v table /dev/mapper/ubuntu--vg-swap_1

Turn off swap:

$ swapoff -a

Format the swapfile:

$ mkswap /dev/mapper/ubuntu--vg-swap_1

Edit /etc/fstab and Comment out any other swap files:

/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0
#/swapfile1 swap swap defaults 0 0

Reboot.

Press CTRL-ALT-T

Was the swap file allocated to swap by fstab? We should have 888MB:

$ free

Swap:       909308      0     909308

Is the linear virtual block device encrypted? dmsetup will return "crypt":

$ dmsetup status

sda5_crypt: 0 624637944 crypt
Share:
25

Related videos on Youtube

Shniper
Author by

Shniper

Updated on September 18, 2022

Comments

  • Shniper
    Shniper over 1 year

    I have a p element inside two circles with borders and need to center the p element based on the width of the circles however I want to cause the p element to break into two lines without needing to create two p elements so I used a max-width. I believe that this is causing it not to center, but I could be wrong. If anyone knows a good hack to get around this please enlighten me

    DEMO

    <div class="one">
      <div class="two">
    
        <p class="survive">Surviving Earth</p>
    
      </div>
    </div>
    
    
    .one {
      width: 300px;
      height: 300px;
      border-radius: 50%;
      border: 20px inset #81ff14;
    }
    
    .two {
      width: 250px;
      height: 250px;
      border-radius: 50%;
      border: 20px outset #81ff14;
      margin: auto;
      margin-top: 5px;
      text-align: center;
    }
    
    .survive {
      font-size: 36px;
      max-width: 100px;
    }
    
  • Shniper
    Shniper about 8 years
    Okay thank you. I gave it a margin auto before and as you said it was too far to the right, I didn't know why thanks.
  • omnichad
    omnichad about 8 years
    If you want to force a break, just insert a <br /> tag between the words (if the text will always be the same).
  • Shniper
    Shniper about 8 years
    funny question but is there a simple way to add a 3d measurement to an element. I'm looking for an effect like this but with code pimped-pixels.net/forum/uploads/profile/…