0

TLDR: I'm trying to create an EBS-backed AMI instance and then pivot to it using Busybox but I get a kernel panic:

VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 156k freed
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

The repository for the code is here: https://github.com/atramos/ec2-spotter

How it works is:

  1. Create a static busybox image using the script make-busybox.sh.
  2. Create the basic filesystem - /boot, /etc, /sbin, and so on.
  3. Create a pivot script to replace /sbin/init
  4. Bundle the busybox image to an AMI and upload the AMI to an S3 bucket
  5. Create an EBS volume
  6. Clone my current OS to the EBS volume
  7. Fix up device paths
  8. Create a new EC2 instance with the busybox AMI
  9. Attach the EBS volume
  10. Boot the new EC2 instance and pivot to the EBS volume

Everything goes swimmingly until #9, the instance boots, but then the kernel panics as shown above.

I've tried different paths for the init script. I've tried building a static "Hello World" C program to use as init. The same error occurs.

Thanks for your help!

pndiku
  • 1

0 Answers0