Welcome to the Linux Foundation Forum!

chapter 22 ,lab 22.2

i am trying to encrypt swap device with luks and cryptsetup .....but it is giving me error
"device /dev/sda5 is not a valid luks device"
i am not unbale to understand problem after many attempts. below i have provided screenshot of the same.


  • uppercase yes is very important :D

  • hi @luisviveropena
    when i am trying to make partition in main device that is /dev/sda. i am not able to do it.
    it has three partition
    /dev/sda1 ext4 label-boot
    /dev/sda2 extended(sub partition swap /dev/sda5)
    i want to resize /dev/sda1 but i am not able to .
    while using gparted , all these three partition has locked symbol
    is there any way i can resize /dev/sda1 partition and make it available for further partition i want to make.

  • i am using ubuntu on virtual fusion

  • coop
    coop Posts: 915

    you cannot resize sda1 if sda2 is right after it (you can make it smaller, not bigger). Furthermore resizing an extended partition is rather difficult and requires unmounting any partitions after it and perhaps in it. Not advised to even try

  • @coop thankyou

  • Hi @saumya043 ,

    As Coop said, it won't be simple to resize an already mounted partition (as /boot). But if you really want to play with it, you can boot with a "live cd" like GParted: https://gparted.org/livecd.php .

    Note: just be sure to boot it into the VM, not your personal laptop or desktop, hehehe.


  • @luisviveropena thank you

  • coop
    coop Posts: 915

    gparted is rather sensitive to the exact filesystems and their versions in use as it is to the version of gparted. For example, using a Ubuntu livecd on a Fedora system will work in principle, but might result in damage. The non-GUI tools are more cumbersome to use but often I have had to work with them as safer version wise.


Upcoming Training