Slackware on AWS EC2

Last modified:

October 2024

Andrew Sarangan
asarangan@gmail.com

On AWS, there aren’t any images of Slackware. If you want to run Slackware, you have to create one from scratch. There is a howto on this topic, but it wasn’t too helpful for me. I still ran into several issues that required a deeper investigation. This post is a summary of the steps I had to take to create a Slackware machine on EC2. This is not a tutorial on Slackware, AWS, VMware or Linux. It is assumed you are proficient in all of these.

1. Create a Slackware virtual machine

2. Upgrade to Slackware64-current (optional)

slackpkg update
slackpkg upgrade slackpkg
slackpkg upgrade aaa_glibc-solibs gnupg
slackpkg upgrade-all
slackpkg clean-system
mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
chroot /mnt

3. Change partition names to their UUIDs

4. Check ssh connectivity

5. Create key pairs and disable password login (optional)

ssh -i private_key IP_NUMBER -l username

6. Decide which EC2 instance to use

7. LILO vs ELILO vs GRUB

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

8. Export the VMDK file

9. Upload the vmdk file to S3

10. Convert the vmdk file to an EC2 snapshot

./s3vmdktosnapshot.bash slack64 SlacktestBIOS-disk1.vmdk Slackware64-current
Deleting old vmimport role
Creating vmimport role
Submitting S3 to EC2 conversion job
task ID = import-snap-0061efa3bf75811ee
Status = active;  Message = pending
Status = active;  Message = pending
.....
Status = active;  Message = downloading/converting
Status = active;  Message = converted
Status = active;  Message = Preparing snapshot
Status = active;  Message = Preparing snapshot
Status = active;  Message = Preparing snapshot
Status = completed;  Message = null

11. Create Amazon Machine Image (AMI) from the snapshot

12. Launch an instance

13. Kernel updates

14. What do to if the instance refuses to boot

mount /dev/nvme0n1p3 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
chroot /mnt

One response to “Slackware on AWS EC2”

  1. ajam Avatar
    ajam

    Need to try all this. Lots of thanks for all your work! Incredible that there is no Slackware AMI available, but this definitely helps!

Leave a Reply

Your email address will not be published. Required fields are marked *