Update: So a suggestion for anyone who runs into anything similar, run your tests on another machine if possible. It turns out, my NVME was beginning to fail, and the install proceeds properly now. -Aaron
On Mon, Feb 5, 2024 at 1:23 PM Aaron Goulding <agould...@backblaze.com> wrote: > Hey all! > > So I am attempting to build a custom Deb12 installer where the goal is to > be able to do a zerotouch install to a system (currently using preseeding) > and have it set up the partitioning for an encrypted root. Normally I'd > just use preseeding entirely, but partman-auto-crypto doesn't allow for > setting up encryption WITHOUT the use of LVM, which I'm not allowed to use > in our environment. > > I had e-mailed several months ago to see about possibly updating > partman-auto-crypto, but in the mean time I'm trying to get something > working internally. I found https://github.com/thoto/partrep and used > that as a basis for how to build a package that replaces partman, and wrote > my own handling for getting things set up correctly in our environment. > > In running install tests with this, I can see it's successfully > partitioned the root disk, set up LUKS based dm crypt on the root > partition, formatted and mounted the partitions, wrote out /etc/fstab and > /etc/crypttab, and queued the correct target packages. My package exits > with 0 correctly. > > My problem comes when the next step of the installer runs, and the > base-installer tries to run debootstrap. The install process freezes, then > the base-installer package exits with a non-zero code. I can't seem to find > any more info from it though. Interestingly, if I go into the menu and > manually run base-installer again, the install completes successfully. > > I have gone through and extracted both the original Deb12 initrd.gz as > well as my altered one and ran a diff on every file. Other than the > additional files from my package, and the extra entries in > /var/lib/dpkg/status for the new package and it's dependencies (bzpartrep, > crypto-dm-modules, cryptsetup-udeb, di-utils-mapdevfs, disk-detect, > dmidecode-udeb, dmsetup-udeb, dosfsutils-udeb, e2fsprogs-udeb, efi-modules, > liibargon2-1-udeb, libcryptsetup12-udeb, libdevmapper1.02.1-udeb, > libjson-c5-udeb, libparted2-udeb, libpopt0-udeb, md-modules, and > parted-udeb) > > For reference, here is part of the debian/control file: > Package: bzpartrep > Package-Type: udeb > Architecture: any > Depends: ${shlibs:Depends}, ${misc:Depends}, e2fsprogs-udeb, > dosfstools-udeb, efi-modules, archdetect, harddrive-detection, > di-utils-mapdevfs, di-utils, cdebconf-udeb, cryptsetup-udeb, > crypto-modules, crypto-dm-modules, parted-udeb > Provides: partman-base, made-filesystems, mounted-partitions, > partitioned-harddrives, created-fstab > Installer-Menu-Item: 4199 > Description: Encrypted partition partman alternative > > Any suggestions, or things I'm missing? > > Thanks! > -Aaron > -- This email, including its contents and any attachment(s), may contain confidential and/or proprietary information and is solely for the review and use of the intended recipient(s). If you have received this email in error, please notify the sender and permanently delete this email, its content, and any attachment(s). Any disclosure, copying, or taking of any action in reliance on an email received in error is strictly prohibited.