CRUX Linux in the Cloud (AWS EC2)
This is how I did it.- Install CRUX Linux on disk image (8GB)
- Install ec2-get-ssh into /etc/rc.d
- Edit /etc/rc.conf and enable sshd and ec2-get-ssh
- Make sure curl is installed, ec2-get-ssh depends on it
- Edit /etc/fstab and make the root filesystem
$ /dev/xvda1mkdir -p /boot/grub $ cd /boot/grub
- Create a menu.lst with the following
default=0 fallback=1 timeout=1 hiddenmenu title CRUX root (hd0,0) kernel /boot/vmlinuz root=/dev/xvda1 console=hvc0
Convert the image to RAW format using VBoxManage
$ VBoxManage clonehd CRUX.vdi CRUX.img --format RAW
Start a server, mount an appropriately sized volume
$ dd bs=1M of=/dev/xvf
- umount the volume
- take a snapshot of the volume
- register the snapshot as an image
NOTE: You will need to mount the image as /dev/sda *NOT* /dev/sda1 as the drive is partitioned due to the conversion from a VirtualBox image
- Boot the image with a pv-grub You need to use a pv-grub-hd00_1.04-x86_64.gz kernel image. This image will support the compressed kernel, the location of the menu.lst and the partitioned drive image.
- Install the ec2-get-ssh script in /etc/rc.d
- Edit /etc/rc.conf to startup ec2-get-ssh on boot
- Disable password for root login
$ vi /etc/ssh/sshd_config
PermitRootLogin without-password
$ /etc/rc.d/sshd restart
Kernel Options (3.12.24)
General Setup ---> <*> Kernel .config support [*] Enable access to .config through /proc/config.gzProcessor type and features ---> [*] Linux guest support ---> [*] Enable paravirtualization code [*] Paravirtualization layer for spinlocks [*] Xen guest support [*] Paravirtual steam time accountingBus options (PCI etc.) ---> [*] Xen PCI Frontend Device Drivers ---> Generic Driver Options ---> -*- Maintain a devtmpfs filesystem to mount at /dev [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs [*] Block devices (NEW) ---> <*> Xen virtual block device support [*] Network device support ---> <*> Xen network device frontend driver