• LUKS with custom partitioning


    Newbie here.

    Trying to install antergos with LUKS and custom partitioning by wiki tutorial (which seems slightly outdated) and have issues with Configure grub & mkinitcpio and Recompiling kernel image parts.

    1. Tutorial says: /etc/mkinitcpio.conf like will look HOOKS=“base, udev…, lvm2,…”) and add the encrypt hook before the lvm2 one
      My file has no lvm2 hook, it looks: HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
      Should I also add lvm2, or only encrypt? I added only encrypt before filesystems at the moment.

    2. Tutorial says: At the very beginning of the “grub” file, after this section:
      GRUB_DEFAULT=0
      GRUB_TIMEOUT=5
      GRUB_DISTRIBUTOR=Antergos
      GRUB_CMDLINE_LINUX_DEFAULT=“quiet”
      GRUB_ENABLE_CRYPTODISK=y <======ADD THIS LINE

    Once again, my file is slightly different:
    GRUB_DEFAULT=0
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR=“Arch
    GRUB_CMDLINE_LINUX_DEFAULT=“quiet”

    And it already contains uncommented GRUB_ENABLE_CRYPTODISK=y line, but not at the beginning of file. I guess it’s OK and I don’t need to move this line at the beginning of file?

    1. Then I have biggest issue with mount --bind /proc /install/procmount --bind /dev /install/devmount --bind /sys /install/sysmount --bind /run/lvm /install/run/lvm

    It displays errors mount point does not exist for every mount command in the list.

    Tutorial says: FYI “/install” is where your future root volume (/) has been mounted by the Antergos installer

    I mounted / volume this way:

    Created partition /dev/nvme0n1p3 for LUKS container as per tutorial.
    Opened (decrypted) container as /dev/mapper/luks
    Created volume group antergos inside it.
    Created volumes root and home inside antergos group.

    So what exactly should I replace “install” part in mount --bind /proc /install/procmount command?

    Tried:

    mount --bind /proc /procmount
    mount --bind /proc /root/procmount
    mount --bind /proc /dev/mapper/luks/antergos-root

    …and more, everything fails

    I thought that I just need to remove /install part in my case and it will work, but it doesn’t. Strange, editing files with /install removed worked fine. For example, tutorial says:

    edit /install/etc/default/grub

    So I edit /etc/default/grub and it works. What do I miss here with mount?

    Thank you.

  • @toxpal said in LUKS with custom partitioning:

    wiki tutorial (

    from ArchWiki?

  • as it is intergrated as option inside cnchi installer…

  • @joekamprad

    Using tutorial from antergos wiki. Can’t post a link (tried to include it in original post) because forum displays error “Akismet flagged post as spam” every time I try to include the link.

  • yes new users need some fame before the can post links, as otherwise we will be full of spam and clickbate here…

    o.k. i find this wiki:

    https://antergos.com/wiki/install/how-to-install-antergos-w-custom-lukslvm2-partitioning/

    I do not know about …

    Do you have dualboot? If not better use the integrated option to create LUKS encrypted install…

  • No, it’s UEFI system for antergos only.

    Will try to use default installer now to see if I can create custom partitions, encrypt system and have these custom partitions auto-mounted without a need to enter password twice.

  • Please excuse my ignorance, but how do I create custom volumes (like /root, /home, and so on) inside LUKS container via default installer? If using auto-option, installer allows system encryption, but it uses default partinioning (which I don’t want).

    If I choose custom partitioning, installer only allows to create separate LUKS containers for every custom partition, which is not what I want.

  • i am far away from calling me a pro on encrypting systems ;)

    I am using this long time ago on project to create a secured email server… but as i can see i misunderstand what you are going to install.

    I would say that cnchi only allows to do automatic install where rootfilesystem and /home is encrypted.

    And if you choose advanced partition you can create seperate luks container also but they will not be open together with bootup automaticly.

    and i just read that wiki entry… and they are may some changes, or it is simple unclearly written in a way…

    LVM has some changes as far as i remember…

    May it will work to add a so called encrypted data partition after the initial install to the volume group?

  • @joekamprad said in LUKS with custom partitioning:

    And if you choose advanced partition you can create seperate luks container also but they will not be open together with bootup automaticly.

    Yes, this is correct. That’s why I followed the tutorial - because it enables auto-open (mount) of encrypted partitions during boot.

    I’m just not sure what to use instead of “/install” part in mount location, so I thought that someone who uses Linux will figure it out easily… Because it’s just about entering the correct path (which might depend on system setup), if I’m not mistaken…

  • /install is what is choosen from cnchi to be used for installation as it follows the way archlinux is installed it is done inside a chroot.

    B.T.W. it would be nice to get this working, so we can updaate the wiki entry to a working state.

    But we will need someone more comfortable with LUKS and LVM then me to get into this problem here.

    I just do a VM install to see what i can find out.

  • @joekamprad said in LUKS with custom partitioning:

    /install is what is choosen from cnchi to be used for installation as it follows the way archlinux is installed it is done inside a chroot.

    Yes, I realize that.

    Like I explained previously, LUKS container was created at /dev/nvme0n1p3 (in other words, a 3rd partition on nvme SSD).

    Then I opened LUKS container as /dev/mapper/luks, and created volume group antergos. This volume group contains 2 volumes - /root and /home. Just like in tutorial, except that MyVolumeGroupsName is named antergos and myROOTvolume is named root in my setup.

    And then I instructed installer to install OS into my virtual /root volume (located inside LUKS container). And now I’m not sure what to use as /install path.

    /dev/mapper/luks?
    /dev/mapper/luks/antergos/root?
    /root?
    /dev/nvme0n1p3/luks/antergos/root?

    Sorry if some of these paths look silly, I never used virtual drives in Linux (in fact, my Linux experience is super limited) and I’m just trying to make my best guess by following the logic of tutorial and my own common sense…

  • @toxpal said in LUKS with custom partitioning:

    And now I’m not sure what to use as /install path

    You do not choose /install path inside installer…

    You need to format and put the mountpoint for rootfilesystem (/) this is where system gets installed, and in the case of LUKS/LVM you choose the opened volume what you create for root (/) before.

    so this should be /dev/mapper/root ?
    I just take a look to the wikipage and there he shows a picture with the volumes inside partition screen:
    alt text
    They should look up inside this screen as you have them created before

  • Yes, this is exactly what I did and exactly how my partitions looked like when launched installer.

    I’ll try again with /dev/mapper/root and /dev/mapper/antergos-root (IIRC, all virtual volumes were prefixed with antergos- in installer, just like they are prefixed with buckDOEcube- in screenshot above)

  • and to make more clear:

    On EFI-system you need to create at minimum:

    • EFI boot partition with around 250MB formatted as fat32 and set mountpoint to /boot/efi
    • root partition what can contain /home and /boot inside itself as a folder if you do not want them to create as its own partitions, mounpoint set to / and formatted with ext4.

    If you do not create extra partition for /boot or/and /home they will be created for you under / as folders.

  • and adding something about swap (you know about?) if you have a bigger amount of RAM like 8GB and more … you do not need it…
    Otherwise create it with the same amount of installed RAM

  • I’ll be using swapfile because everyone told me that using swapfile is better on SSD because of lower SSD wear. Anyhow, re-installing right now…

  • o.k. swapfile is better in some ways…

  • @toxpal i come from very old shool linux class;) like old days 90ies

  • Not a problem for me. I also consider myself old-school user because the main reason why I decided to install Linux is that Win7 will be unsupported soon, and I just don’t like/understand interface of modern versions (8, 8.1, 10) and don’t even want to learn using it.

    Tried Linux (Mandrake) for the first time about 18 years ago, and liked it. My wife uses Mint for years, so it’s time for me to start using Linux too :)

  • and you are diving directly into the deepspace of Linux ;)

luks16 custom11 partitioning11 Posts 54Views 1303
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.