-5

Can I modify an EC2 instance to support dual-/multi-boot (any 2 or more OSes)?

If yes, how?

If no, why not / what needs to change?

Would this be easier on one of the other large IaaS platforms (Azure /GCP)?

Before this gets shut down, I should mention that this is not something that I plan to do. I just want to understand the technical restrictions / challenges.

2 Answers 2

3

AWS let you import your own custom virtual machine file as AMI.

There is a hint on how AWS virtual machine start the instance :

GPT partitions are not supported by Amazon EC2, which means that imported system volumes must have an MBR to boot.

So maybe you can try build a dual boot virtual image and upload to AWS as long as you comply with the stated limit (like create MBR boot, use complied OS allowed as AMI OS). You can't simply create any virtual image and upload to AWS.(you can't create a DOS, OS2, OSX,etc, there is many reason why AWS forbid them.)

However, since there is no way to channel AMI startup screen(Though virtual environment may let you channel KVM[keyboard,video,mouse], no cloud provider want to do this because it is counter-intuitive and counter-productive), so you can't select which boot section to boot, and there is no way to pass data in the bootup screen. You must bootup the OS first and switch the boot environment and restart.

In short, AMI image is cheap(unless you create an Gigantic hundred GB AMI), it is not worth the trouble.

2
  • So, do you mean that it is possible to create a dual-bootable AMI despite Amazon's limited kernel images (I'm guessing the limitation for the possible space of OSes must be that they share a kernel image)? I could set the default OS to boot into at shut down time. It's not meant to be something useful; merely understanding the limits of what is possible.
    – Jedi
    Apr 13, 2017 at 16:41
  • 1
    @Jedi Theoretically possible and plausible. Anyway, AWS reserved the rights to reject your custom image to protect and safeguard their cloud environment XD
    – mootmoot
    Apr 13, 2017 at 16:44
3

Dual instance boot goes against the basics of cloud computing and it is by all means discouraged in such environments. You may accomplish that by tuning GRUB but, as AWS does not provide KVM access, it may be quite difficult to debug and manage.

Instead, You should better provision separate instances and simply start the one you need (remember that you only pay as you go, so stopped instances cost 0$). If you need shared data between OSs, put your resources in S3 (best durability and scalability), EFS (better IO latency with good scalability) or an EBS volume that you mount/unmount after each switch (best latency, worst scalability).

6
  • It seems like a very strong assertion to say that it goes against the basics of cloud computing. What basics are those?
    – Jedi
    Apr 10, 2017 at 18:50
  • Basically, cloud computing provides as a service an administration layer that abstracts IT administrators from the time-consuming tasks related to hardware and operating systems setup, simplifying the servers procurement to the minimum expression. Anytime you need a new server, you are simply a few clicks away from it and do not need to invest time in complicated setups or budget management. youtu.be/jOhbTAU4OPI
    – ma.tome
    Apr 10, 2017 at 18:56
  • True, but using an IaaS indicates that I would like a "server" to do with as I please. Just because it is not a typical use case, or inconvenient to support, doesn't mean that it must be this way.
    – Jedi
    Apr 10, 2017 at 18:58
  • Anyway, feel free to invest your time at what you think is the most productive for your business (which in fact is another golden rule of cloud computing).
    – ma.tome
    Apr 10, 2017 at 19:06
  • 2
    When I speak about KVM it is not the hypervisor (Kernel Virtual Machine), but Keyboard-Video-Mouse, which is the way to access a server's local console from a remote location via software emulation running in the virtualization layer or a specific-purpose hardware module in bare-metal nodes. AWS only provides SSH or RDP by default, which are protocols that work in the operating system level and cannot grant you direct access to many task occurring at boot time. The closest AWS provides are the "Get System Logs" and "Get screenshot" features, both available in the EC2 console.
    – ma.tome
    Apr 10, 2017 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.