Live initialization of a boot device
Methods, apparatus and computer program products implement embodiments of the present invention that include executing, by a processor, a software stack. A writeable boot device such as a storage device with a removable medium is detected, and upon reaching a boot level threshold for the software stack, the software stack is saved to the writeable boot device as a boot image.
1. A method comprising:
executing, by a processor, a first software stack retrieved from a first boot image;
retrieving and executing, by the processor, a second software stack;
detecting a writeable boot device coupled to the processor; and
upon reaching a boot level threshold for the second software stack, saving the second software stack to the writeable boot device as a boot image.
2. The method according to claim 1 , wherein the first or second software stack comprises one or more components that are selected from a list comprising an operating system kernel, a service, and a software application.
3. The method according to claim 1 , wherein the boot device is selected from a list comprising a solid state drive, a hard disk and an optical disk.
4. The method according to claim 1 , wherein the second software stack is saved upon detecting the boot device having no boot image.
5. The method according to claim 1 , wherein saving the second software stack comprises replacing, on the writeable boot device, the first boot image with a second boot image comprising the second software stack.
6. The method according to claim 1 , and comprising rebooting the first software stack upon the second software stack failing to reach a boot level threshold for the second software stack.
7. The method according to claim 1 , wherein the first software stack is executing from a location in a memory, and wherein executing the second software stack comprises replacing, in the memory location, the first software stack with the second software stack.