Note that once solved, the code from this bounty will be made publicly available for anybody who wants to use it on their ubuntu installer. Please see link for full details including results of previous attempts to fix the issue.

Bounty Amount and Terms:

This bounty is for $250 USD and will be paid out via PayPal. This bounty amount will increase at random amounts and intervals until it is claimed. The bounty is open to residents of all countries except those under embargo or sanction by the US govt. The bounty will be paid out to the first person to produce a working preseed recipe or steps to achieve the desired result. When the bounty is successfully claimed, this post will be updated. By submitting your fix and claiming your bounty, you agree to release any code, preseed files, etc delivered to us into the public domain and surrender all rights you hold to them.

Problem:

We want to create an Xubuntu 22.04 ISO using Cubic. Using the preseed, we want to automatically partition the drive with a standard encrypted LVM setup (same one that is achieved manually via the GUI installer). Unfortunately, all existing recipes, which supposedly worked in prior Ubuntu versions, fail with the error No modifications can be made to the device: Encrypted Volume (sda1p2_crypt) for the following reasons: In use by LVM module group crypt or whatever the volume is titled in the partman recipe.

Desired Solution:

  • A preseed file which enables automatic encrypted LVM partitioning identical to what is achieved by choosing it manually in the GUI installer
  • This solution must be compatible with Cubic and may involve making modifications to the underlying iso, for example, by issuing commands at the chroot terminal provided by Cubic. It should not require any modifications to the ISO outside of the abilities provided by Cubic.
  • rjthyen
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I never thought such a thoughtful and detailed reply would leave me even more confused than I was to begin with. I guess I learned that possibility existed so TIL

    • MrMonkey
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Hard drives are divided into partitions. Once they’re made they’re (mostly) static, it’s just a division, no other features.

      LVM (Linux Volume Manager) makes it’s own "partitions" with hookers and blackjack. Since it’s done in the OS and not on the drive it’s a LOT more flexible.

      It takes disk(s) and/or partitions and combines them into a volume group (VG) and then lets you create it’s own divisions, called [logical] volumes (LV), to split up the storage. Think of this as a “virtual hard drive” that has a TON of features.

      VGs can include multiple drives and are easy to grow or shrink, add, remove, or replace physical drives, cache another volume, encrypt, make snapshots and roll back (eg: snapshot before update, restore if update borks something). Just so much

      You can even set the RAID level for each volume! RAID controls how many copies are kept on different drives. RAID1 (or raid10) has 2 drives hold the data) for important things so even if one drive fails you still have a working copy.

      RAID0only stores it on one device. There’s RAID5 (3 copies) but it’s mostly obsolete at this point as the rebuild process is painfully slow and adds addition wear on the other drives.

      Let’s say you have 4x 4TB drives, for 16TB of raw space (raid0). Making it a raid1 would give you 8TB of space (since two copies are stored on different drives). But if you only need 1TB as a raid1 and the rest is raid0 you end up with 14TB of space left over! That’s a lot more than 8TB!

      There’s a brazillion different options and useful things it can do. Mostly I find it useful for working with raids on servers. But I’ve stated leaving a few hundred gigs on my laptop to create volumes as need, such as an encrypted volume that’s not unlocked on login to store passwords, keys, and porn tokens.

      • rjthyen
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        So it’s like if I had a bag of candy and my wife wants me to share I could create a 2nd copy that she doesn’t get to see. Share what she can see and keep the rest for myself?