Skip to main content
Change dead link to use archive.org
Source Link
Ben C
  • 121
  • 3

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need to use three EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail herehere.

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need to use three EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need to use three EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.

Fix typo
Source Link
Ben C
  • 121
  • 3

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need three to use three EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need three to use EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need to use three EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.

Source Link
Ben C
  • 121
  • 3

AMIs do not have to be based on existing ones, but creating one from EC2 is convoluted because it gives you a computer with remote access and hardware configuration but no console input.

The trick here is that ISO images can be booted directly from hard disk if they include a boot sector. Also, installation of the new OS needs to be completely automated because you won't be able to interact with the console when the installer is running.

You will need three to use EBS disks, and switch which ones are attached: development, the installer and the final result.

  1. Start an EC2 instance with an existing AMI.
  2. Edit the ISO image for your new OS to make an unattended install (i.e. loopback mount, copy files, edit, mkisofs, isohybrid). For Ubuntu you need to edit the preseed file and isolinux.cfg. The install must write to a fresh EBS disk that will become the new AMI.
  3. Copy the edited ISO image to a third EBS disk and boot from it.

I created an AMI for Linux Mint 18.2 using this method (starting with Amazon AMI Linux) as described in detail here.