Does Linode Support Custom Images Created Via a Chroot-style Build-Method

When working with other CSPs, I typically create custom boot-images using a chroot-based build method. Basically, launch a VM with its regular boot-disk and a secondary-disk, then perform a chroot-build from the boot-disk to the secondary-disk. Would I be able to do similarly under Linode?

My assumption would be something like:

  1. Launch a standard Linode
  2. Attach a volume of a given size to the Linode
  3. Perform a chroot-build onto the volume
  4. Power off the linode
  5. Detach the volume
  6. Snapshot the volume
  7. Create register a custom custom-distribution/build-template from the snapshot

Assuming the above is basically correct, what's the actual, technical procedure for it? I mean, I know how to do the third step in other CSPs' environments — already have the build-process fully scripted. It's more the specifics of moving from snapshot to launchable boot-image that I'm a bit lost on.

Is the above at all doable? If so, pointers on how?

Basically, I'm trying to create an LVM-enabled boot-image. I'm assuming I'd have to do a two-disk or two-partition boot-image so that /boot could be its own, ext4 partition with an initrd that knew how to boot the LVM'ed root-volumes (with XFS filesystems on top).

1 Reply

You have the right idea. The short answer is that you would need to boot from the Block Storage volume. There are a couple of options for booting a Linode from a custom image. We have a guide for deploying a custom image directly to a Linode available here that has instructions for installing the image on a blank Linode. Most of this process takes place in Rescue Mode. If you want to retain the image on a Block Storage volume and boot directly from the volume, this guide can show you how to set that up. You would need to add the volume to your configuration profile, copy the contents of the Linode to the volume, then set the Block Storage volume as primary disk.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct